Thread (30 messages) flat view 30 messages, 5 authors, 2021-01-26

Re: [net-next 09/15] net/mlx5e: CT: Support offload of +trk+new ct rules

From: Roi Dayan <hidden>
Date: 2021-01-10 07:56:52


On 2021-01-08 11:59 PM, Marcelo Ricardo Leitner wrote:
Hi,

On Thu, Jan 07, 2021 at 09:30:48PM -0800, Saeed Mahameed wrote:
quoted
@@ -1429,6 +1600,14 @@ mlx5_tc_ct_add_ft_cb(struct mlx5_tc_ct_priv *ct_priv, u16 zone,
  	if (err)
  		goto err_insert;
  
+	nf_ct_zone_init(&ctzone, zone, NF_CT_DEFAULT_ZONE_DIR, 0);
+	ft->tmpl = nf_ct_tmpl_alloc(&init_net, &ctzone, GFP_KERNEL);
I didn't test but I think this will add a hard dependency to
nf_conntrack_core and will cause conntrack to always be loaded by
mlx5_core, which is not good for some use cases.
nf_ct_tmpl_alloc() is defined in nf_conntrack_core.c.

762f926d6f19 ("net/sched: act_ct: Make tcf_ct_flow_table_restore_skb
inline") was done similarly to avoid this.
right. we will take a look what we can do with this.
thanks
quoted
+	if (!ft->tmpl)
+		goto err_tmpl;
+
+	__set_bit(IPS_CONFIRMED_BIT, &ft->tmpl->status);
+	nf_conntrack_get(&ft->tmpl->ct_general);
+
  	err = nf_flow_table_offload_add_cb(ft->nf_ft,
  					   mlx5_tc_ct_block_flow_offload, ft);
  	if (err)
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help