[v2,09/13] net/bnxt: disable VLAN filter when TF is enabled
Checks
Commit Message
From: Kishore Padmanabha <kishore.padmanabha@broadcom.com>
For p7 platform, the vlan filter and strip is disabled if the truflow
is enabled on the platform.
Signed-off-by: Kishore Padmanabha <kishore.padmanabha@broadcom.com>
Reviewed-by: Mike Baucom <michael.baucom@broadcom.com>
---
drivers/net/bnxt/bnxt_ethdev.c | 6 +++++-
drivers/net/bnxt/bnxt_rxq.c | 17 +++++++++++------
2 files changed, 16 insertions(+), 7 deletions(-)
@@ -2964,7 +2964,7 @@ bnxt_vlan_offload_set_op(struct rte_eth_dev *dev, int mask)
{
uint64_t rx_offloads = dev->data->dev_conf.rxmode.offloads;
struct bnxt *bp = dev->data->dev_private;
- int rc;
+ int rc = 0;
rc = is_bnxt_in_error(bp);
if (rc)
@@ -2974,6 +2974,10 @@ bnxt_vlan_offload_set_op(struct rte_eth_dev *dev, int mask)
if (!dev->data->dev_started)
return 0;
+ /* For P7 platform, cannot support if truflow is enabled */
+ if (BNXT_TRUFLOW_EN(bp) && BNXT_CHIP_P7(bp))
+ return rc;
+
if (mask & RTE_ETH_VLAN_FILTER_MASK) {
/* Enable or disable VLAN filtering */
rc = bnxt_config_vlan_hw_filter(bp, rx_offloads);
@@ -28,18 +28,23 @@ uint64_t bnxt_get_rx_port_offloads(struct bnxt *bp)
RTE_ETH_RX_OFFLOAD_UDP_CKSUM |
RTE_ETH_RX_OFFLOAD_TCP_CKSUM |
RTE_ETH_RX_OFFLOAD_KEEP_CRC |
- RTE_ETH_RX_OFFLOAD_VLAN_FILTER |
- RTE_ETH_RX_OFFLOAD_VLAN_EXTEND |
RTE_ETH_RX_OFFLOAD_SCATTER |
RTE_ETH_RX_OFFLOAD_RSS_HASH;
- if ((BNXT_CHIP_P7(bp) && !bnxt_compressed_rx_cqe_mode_enabled(bp)) ||
- BNXT_CHIP_P5(bp))
+ /* In P7 platform if truflow is enabled then vlan offload is disabled*/
+ if (!(BNXT_TRUFLOW_EN(bp) && BNXT_CHIP_P7(bp)))
+ rx_offload_capa |= (RTE_ETH_RX_OFFLOAD_VLAN_FILTER |
+ RTE_ETH_RX_OFFLOAD_VLAN_EXTEND);
+
+
+ if (!bnxt_compressed_rx_cqe_mode_enabled(bp))
rx_offload_capa |= RTE_ETH_RX_OFFLOAD_TCP_LRO;
if (bp->flags & BNXT_FLAG_PTP_SUPPORTED)
rx_offload_capa |= RTE_ETH_RX_OFFLOAD_TIMESTAMP;
- if (bp->vnic_cap_flags & BNXT_VNIC_CAP_VLAN_RX_STRIP)
- rx_offload_capa |= RTE_ETH_RX_OFFLOAD_VLAN_STRIP;
+ if (bp->vnic_cap_flags & BNXT_VNIC_CAP_VLAN_RX_STRIP) {
+ if (!(BNXT_TRUFLOW_EN(bp) && BNXT_CHIP_P7(bp)))
+ rx_offload_capa |= RTE_ETH_RX_OFFLOAD_VLAN_STRIP;
+ }
if (BNXT_TUNNELED_OFFLOADS_CAP_ALL_EN(bp))
rx_offload_capa |= RTE_ETH_RX_OFFLOAD_OUTER_IPV4_CKSUM |