net/qede: fix Rx/Tx offload flags
authorShahed Shaikh <shahed.shaikh@cavium.com>
Thu, 28 Jun 2018 06:01:58 +0000 (23:01 -0700)
committerFerruh Yigit <ferruh.yigit@intel.com>
Mon, 2 Jul 2018 23:35:58 +0000 (01:35 +0200)
 - We don't support QinQ offload, so removing it now.
 - Fix incorrect offload flags in default rxconf
   Since qede PMD does not support per queue rx offload, it
   should not set default_rxconf.offload flags in .dev_infos_get().
   Although these offloads are enabled by default, they are per port
   and not per queue.

Fixes: 946dfd18a4ec ("net/qede: convert to new Rx/Tx offloads API")
Cc: stable@dpdk.org
Signed-off-by: Shahed Shaikh <shahed.shaikh@cavium.com>
drivers/net/qede/qede_ethdev.c
drivers/net/qede/qede_rxtx.c
drivers/net/qede/qede_rxtx.h

index 68c8c89..8760527 100644 (file)
@@ -1568,7 +1568,6 @@ qede_dev_info_get(struct rte_eth_dev *eth_dev,
                                     DEV_TX_OFFLOAD_UDP_CKSUM   |
                                     DEV_TX_OFFLOAD_TCP_CKSUM   |
                                     DEV_TX_OFFLOAD_OUTER_IPV4_CKSUM |
-                                    DEV_TX_OFFLOAD_QINQ_INSERT |
                                     DEV_TX_OFFLOAD_MULTI_SEGS  |
                                     DEV_TX_OFFLOAD_TCP_TSO     |
                                     DEV_TX_OFFLOAD_VXLAN_TNL_TSO |
@@ -1582,11 +1581,7 @@ qede_dev_info_get(struct rte_eth_dev *eth_dev,
        dev_info->default_rxconf = (struct rte_eth_rxconf) {
                /* Packets are always dropped if no descriptors are available */
                .rx_drop_en = 1,
-               /* The below RX offloads are always enabled */
-               .offloads = (DEV_RX_OFFLOAD_CRC_STRIP  |
-                            DEV_RX_OFFLOAD_IPV4_CKSUM |
-                            DEV_RX_OFFLOAD_TCP_CKSUM  |
-                            DEV_RX_OFFLOAD_UDP_CKSUM),
+               .offloads = 0,
        };
 
        memset(&link, 0, sizeof(struct qed_link_output));
index 4fa1c61..174e377 100644 (file)
@@ -1971,7 +1971,7 @@ qede_xmit_pkts(void *p_txq, struct rte_mbuf **tx_pkts, uint16_t nb_pkts)
                }
 
                /* Descriptor based VLAN insertion */
-               if (tx_ol_flags & (PKT_TX_VLAN_PKT | PKT_TX_QINQ_PKT)) {
+               if (tx_ol_flags & PKT_TX_VLAN_PKT) {
                        vlan = rte_cpu_to_le_16(mbuf->vlan_tci);
                        bd1_bd_flags_bf |=
                            1 << ETH_TX_1ST_BD_FLAGS_VLAN_INSERTION_SHIFT;
index 84a834d..37cab7e 100644 (file)
                                   PKT_TX_TCP_SEG)
 
 #define QEDE_TX_OFFLOAD_MASK (QEDE_TX_CSUM_OFFLOAD_MASK | \
-                             PKT_TX_QINQ_PKT           | \
                              PKT_TX_VLAN_PKT           | \
                              PKT_TX_TUNNEL_VXLAN       | \
                              PKT_TX_TUNNEL_GENEVE      | \