mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
synced 2026-05-03 12:24:37 -04:00
Merge branch 'mlx5-misc-patches-2024-10-31'
Tariq Toukan says: ==================== mlx5 misc patches 2024-10-31 First patch by Cosmin fixes an issue in a recent commit. Followed by 2 patches by Yevgeny that organize and rename the files under the steering directory. Finally, 2 patches by William that save the creation of the unused egress-XDP_REDIRECT send queue on non-uplink representor. ==================== Link: https://patch.msgid.link/20241031125856.530927-1-tariqt@nvidia.com Signed-off-by: Jakub Kicinski <kuba@kernel.org>
This commit is contained in:
@@ -109,35 +109,48 @@ mlx5_core-$(CONFIG_MLX5_EN_TLS) += en_accel/ktls_stats.o \
|
||||
en_accel/fs_tcp.o en_accel/ktls.o en_accel/ktls_txrx.o \
|
||||
en_accel/ktls_tx.o en_accel/ktls_rx.o
|
||||
|
||||
mlx5_core-$(CONFIG_MLX5_SW_STEERING) += steering/dr_domain.o steering/dr_table.o \
|
||||
steering/dr_matcher.o steering/dr_rule.o \
|
||||
steering/dr_icm_pool.o steering/dr_buddy.o \
|
||||
steering/dr_ste.o steering/dr_send.o \
|
||||
steering/dr_ste_v0.o steering/dr_ste_v1.o \
|
||||
steering/dr_ste_v2.o \
|
||||
steering/dr_cmd.o steering/dr_fw.o \
|
||||
steering/dr_action.o steering/fs_dr.o \
|
||||
steering/dr_definer.o steering/dr_ptrn.o \
|
||||
steering/dr_arg.o steering/dr_dbg.o lib/smfs.o
|
||||
#
|
||||
# SW Steering
|
||||
#
|
||||
mlx5_core-$(CONFIG_MLX5_SW_STEERING) += steering/sws/dr_domain.o \
|
||||
steering/sws/dr_table.o \
|
||||
steering/sws/dr_matcher.o \
|
||||
steering/sws/dr_rule.o \
|
||||
steering/sws/dr_icm_pool.o \
|
||||
steering/sws/dr_buddy.o \
|
||||
steering/sws/dr_ste.o \
|
||||
steering/sws/dr_send.o \
|
||||
steering/sws/dr_ste_v0.o \
|
||||
steering/sws/dr_ste_v1.o \
|
||||
steering/sws/dr_ste_v2.o \
|
||||
steering/sws/dr_cmd.o \
|
||||
steering/sws/dr_fw.o \
|
||||
steering/sws/dr_action.o \
|
||||
steering/sws/dr_definer.o \
|
||||
steering/sws/dr_ptrn.o \
|
||||
steering/sws/dr_arg.o \
|
||||
steering/sws/dr_dbg.o \
|
||||
steering/sws/fs_dr.o \
|
||||
lib/smfs.o
|
||||
|
||||
#
|
||||
# HW Steering
|
||||
#
|
||||
mlx5_core-$(CONFIG_MLX5_HW_STEERING) += steering/hws/mlx5hws_cmd.o \
|
||||
steering/hws/mlx5hws_context.o \
|
||||
steering/hws/mlx5hws_pat_arg.o \
|
||||
steering/hws/mlx5hws_buddy.o \
|
||||
steering/hws/mlx5hws_pool.o \
|
||||
steering/hws/mlx5hws_table.o \
|
||||
steering/hws/mlx5hws_action.o \
|
||||
steering/hws/mlx5hws_rule.o \
|
||||
steering/hws/mlx5hws_matcher.o \
|
||||
steering/hws/mlx5hws_send.o \
|
||||
steering/hws/mlx5hws_definer.o \
|
||||
steering/hws/mlx5hws_bwc.o \
|
||||
steering/hws/mlx5hws_debug.o \
|
||||
steering/hws/mlx5hws_vport.o \
|
||||
steering/hws/mlx5hws_bwc_complex.o
|
||||
mlx5_core-$(CONFIG_MLX5_HW_STEERING) += steering/hws/cmd.o \
|
||||
steering/hws/context.o \
|
||||
steering/hws/pat_arg.o \
|
||||
steering/hws/buddy.o \
|
||||
steering/hws/pool.o \
|
||||
steering/hws/table.o \
|
||||
steering/hws/action.o \
|
||||
steering/hws/rule.o \
|
||||
steering/hws/matcher.o \
|
||||
steering/hws/send.o \
|
||||
steering/hws/definer.o \
|
||||
steering/hws/bwc.o \
|
||||
steering/hws/debug.o \
|
||||
steering/hws/vport.o \
|
||||
steering/hws/bwc_complex.o
|
||||
|
||||
|
||||
#
|
||||
|
||||
@@ -755,7 +755,7 @@ struct mlx5e_channel {
|
||||
u8 lag_port;
|
||||
|
||||
/* XDP_REDIRECT */
|
||||
struct mlx5e_xdpsq xdpsq;
|
||||
struct mlx5e_xdpsq *xdpsq;
|
||||
|
||||
/* AF_XDP zero-copy */
|
||||
struct mlx5e_rq xskrq;
|
||||
|
||||
@@ -865,7 +865,7 @@ int mlx5e_xdp_xmit(struct net_device *dev, int n, struct xdp_frame **frames,
|
||||
if (unlikely(sq_num >= priv->channels.num))
|
||||
return -ENXIO;
|
||||
|
||||
sq = &priv->channels.c[sq_num]->xdpsq;
|
||||
sq = priv->channels.c[sq_num]->xdpsq;
|
||||
|
||||
for (i = 0; i < n; i++) {
|
||||
struct mlx5e_xmit_data_frags xdptxdf = {};
|
||||
|
||||
@@ -2086,6 +2086,44 @@ void mlx5e_close_xdpsq(struct mlx5e_xdpsq *sq)
|
||||
mlx5e_free_xdpsq(sq);
|
||||
}
|
||||
|
||||
static struct mlx5e_xdpsq *mlx5e_open_xdpredirect_sq(struct mlx5e_channel *c,
|
||||
struct mlx5e_params *params,
|
||||
struct mlx5e_channel_param *cparam,
|
||||
struct mlx5e_create_cq_param *ccp)
|
||||
{
|
||||
struct mlx5e_xdpsq *xdpsq;
|
||||
int err;
|
||||
|
||||
xdpsq = kvzalloc_node(sizeof(*xdpsq), GFP_KERNEL, c->cpu);
|
||||
if (!xdpsq)
|
||||
return ERR_PTR(-ENOMEM);
|
||||
|
||||
err = mlx5e_open_cq(c->mdev, params->tx_cq_moderation,
|
||||
&cparam->xdp_sq.cqp, ccp, &xdpsq->cq);
|
||||
if (err)
|
||||
goto err_free_xdpsq;
|
||||
|
||||
err = mlx5e_open_xdpsq(c, params, &cparam->xdp_sq, NULL, xdpsq, true);
|
||||
if (err)
|
||||
goto err_close_xdpsq_cq;
|
||||
|
||||
return xdpsq;
|
||||
|
||||
err_close_xdpsq_cq:
|
||||
mlx5e_close_cq(&xdpsq->cq);
|
||||
err_free_xdpsq:
|
||||
kvfree(xdpsq);
|
||||
|
||||
return ERR_PTR(err);
|
||||
}
|
||||
|
||||
static void mlx5e_close_xdpredirect_sq(struct mlx5e_xdpsq *xdpsq)
|
||||
{
|
||||
mlx5e_close_xdpsq(xdpsq);
|
||||
mlx5e_close_cq(&xdpsq->cq);
|
||||
kvfree(xdpsq);
|
||||
}
|
||||
|
||||
static int mlx5e_alloc_cq_common(struct mlx5_core_dev *mdev,
|
||||
struct net_device *netdev,
|
||||
struct workqueue_struct *workqueue,
|
||||
@@ -2476,6 +2514,7 @@ static int mlx5e_open_queues(struct mlx5e_channel *c,
|
||||
struct mlx5e_params *params,
|
||||
struct mlx5e_channel_param *cparam)
|
||||
{
|
||||
const struct net_device_ops *netdev_ops = c->netdev->netdev_ops;
|
||||
struct dim_cq_moder icocq_moder = {0, 0};
|
||||
struct mlx5e_create_cq_param ccp;
|
||||
int err;
|
||||
@@ -2496,15 +2535,18 @@ static int mlx5e_open_queues(struct mlx5e_channel *c,
|
||||
if (err)
|
||||
goto err_close_icosq_cq;
|
||||
|
||||
err = mlx5e_open_cq(c->mdev, params->tx_cq_moderation, &cparam->xdp_sq.cqp, &ccp,
|
||||
&c->xdpsq.cq);
|
||||
if (err)
|
||||
goto err_close_tx_cqs;
|
||||
if (netdev_ops->ndo_xdp_xmit) {
|
||||
c->xdpsq = mlx5e_open_xdpredirect_sq(c, params, cparam, &ccp);
|
||||
if (IS_ERR(c->xdpsq)) {
|
||||
err = PTR_ERR(c->xdpsq);
|
||||
goto err_close_tx_cqs;
|
||||
}
|
||||
}
|
||||
|
||||
err = mlx5e_open_cq(c->mdev, params->rx_cq_moderation, &cparam->rq.cqp, &ccp,
|
||||
&c->rq.cq);
|
||||
if (err)
|
||||
goto err_close_xdp_tx_cqs;
|
||||
goto err_close_xdpredirect_sq;
|
||||
|
||||
err = c->xdp ? mlx5e_open_cq(c->mdev, params->tx_cq_moderation, &cparam->xdp_sq.cqp,
|
||||
&ccp, &c->rq_xdpsq.cq) : 0;
|
||||
@@ -2516,7 +2558,7 @@ static int mlx5e_open_queues(struct mlx5e_channel *c,
|
||||
err = mlx5e_open_icosq(c, params, &cparam->async_icosq, &c->async_icosq,
|
||||
mlx5e_async_icosq_err_cqe_work);
|
||||
if (err)
|
||||
goto err_close_xdpsq_cq;
|
||||
goto err_close_rq_xdpsq_cq;
|
||||
|
||||
mutex_init(&c->icosq_recovery_lock);
|
||||
|
||||
@@ -2540,16 +2582,8 @@ static int mlx5e_open_queues(struct mlx5e_channel *c,
|
||||
goto err_close_rq;
|
||||
}
|
||||
|
||||
err = mlx5e_open_xdpsq(c, params, &cparam->xdp_sq, NULL, &c->xdpsq, true);
|
||||
if (err)
|
||||
goto err_close_xdp_sq;
|
||||
|
||||
return 0;
|
||||
|
||||
err_close_xdp_sq:
|
||||
if (c->xdp)
|
||||
mlx5e_close_xdpsq(&c->rq_xdpsq);
|
||||
|
||||
err_close_rq:
|
||||
mlx5e_close_rq(&c->rq);
|
||||
|
||||
@@ -2562,15 +2596,16 @@ static int mlx5e_open_queues(struct mlx5e_channel *c,
|
||||
err_close_async_icosq:
|
||||
mlx5e_close_icosq(&c->async_icosq);
|
||||
|
||||
err_close_xdpsq_cq:
|
||||
err_close_rq_xdpsq_cq:
|
||||
if (c->xdp)
|
||||
mlx5e_close_cq(&c->rq_xdpsq.cq);
|
||||
|
||||
err_close_rx_cq:
|
||||
mlx5e_close_cq(&c->rq.cq);
|
||||
|
||||
err_close_xdp_tx_cqs:
|
||||
mlx5e_close_cq(&c->xdpsq.cq);
|
||||
err_close_xdpredirect_sq:
|
||||
if (c->xdpsq)
|
||||
mlx5e_close_xdpredirect_sq(c->xdpsq);
|
||||
|
||||
err_close_tx_cqs:
|
||||
mlx5e_close_tx_cqs(c);
|
||||
@@ -2586,7 +2621,6 @@ static int mlx5e_open_queues(struct mlx5e_channel *c,
|
||||
|
||||
static void mlx5e_close_queues(struct mlx5e_channel *c)
|
||||
{
|
||||
mlx5e_close_xdpsq(&c->xdpsq);
|
||||
if (c->xdp)
|
||||
mlx5e_close_xdpsq(&c->rq_xdpsq);
|
||||
/* The same ICOSQ is used for UMRs for both RQ and XSKRQ. */
|
||||
@@ -2599,7 +2633,8 @@ static void mlx5e_close_queues(struct mlx5e_channel *c)
|
||||
if (c->xdp)
|
||||
mlx5e_close_cq(&c->rq_xdpsq.cq);
|
||||
mlx5e_close_cq(&c->rq.cq);
|
||||
mlx5e_close_cq(&c->xdpsq.cq);
|
||||
if (c->xdpsq)
|
||||
mlx5e_close_xdpredirect_sq(c->xdpsq);
|
||||
mlx5e_close_tx_cqs(c);
|
||||
mlx5e_close_cq(&c->icosq.cq);
|
||||
mlx5e_close_cq(&c->async_icosq.cq);
|
||||
|
||||
@@ -600,7 +600,8 @@ mlx5e_add_sqs_fwd_rules(struct mlx5e_priv *priv)
|
||||
if (c->xdp)
|
||||
sqs[num_sqs++] = c->rq_xdpsq.sqn;
|
||||
|
||||
sqs[num_sqs++] = c->xdpsq.sqn;
|
||||
if (c->xdpsq)
|
||||
sqs[num_sqs++] = c->xdpsq->sqn;
|
||||
}
|
||||
}
|
||||
if (ptp_sq) {
|
||||
|
||||
@@ -165,7 +165,8 @@ int mlx5e_napi_poll(struct napi_struct *napi, int budget)
|
||||
if (unlikely(!budget))
|
||||
goto out;
|
||||
|
||||
busy |= mlx5e_poll_xdpsq_cq(&c->xdpsq.cq);
|
||||
if (c->xdpsq)
|
||||
busy |= mlx5e_poll_xdpsq_cq(&c->xdpsq->cq);
|
||||
|
||||
if (c->xdp)
|
||||
busy |= mlx5e_poll_xdpsq_cq(&c->rq_xdpsq.cq);
|
||||
@@ -236,7 +237,8 @@ int mlx5e_napi_poll(struct napi_struct *napi, int budget)
|
||||
mlx5e_cq_arm(&rq->cq);
|
||||
mlx5e_cq_arm(&c->icosq.cq);
|
||||
mlx5e_cq_arm(&c->async_icosq.cq);
|
||||
mlx5e_cq_arm(&c->xdpsq.cq);
|
||||
if (c->xdpsq)
|
||||
mlx5e_cq_arm(&c->xdpsq->cq);
|
||||
|
||||
if (xsk_open) {
|
||||
mlx5e_handle_rx_dim(xskrq);
|
||||
|
||||
@@ -951,6 +951,9 @@ static int esw_qos_devlink_rate_to_mbps(struct mlx5_core_dev *mdev, const char *
|
||||
|
||||
int mlx5_esw_qos_init(struct mlx5_eswitch *esw)
|
||||
{
|
||||
if (esw->qos.domain)
|
||||
return 0; /* Nothing to change. */
|
||||
|
||||
return esw_qos_domain_init(esw);
|
||||
}
|
||||
|
||||
|
||||
@@ -1485,7 +1485,7 @@ int mlx5_eswitch_enable_locked(struct mlx5_eswitch *esw, int num_vfs)
|
||||
|
||||
err = mlx5_esw_qos_init(esw);
|
||||
if (err)
|
||||
goto err_qos_init;
|
||||
goto err_esw_init;
|
||||
|
||||
if (esw->mode == MLX5_ESWITCH_LEGACY) {
|
||||
err = esw_legacy_enable(esw);
|
||||
@@ -1495,7 +1495,7 @@ int mlx5_eswitch_enable_locked(struct mlx5_eswitch *esw, int num_vfs)
|
||||
}
|
||||
|
||||
if (err)
|
||||
goto err_esw_enable;
|
||||
goto err_esw_init;
|
||||
|
||||
esw->fdb_table.flags |= MLX5_ESW_FDB_CREATED;
|
||||
|
||||
@@ -1509,9 +1509,7 @@ int mlx5_eswitch_enable_locked(struct mlx5_eswitch *esw, int num_vfs)
|
||||
|
||||
return 0;
|
||||
|
||||
err_esw_enable:
|
||||
mlx5_esw_qos_cleanup(esw);
|
||||
err_qos_init:
|
||||
err_esw_init:
|
||||
mlx5_eq_notifier_unregister(esw->dev, &esw->nb);
|
||||
mlx5_esw_acls_ns_cleanup(esw);
|
||||
return err;
|
||||
@@ -1640,7 +1638,6 @@ void mlx5_eswitch_disable_locked(struct mlx5_eswitch *esw)
|
||||
|
||||
if (esw->mode == MLX5_ESWITCH_OFFLOADS)
|
||||
devl_rate_nodes_destroy(devlink);
|
||||
mlx5_esw_qos_cleanup(esw);
|
||||
}
|
||||
|
||||
void mlx5_eswitch_disable(struct mlx5_eswitch *esw)
|
||||
@@ -1884,6 +1881,11 @@ int mlx5_eswitch_init(struct mlx5_core_dev *dev)
|
||||
if (err)
|
||||
goto reps_err;
|
||||
|
||||
esw->mode = MLX5_ESWITCH_LEGACY;
|
||||
err = mlx5_esw_qos_init(esw);
|
||||
if (err)
|
||||
goto reps_err;
|
||||
|
||||
mutex_init(&esw->offloads.encap_tbl_lock);
|
||||
hash_init(esw->offloads.encap_tbl);
|
||||
mutex_init(&esw->offloads.decap_tbl_lock);
|
||||
@@ -1897,7 +1899,6 @@ int mlx5_eswitch_init(struct mlx5_core_dev *dev)
|
||||
refcount_set(&esw->qos.refcnt, 0);
|
||||
|
||||
esw->enabled_vports = 0;
|
||||
esw->mode = MLX5_ESWITCH_LEGACY;
|
||||
esw->offloads.inline_mode = MLX5_INLINE_MODE_NONE;
|
||||
if (MLX5_CAP_ESW_FLOWTABLE_FDB(dev, reformat) &&
|
||||
MLX5_CAP_ESW_FLOWTABLE_FDB(dev, decap))
|
||||
@@ -1934,6 +1935,7 @@ void mlx5_eswitch_cleanup(struct mlx5_eswitch *esw)
|
||||
|
||||
esw_info(esw->dev, "cleanup\n");
|
||||
|
||||
mlx5_esw_qos_cleanup(esw);
|
||||
destroy_workqueue(esw->work_queue);
|
||||
WARN_ON(refcount_read(&esw->qos.refcnt));
|
||||
mutex_destroy(&esw->state_lock);
|
||||
|
||||
@@ -37,7 +37,7 @@
|
||||
#include <linux/mlx5/fs.h>
|
||||
#include <linux/rhashtable.h>
|
||||
#include <linux/llist.h>
|
||||
#include <steering/fs_dr.h>
|
||||
#include <steering/sws/fs_dr.h>
|
||||
|
||||
#define FDB_TC_MAX_CHAIN 3
|
||||
#define FDB_FT_CHAIN (FDB_TC_MAX_CHAIN + 1)
|
||||
|
||||
@@ -4,8 +4,8 @@
|
||||
#ifndef __MLX5_LIB_SMFS_H__
|
||||
#define __MLX5_LIB_SMFS_H__
|
||||
|
||||
#include "steering/mlx5dr.h"
|
||||
#include "steering/dr_types.h"
|
||||
#include "steering/sws/mlx5dr.h"
|
||||
#include "steering/sws/dr_types.h"
|
||||
|
||||
struct mlx5dr_matcher *
|
||||
mlx5_smfs_matcher_create(struct mlx5dr_table *table, u32 priority, struct mlx5_flow_spec *spec);
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
// SPDX-License-Identifier: GPL-2.0 OR Linux-OpenIB
|
||||
/* Copyright (c) 2024 NVIDIA Corporation & Affiliates */
|
||||
|
||||
#include "mlx5hws_internal.h"
|
||||
#include "internal.h"
|
||||
|
||||
#define MLX5HWS_ACTION_METER_INIT_COLOR_OFFSET 1
|
||||
|
||||
@@ -1,8 +1,8 @@
|
||||
/* SPDX-License-Identifier: GPL-2.0 OR Linux-OpenIB */
|
||||
/* Copyright (c) 2024 NVIDIA Corporation & Affiliates */
|
||||
|
||||
#ifndef MLX5HWS_ACTION_H_
|
||||
#define MLX5HWS_ACTION_H_
|
||||
#ifndef HWS_ACTION_H_
|
||||
#define HWS_ACTION_H_
|
||||
|
||||
/* Max number of STEs needed for a rule (including match) */
|
||||
#define MLX5HWS_ACTION_MAX_STE 20
|
||||
@@ -304,4 +304,4 @@ mlx5hws_action_apply_setter(struct mlx5hws_actions_apply_data *apply,
|
||||
htonl(num_of_actions << 29);
|
||||
}
|
||||
|
||||
#endif /* MLX5HWS_ACTION_H_ */
|
||||
#endif /* HWS_ACTION_H_ */
|
||||
@@ -1,8 +1,8 @@
|
||||
// SPDX-License-Identifier: GPL-2.0 OR Linux-OpenIB
|
||||
/* Copyright (c) 2024 NVIDIA Corporation & Affiliates */
|
||||
|
||||
#include "mlx5hws_internal.h"
|
||||
#include "mlx5hws_buddy.h"
|
||||
#include "internal.h"
|
||||
#include "buddy.h"
|
||||
|
||||
static int hws_buddy_init(struct mlx5hws_buddy_mem *buddy, u32 max_order)
|
||||
{
|
||||
@@ -1,8 +1,8 @@
|
||||
/* SPDX-License-Identifier: GPL-2.0 OR Linux-OpenIB */
|
||||
/* Copyright (c) 2024 NVIDIA Corporation & Affiliates */
|
||||
|
||||
#ifndef MLX5HWS_BUDDY_H_
|
||||
#define MLX5HWS_BUDDY_H_
|
||||
#ifndef HWS_BUDDY_H_
|
||||
#define HWS_BUDDY_H_
|
||||
|
||||
struct mlx5hws_buddy_mem {
|
||||
unsigned long **bitmap;
|
||||
@@ -18,4 +18,4 @@ int mlx5hws_buddy_alloc_mem(struct mlx5hws_buddy_mem *buddy, u32 order);
|
||||
|
||||
void mlx5hws_buddy_free_mem(struct mlx5hws_buddy_mem *buddy, u32 seg, u32 order);
|
||||
|
||||
#endif /* MLX5HWS_BUDDY_H_ */
|
||||
#endif /* HWS_BUDDY_H_ */
|
||||
@@ -1,7 +1,7 @@
|
||||
// SPDX-License-Identifier: GPL-2.0 OR Linux-OpenIB
|
||||
/* Copyright (c) 2024 NVIDIA Corporation & Affiliates */
|
||||
|
||||
#include "mlx5hws_internal.h"
|
||||
#include "internal.h"
|
||||
|
||||
static u16 hws_bwc_gen_queue_idx(struct mlx5hws_context *ctx)
|
||||
{
|
||||
@@ -1,8 +1,8 @@
|
||||
/* SPDX-License-Identifier: GPL-2.0 OR Linux-OpenIB */
|
||||
/* Copyright (c) 2024 NVIDIA Corporation & Affiliates */
|
||||
|
||||
#ifndef MLX5HWS_BWC_H_
|
||||
#define MLX5HWS_BWC_H_
|
||||
#ifndef HWS_BWC_H_
|
||||
#define HWS_BWC_H_
|
||||
|
||||
#define MLX5HWS_BWC_MATCHER_INIT_SIZE_LOG 1
|
||||
#define MLX5HWS_BWC_MATCHER_SIZE_LOG_STEP 1
|
||||
@@ -70,4 +70,4 @@ static inline u16 mlx5hws_bwc_get_queue_id(struct mlx5hws_context *ctx, u16 idx)
|
||||
return idx + mlx5hws_bwc_queues(ctx);
|
||||
}
|
||||
|
||||
#endif /* MLX5HWS_BWC_H_ */
|
||||
#endif /* HWS_BWC_H_ */
|
||||
@@ -1,7 +1,7 @@
|
||||
// SPDX-License-Identifier: GPL-2.0 OR Linux-OpenIB
|
||||
/* Copyright (c) 2024 NVIDIA Corporation & Affiliates */
|
||||
|
||||
#include "mlx5hws_internal.h"
|
||||
#include "internal.h"
|
||||
|
||||
bool mlx5hws_bwc_match_params_is_complex(struct mlx5hws_context *ctx,
|
||||
u8 match_criteria_enable,
|
||||
@@ -1,8 +1,8 @@
|
||||
/* SPDX-License-Identifier: GPL-2.0 OR Linux-OpenIB */
|
||||
/* Copyright (c) 2024 NVIDIA Corporation & Affiliates */
|
||||
|
||||
#ifndef MLX5HWS_BWC_COMPLEX_H_
|
||||
#define MLX5HWS_BWC_COMPLEX_H_
|
||||
#ifndef HWS_BWC_COMPLEX_H_
|
||||
#define HWS_BWC_COMPLEX_H_
|
||||
|
||||
bool mlx5hws_bwc_match_params_is_complex(struct mlx5hws_context *ctx,
|
||||
u8 match_criteria_enable,
|
||||
@@ -26,4 +26,4 @@ int mlx5hws_bwc_rule_create_complex(struct mlx5hws_bwc_rule *bwc_rule,
|
||||
|
||||
int mlx5hws_bwc_rule_destroy_complex(struct mlx5hws_bwc_rule *bwc_rule);
|
||||
|
||||
#endif /* MLX5HWS_BWC_COMPLEX_H_ */
|
||||
#endif /* HWS_BWC_COMPLEX_H_ */
|
||||
@@ -1,7 +1,7 @@
|
||||
// SPDX-License-Identifier: GPL-2.0 OR Linux-OpenIB
|
||||
/* Copyright (c) 2024 NVIDIA Corporation & Affiliates */
|
||||
|
||||
#include "mlx5hws_internal.h"
|
||||
#include "internal.h"
|
||||
|
||||
static enum mlx5_ifc_flow_destination_type
|
||||
hws_cmd_dest_type_to_ifc_dest_type(enum mlx5_flow_destination_type type)
|
||||
@@ -1,8 +1,8 @@
|
||||
/* SPDX-License-Identifier: GPL-2.0 OR Linux-OpenIB */
|
||||
/* Copyright (c) 2024 NVIDIA Corporation & Affiliates */
|
||||
|
||||
#ifndef MLX5HWS_CMD_H_
|
||||
#define MLX5HWS_CMD_H_
|
||||
#ifndef HWS_CMD_H_
|
||||
#define HWS_CMD_H_
|
||||
|
||||
#define WIRE_PORT 0xFFFF
|
||||
|
||||
@@ -358,4 +358,4 @@ int mlx5hws_cmd_allow_other_vhca_access(struct mlx5_core_dev *mdev,
|
||||
int mlx5hws_cmd_query_gvmi(struct mlx5_core_dev *mdev, bool other_function,
|
||||
u16 vport_number, u16 *gvmi);
|
||||
|
||||
#endif /* MLX5HWS_CMD_H_ */
|
||||
#endif /* HWS_CMD_H_ */
|
||||
@@ -1,7 +1,7 @@
|
||||
// SPDX-License-Identifier: GPL-2.0 OR Linux-OpenIB
|
||||
/* Copyright (c) 2024 NVIDIA CORPORATION. All rights reserved. */
|
||||
|
||||
#include "mlx5hws_internal.h"
|
||||
#include "internal.h"
|
||||
|
||||
bool mlx5hws_context_cap_dynamic_reparse(struct mlx5hws_context *ctx)
|
||||
{
|
||||
@@ -1,8 +1,8 @@
|
||||
/* SPDX-License-Identifier: GPL-2.0 OR Linux-OpenIB */
|
||||
/* Copyright (c) 2024 NVIDIA Corporation & Affiliates */
|
||||
|
||||
#ifndef MLX5HWS_CONTEXT_H_
|
||||
#define MLX5HWS_CONTEXT_H_
|
||||
#ifndef HWS_CONTEXT_H_
|
||||
#define HWS_CONTEXT_H_
|
||||
|
||||
enum mlx5hws_context_flags {
|
||||
MLX5HWS_CONTEXT_FLAG_HWS_SUPPORT = 1 << 0,
|
||||
@@ -62,4 +62,4 @@ bool mlx5hws_context_cap_dynamic_reparse(struct mlx5hws_context *ctx);
|
||||
|
||||
u8 mlx5hws_context_get_reparse_mode(struct mlx5hws_context *ctx);
|
||||
|
||||
#endif /* MLX5HWS_CONTEXT_H_ */
|
||||
#endif /* HWS_CONTEXT_H_ */
|
||||
@@ -5,7 +5,7 @@
|
||||
#include <linux/kernel.h>
|
||||
#include <linux/seq_file.h>
|
||||
#include <linux/version.h>
|
||||
#include "mlx5hws_internal.h"
|
||||
#include "internal.h"
|
||||
|
||||
static int
|
||||
hws_debug_dump_matcher_template_definer(struct seq_file *f,
|
||||
@@ -1,8 +1,8 @@
|
||||
/* SPDX-License-Identifier: GPL-2.0 OR Linux-OpenIB */
|
||||
/* Copyright (c) 2024 NVIDIA Corporation & Affiliates */
|
||||
|
||||
#ifndef MLX5HWS_DEBUG_H_
|
||||
#define MLX5HWS_DEBUG_H_
|
||||
#ifndef HWS_DEBUG_H_
|
||||
#define HWS_DEBUG_H_
|
||||
|
||||
#define HWS_DEBUG_FORMAT_VERSION "1.0"
|
||||
|
||||
@@ -37,4 +37,4 @@ mlx5hws_debug_icm_to_idx(u64 icm_addr)
|
||||
void mlx5hws_debug_init_dump(struct mlx5hws_context *ctx);
|
||||
void mlx5hws_debug_uninit_dump(struct mlx5hws_context *ctx);
|
||||
|
||||
#endif /* MLX5HWS_DEBUG_H_ */
|
||||
#endif /* HWS_DEBUG_H_ */
|
||||
@@ -1,7 +1,7 @@
|
||||
// SPDX-License-Identifier: GPL-2.0 OR Linux-OpenIB
|
||||
/* Copyright (c) 2024 NVIDIA Corporation & Affiliates */
|
||||
|
||||
#include "mlx5hws_internal.h"
|
||||
#include "internal.h"
|
||||
|
||||
/* Pattern tunnel Layer bits. */
|
||||
#define MLX5_FLOW_LAYER_VXLAN BIT(12)
|
||||
@@ -1,8 +1,8 @@
|
||||
/* SPDX-License-Identifier: GPL-2.0 OR Linux-OpenIB */
|
||||
/* Copyright (c) 2024 NVIDIA Corporation & Affiliates */
|
||||
|
||||
#ifndef MLX5HWS_DEFINER_H_
|
||||
#define MLX5HWS_DEFINER_H_
|
||||
#ifndef HWS_DEFINER_H_
|
||||
#define HWS_DEFINER_H_
|
||||
|
||||
/* Max available selecotrs */
|
||||
#define DW_SELECTORS 9
|
||||
@@ -831,4 +831,4 @@ mlx5hws_definer_conv_match_params_to_compressed_fc(struct mlx5hws_context *ctx,
|
||||
u32 *match_param,
|
||||
int *fc_sz);
|
||||
|
||||
#endif /* MLX5HWS_DEFINER_H_ */
|
||||
#endif /* HWS_DEFINER_H_ */
|
||||
@@ -1,8 +1,8 @@
|
||||
/* SPDX-License-Identifier: GPL-2.0 OR Linux-OpenIB */
|
||||
/* Copyright (c) 2024 NVIDIA Corporation & Affiliates */
|
||||
|
||||
#ifndef MLX5HWS_INTERNAL_H_
|
||||
#define MLX5HWS_INTERNAL_H_
|
||||
#ifndef HWS_INTERNAL_H_
|
||||
#define HWS_INTERNAL_H_
|
||||
|
||||
#include <linux/mlx5/transobj.h>
|
||||
#include <linux/mlx5/vport.h>
|
||||
@@ -10,22 +10,22 @@
|
||||
#include "wq.h"
|
||||
#include "lib/mlx5.h"
|
||||
|
||||
#include "mlx5hws_prm.h"
|
||||
#include "prm.h"
|
||||
#include "mlx5hws.h"
|
||||
#include "mlx5hws_pool.h"
|
||||
#include "mlx5hws_vport.h"
|
||||
#include "mlx5hws_context.h"
|
||||
#include "mlx5hws_table.h"
|
||||
#include "mlx5hws_send.h"
|
||||
#include "mlx5hws_rule.h"
|
||||
#include "mlx5hws_cmd.h"
|
||||
#include "mlx5hws_action.h"
|
||||
#include "mlx5hws_definer.h"
|
||||
#include "mlx5hws_matcher.h"
|
||||
#include "mlx5hws_debug.h"
|
||||
#include "mlx5hws_pat_arg.h"
|
||||
#include "mlx5hws_bwc.h"
|
||||
#include "mlx5hws_bwc_complex.h"
|
||||
#include "pool.h"
|
||||
#include "vport.h"
|
||||
#include "context.h"
|
||||
#include "table.h"
|
||||
#include "send.h"
|
||||
#include "rule.h"
|
||||
#include "cmd.h"
|
||||
#include "action.h"
|
||||
#include "definer.h"
|
||||
#include "matcher.h"
|
||||
#include "debug.h"
|
||||
#include "pat_arg.h"
|
||||
#include "bwc.h"
|
||||
#include "bwc_complex.h"
|
||||
|
||||
#define W_SIZE 2
|
||||
#define DW_SIZE 4
|
||||
@@ -56,4 +56,4 @@ static inline unsigned long align(unsigned long val, unsigned long align)
|
||||
return (val + align - 1) & ~(align - 1);
|
||||
}
|
||||
|
||||
#endif /* MLX5HWS_INTERNAL_H_ */
|
||||
#endif /* HWS_INTERNAL_H_ */
|
||||
@@ -1,7 +1,7 @@
|
||||
// SPDX-License-Identifier: GPL-2.0 OR Linux-OpenIB
|
||||
/* Copyright (c) 2024 NVIDIA Corporation & Affiliates */
|
||||
|
||||
#include "mlx5hws_internal.h"
|
||||
#include "internal.h"
|
||||
|
||||
enum mlx5hws_matcher_rtc_type {
|
||||
HWS_MATCHER_RTC_TYPE_MATCH,
|
||||
@@ -1,8 +1,8 @@
|
||||
/* SPDX-License-Identifier: GPL-2.0 OR Linux-OpenIB */
|
||||
/* Copyright (c) 2024 NVIDIA Corporation & Affiliates */
|
||||
|
||||
#ifndef MLX5HWS_MATCHER_H_
|
||||
#define MLX5HWS_MATCHER_H_
|
||||
#ifndef HWS_MATCHER_H_
|
||||
#define HWS_MATCHER_H_
|
||||
|
||||
/* We calculated that concatenating a collision table to the main table with
|
||||
* 3% of the main table rows will be enough resources for high insertion
|
||||
@@ -104,4 +104,4 @@ static inline bool mlx5hws_matcher_is_insert_by_idx(struct mlx5hws_matcher *matc
|
||||
return matcher->attr.insert_mode == MLX5HWS_MATCHER_INSERT_BY_INDEX;
|
||||
}
|
||||
|
||||
#endif /* MLX5HWS_MATCHER_H_ */
|
||||
#endif /* HWS_MATCHER_H_ */
|
||||
@@ -1,7 +1,7 @@
|
||||
// SPDX-License-Identifier: GPL-2.0 OR Linux-OpenIB
|
||||
/* Copyright (c) 2024 NVIDIA Corporation & Affiliates */
|
||||
|
||||
#include "mlx5hws_internal.h"
|
||||
#include "internal.h"
|
||||
|
||||
enum mlx5hws_arg_chunk_size
|
||||
mlx5hws_arg_data_size_to_arg_log_size(u16 data_size)
|
||||
@@ -1,8 +1,8 @@
|
||||
// SPDX-License-Identifier: GPL-2.0 OR Linux-OpenIB
|
||||
/* Copyright (c) 2024 NVIDIA Corporation & Affiliates */
|
||||
|
||||
#include "mlx5hws_internal.h"
|
||||
#include "mlx5hws_buddy.h"
|
||||
#include "internal.h"
|
||||
#include "buddy.h"
|
||||
|
||||
static void hws_pool_free_one_resource(struct mlx5hws_pool_resource *resource)
|
||||
{
|
||||
@@ -1,7 +1,7 @@
|
||||
// SPDX-License-Identifier: GPL-2.0 OR Linux-OpenIB
|
||||
/* Copyright (c) 2024 NVIDIA Corporation & Affiliates */
|
||||
|
||||
#include "mlx5hws_internal.h"
|
||||
#include "internal.h"
|
||||
|
||||
static void hws_rule_skip(struct mlx5hws_matcher *matcher,
|
||||
struct mlx5hws_match_template *mt,
|
||||
@@ -1,7 +1,7 @@
|
||||
// SPDX-License-Identifier: GPL-2.0 OR Linux-OpenIB
|
||||
/* Copyright (c) 2024 NVIDIA Corporation & Affiliates */
|
||||
|
||||
#include "mlx5hws_internal.h"
|
||||
#include "internal.h"
|
||||
#include "lib/clock.h"
|
||||
|
||||
enum { CQ_OK = 0, CQ_EMPTY = -1, CQ_POLL_ERR = -2 };
|
||||
@@ -1,7 +1,7 @@
|
||||
// SPDX-License-Identifier: GPL-2.0 OR Linux-OpenIB
|
||||
/* Copyright (c) 2024 NVIDIA Corporation & Affiliates */
|
||||
|
||||
#include "mlx5hws_internal.h"
|
||||
#include "internal.h"
|
||||
|
||||
u32 mlx5hws_table_get_id(struct mlx5hws_table *tbl)
|
||||
{
|
||||
@@ -1,7 +1,7 @@
|
||||
// SPDX-License-Identifier: GPL-2.0 OR Linux-OpenIB
|
||||
/* Copyright (c) 2024 NVIDIA Corporation & Affiliates */
|
||||
|
||||
#include "mlx5hws_internal.h"
|
||||
#include "internal.h"
|
||||
|
||||
int mlx5hws_vport_init_vports(struct mlx5hws_context *ctx)
|
||||
{
|
||||
Reference in New Issue
Block a user