net/cnxk: reset offload flag if reassembly is disabled

The rx offload flag need to be reset if IP reassembly flag
is not set while calling reassembly_conf_set.

Signed-off-by: Akhil Goyal <gakhil@marvell.com>
Acked-by: Jerin Jacob <jerinj@marvell.com>
This commit is contained in:
Akhil Goyal 2022-05-08 13:18:28 +05:30 committed by Jerin Jacob
parent 76e0dd1131
commit 4f3c07b73b

View File

@ -547,6 +547,12 @@ cn10k_nix_reassembly_conf_set(struct rte_eth_dev *eth_dev,
struct cnxk_eth_dev *dev = cnxk_eth_pmd_priv(eth_dev);
int rc = 0;
if (!conf->flags) {
/* Clear offload flags on disable */
dev->rx_offload_flags &= ~NIX_RX_REAS_F;
return 0;
}
rc = roc_nix_reassembly_configure(conf->timeout_ms,
conf->max_frags);
if (!rc && dev->rx_offloads & RTE_ETH_RX_OFFLOAD_SECURITY)