Re: [PATCH net-next 09/13] net/mlx5e: psp: Add an rx_decap steering table

Cosmin Ratiu <[email protected]>
Newsgroups org.kernel.vger.linux-kselftest,org.kernel.vger.linux-kernel,org.kernel.vger.linux-rdma,org.kernel.vger.netdev
Message-ID <[email protected]>
On Fri, 2026-07-31 at 08:41 -0400, Daniel Zahka wrote:
> 
> 
> On 7/30/26 5:17 AM, Tariq Toukan wrote:
> > +static
> > +void accel_psp_fs_rx_decap_ft_destroy(struct mlx5e_psp_fs *fs,
> > +				      struct
> > mlx5e_psp_rx_decap_table *decap)
> > +{
> > +	int i;
> > +
> > +	accel_psp_fs_del_flow_rule(&decap->unsupported_rule);
> > +	for (i = 0; i < MLX5E_PSP_NUM_SUPPORTED_VERSIONS; i++)
> > +		accel_psp_fs_del_flow_rule(&decap->rule[i]);
> > +	if (decap->reformat) {
> > +		mlx5_packet_reformat_dealloc(fs->mdev, decap-
> > >reformat);
> > +		decap->reformat = NULL;
> > +	}
> > +	accel_psp_fs_dealloc_modify_hdr(fs->mdev, &decap-
> > >modify_hdr);
> > +	accel_psp_fs_destroy_flow_group(&decap->drop_group);
> > +	accel_psp_fs_destroy_ft(&decap->ft);
> > +}
> > +
> 
> [...]
> > +static int accel_psp_fs_rx_reconfigure(struct mlx5e_psp_fs *fs,
> > +				       bool decap_wanted)
> > +{
> > +	bool decap_supported =
> > +		MLX5_CAP_FLOWTABLE(fs->mdev,
> > +				  
> > flow_table_properties_nic_receive.reformat_del_psp_transport);
> > +	bool decap_enable = decap_wanted && decap_supported;
> > +	struct mlx5_flow_destination dest = {};
> > +	int err;
> > +
> > +	/* Create the decap table if needed. */
> > +	if (decap_enable && !fs->decap.ft) {
> > +		err = accel_psp_fs_rx_decap_ft_create(fs, &fs-
> > >decap);
> > +		if (err) {
> > +			mlx5_core_warn(fs->mdev,
> > +				       "Failed to create PSP
> > decapsulation rules (err %d), HW GRO for PSP unavailable",
> > +				       err);
> > +			decap_enable = false;
> > +		}
> > +	}
> > +	if (decap_enable == fs->decap_enabled)
> > +		return 0;
> 
> An llm is complaining that fs->decap_enabled is not set to false when
> the decap table is destroyed with accel_psp_fs_rx_decap_ft_destroy(),
> which would cause problems after doing a psp_dev_ops::set_config()
> down 
> and up.
> 
> I'm not sure if this is legit, but figured I would flag it as it
> seems 
> plausible and would be easily reachable by a user.

This is a legit issue, one that me and our llms missed.
Thanks for spotting and reporting it.

Will be fixed in the next version.

Cosmin.
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.