From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-pa0-f50.google.com (mail-pa0-f50.google.com [209.85.220.50]) by dpdk.org (Postfix) with ESMTP id A1E148E82 for ; Mon, 19 Oct 2015 17:37:00 +0200 (CEST) Received: by pacfv9 with SMTP id fv9so98784882pac.3 for ; Mon, 19 Oct 2015 08:37:00 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=Z6yYmSGaFigf2qJGeEIwSoeEwwtdIYq3A+DJm/Z23IQ=; b=i4cJ3FkmK+z6PTqm2Cbj4vU8RtAd3Sd9DzBSY9F/yJFkrdf0E6dnaI4eySr+quMDPa yP/BYQJzoNv1yQud/da976XQz3VROw9JN1bE8G2ASZ1W+808jmrdwOtvE3jGE0+8qCaC kzNGOlje02lq+CszVqKpQUGvdEoT12+f1YmxPR8rnqT9ozJsiueDPy0XjtcahUuq3uLR IRm6TbWkWf3SjL6rOvz7OhXs5Ku1SN/l2XxcLjR+rJEkApN6dOWcYMmkSbcmE8PiR1lR WVTZo2HVbI2KcNkbohldmWJT5J8OP+aqj/hY+mtWNbvtPbw7kVr2CWBcWziI9UGzdnc+ yQTQ== X-Received: by 10.68.69.108 with SMTP id d12mr34591905pbu.137.1445269020100; Mon, 19 Oct 2015 08:37:00 -0700 (PDT) Received: from buildhost2.vyatta.com. ([144.49.132.22]) by smtp.gmail.com with ESMTPSA id ez2sm37002362pbb.5.2015.10.19.08.36.58 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Mon, 19 Oct 2015 08:36:59 -0700 (PDT) From: Eric Kinzie To: dev@dpdk.org Date: Mon, 19 Oct 2015 08:36:14 -0700 Message-Id: <1445268976-27491-3-git-send-email-ehkinzie@gmail.com> X-Mailer: git-send-email 1.7.10.4 In-Reply-To: <1445268976-27491-1-git-send-email-ehkinzie@gmail.com> References: <1445268976-27491-1-git-send-email-ehkinzie@gmail.com> Cc: Eric Kinzie Subject: [dpdk-dev] [PATCH v6 2/4] bond mode 4: do not ignore multicast X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: patches and discussions about DPDK List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 19 Oct 2015 15:37:01 -0000 From: Eric Kinzie The bonding PMD in mode 4 puts all enslaved interfaces into promiscuous mode in order to receive LACPDUs and must filter unwanted packets after the traffic has been "collected". Allow broadcast and multicast through so that ARP and IPv6 neighbor discovery continue to work. Fixes: 46fb43683679 ("bond: add mode 4") Signed-off-by: Eric Kinzie --- app/test/test_link_bonding_mode4.c | 7 +++++-- drivers/net/bonding/rte_eth_bond_pmd.c | 1 + 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/app/test/test_link_bonding_mode4.c b/app/test/test_link_bonding_mode4.c index 460539d..d785393 100644 --- a/app/test/test_link_bonding_mode4.c +++ b/app/test/test_link_bonding_mode4.c @@ -749,8 +749,11 @@ test_mode4_rx(void) rte_eth_macaddr_get(test_params.bonded_port_id, &bonded_mac); ether_addr_copy(&bonded_mac, &dst_mac); - /* Assert that dst address is not bonding address */ - dst_mac.addr_bytes[0]++; + /* Assert that dst address is not bonding address. Do not set the + * least significant bit of the zero byte as this would create a + * multicast address. + */ + dst_mac.addr_bytes[0] += 2; /* First try with promiscuous mode enabled. * Add 2 packets to each slave. First with bonding MAC address, second with diff --git a/drivers/net/bonding/rte_eth_bond_pmd.c b/drivers/net/bonding/rte_eth_bond_pmd.c index 5cc6372..733022b 100644 --- a/drivers/net/bonding/rte_eth_bond_pmd.c +++ b/drivers/net/bonding/rte_eth_bond_pmd.c @@ -170,6 +170,7 @@ bond_ethdev_rx_burst_8023ad(void *queue, struct rte_mbuf **bufs, * mode and packet address does not match. */ if (unlikely(hdr->ether_type == ether_type_slow_be || !collecting || (!promisc && + !is_multicast_ether_addr(&hdr->d_addr) && !is_same_ether_addr(&bond_mac, &hdr->d_addr)))) { if (hdr->ether_type == ether_type_slow_be) { -- 1.7.10.4