net/bonding: fix unicast packets filtering
authorDavid Marchand <david.marchand@redhat.com>
Wed, 10 Apr 2019 12:53:48 +0000 (14:53 +0200)
committerFerruh Yigit <ferruh.yigit@intel.com>
Thu, 22 Aug 2019 16:45:49 +0000 (18:45 +0200)
By default, the 802.3ad code enables promisc mode on all slaves.
To avoid all packets going to the application (unless the application
asked for promiscuous mode), all frames are supposed to be filtered in
the rx burst handler.

However the incriminated commit broke this because non pure ethernet
frames (basically any unicast Ether()/IP() packet) are not filtered
anymore.

Fixes: 71b7b37ec959 ("net/bonding: use ptype flags for LACP Rx filtering")
Cc: stable@dpdk.org
Signed-off-by: David Marchand <david.marchand@redhat.com>
Acked-by: Chas Williams <chas3@att.com>
drivers/net/bonding/rte_eth_bond_pmd.c

index 44af5ad..49e38f6 100644 (file)
@@ -304,13 +304,6 @@ rx_burst_8023ad(void *queue, struct rte_mbuf **bufs, uint16_t nb_pkts,
 
                /* Handle slow protocol packets. */
                while (j < num_rx_total) {
-
-                       /* If packet is not pure L2 and is known, skip it */
-                       if ((bufs[j]->packet_type & ~RTE_PTYPE_L2_ETHER) != 0) {
-                               j++;
-                               continue;
-                       }
-
                        if (j + 3 < num_rx_total)
                                rte_prefetch0(rte_pktmbuf_mtod(bufs[j + 3], void *));