Skip to content

Commit 03a283c

Browse files
Paul Blakeykuba-moo
authored andcommitted
net/mlx5: Kconfig: Make tc offload depend on tc skb extension
Tc skb extension is a basic requirement for using tc offload to support correct restoration on action miss. Depend on it. Signed-off-by: Paul Blakey <[email protected]> Signed-off-by: Jakub Kicinski <[email protected]>
1 parent 606c7c4 commit 03a283c

File tree

5 files changed

+2
-15
lines changed

5 files changed

+2
-15
lines changed

drivers/net/ethernet/mellanox/mlx5/core/Kconfig

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -85,7 +85,7 @@ config MLX5_BRIDGE
8585

8686
config MLX5_CLS_ACT
8787
bool "MLX5 TC classifier action support"
88-
depends on MLX5_ESWITCH && NET_CLS_ACT
88+
depends on MLX5_ESWITCH && NET_CLS_ACT && NET_TC_SKB_EXT
8989
default y
9090
help
9191
mlx5 ConnectX offloads support for TC classifier action (NET_CLS_ACT),
@@ -100,7 +100,7 @@ config MLX5_CLS_ACT
100100

101101
config MLX5_TC_CT
102102
bool "MLX5 TC connection tracking offload support"
103-
depends on MLX5_CLS_ACT && NF_FLOW_TABLE && NET_ACT_CT && NET_TC_SKB_EXT
103+
depends on MLX5_CLS_ACT && NF_FLOW_TABLE && NET_ACT_CT
104104
default y
105105
help
106106
Say Y here if you want to support offloading connection tracking rules

drivers/net/ethernet/mellanox/mlx5/core/en/rep/tc.c

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -762,7 +762,6 @@ static bool mlx5e_restore_skb_chain(struct sk_buff *skb, u32 chain, u32 reg_c1,
762762
struct mlx5e_priv *priv = netdev_priv(skb->dev);
763763
u32 tunnel_id = (reg_c1 >> ESW_TUN_OFFSET) & TUNNEL_ID_MASK;
764764

765-
#if IS_ENABLED(CONFIG_NET_TC_SKB_EXT)
766765
if (chain) {
767766
struct mlx5_rep_uplink_priv *uplink_priv;
768767
struct mlx5e_rep_priv *uplink_rpriv;
@@ -784,7 +783,6 @@ static bool mlx5e_restore_skb_chain(struct sk_buff *skb, u32 chain, u32 reg_c1,
784783
zone_restore_id))
785784
return false;
786785
}
787-
#endif /* CONFIG_NET_TC_SKB_EXT */
788786

789787
return mlx5e_restore_tunnel(priv, skb, tc_priv, tunnel_id);
790788
}

drivers/net/ethernet/mellanox/mlx5/core/en/tc_ct.c

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -2078,13 +2078,6 @@ mlx5_tc_ct_init_check_support(struct mlx5e_priv *priv,
20782078
const char *err_msg = NULL;
20792079
int err = 0;
20802080

2081-
#if !IS_ENABLED(CONFIG_NET_TC_SKB_EXT)
2082-
/* cannot restore chain ID on HW miss */
2083-
2084-
err_msg = "tc skb extension missing";
2085-
err = -EOPNOTSUPP;
2086-
goto out_err;
2087-
#endif
20882081
if (IS_ERR_OR_NULL(post_act)) {
20892082
/* Ignore_flow_level support isn't supported by default for VFs and so post_act
20902083
* won't be supported. Skip showing error msg.

drivers/net/ethernet/mellanox/mlx5/core/en_tc.c

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5607,7 +5607,6 @@ int mlx5e_setup_tc_block_cb(enum tc_setup_type type, void *type_data,
56075607
bool mlx5e_tc_update_skb(struct mlx5_cqe64 *cqe,
56085608
struct sk_buff *skb)
56095609
{
5610-
#if IS_ENABLED(CONFIG_NET_TC_SKB_EXT)
56115610
u32 chain = 0, chain_tag, reg_b, zone_restore_id;
56125611
struct mlx5e_priv *priv = netdev_priv(skb->dev);
56135612
struct mlx5_mapped_obj mapped_obj;
@@ -5645,7 +5644,6 @@ bool mlx5e_tc_update_skb(struct mlx5_cqe64 *cqe,
56455644
netdev_dbg(priv->netdev, "Invalid mapped object type: %d\n", mapped_obj.type);
56465645
return false;
56475646
}
5648-
#endif /* CONFIG_NET_TC_SKB_EXT */
56495647

56505648
return true;
56515649
}

drivers/net/ethernet/mellanox/mlx5/core/en_tc.h

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -368,7 +368,6 @@ struct mlx5e_tc_table *mlx5e_tc_table_alloc(void);
368368
void mlx5e_tc_table_free(struct mlx5e_tc_table *tc);
369369
static inline bool mlx5e_cqe_regb_chain(struct mlx5_cqe64 *cqe)
370370
{
371-
#if IS_ENABLED(CONFIG_NET_TC_SKB_EXT)
372371
u32 chain, reg_b;
373372

374373
reg_b = be32_to_cpu(cqe->ft_metadata);
@@ -379,7 +378,6 @@ static inline bool mlx5e_cqe_regb_chain(struct mlx5_cqe64 *cqe)
379378
chain = reg_b & MLX5E_TC_TABLE_CHAIN_TAG_MASK;
380379
if (chain)
381380
return true;
382-
#endif
383381

384382
return false;
385383
}

0 commit comments

Comments
 (0)