From patchwork Wed Sep 30 17:48:15 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Eric Kinzie X-Patchwork-Id: 7336 Return-Path: X-Original-To: patchwork@dpdk.org Delivered-To: patchwork@dpdk.org Received: from [92.243.14.124] (localhost [IPv6:::1]) by dpdk.org (Postfix) with ESMTP id 3C00A8E68; Wed, 30 Sep 2015 19:48:38 +0200 (CEST) Received: from mail-ig0-f174.google.com (mail-ig0-f174.google.com [209.85.213.174]) by dpdk.org (Postfix) with ESMTP id ADD5A8E58 for ; Wed, 30 Sep 2015 19:48:34 +0200 (CEST) Received: by igbkq10 with SMTP id kq10so111113032igb.0 for ; Wed, 30 Sep 2015 10:48:34 -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=G9ocLg6vl6zkwJc4jP1hDTR3+VUZRuBW9wXIdrMgT9SmAM4Aco2/3OHgh8sDhV03U4 1fIRud1CFXp8mQEWAMpBR86v8UAGU7mTpwGK/7uz5Vqgfso3VrvLJZ4zlGeaHfYnOe6G Gv0VpZEbV8pFCz+vVyUT2KfyGXlRUzwxphU7NfABZ9q/p+b5Eq7DPFfO0LNLT3IKtHxk K9daotS78zGItUs8iFCXxnbexF9KbTG7vAlNjSLNot789QPcBP9pwGWR5gpbF8GipSOd 5COObCNH+sWAp1m8W8v4rvRqIU27jmuVJ0fK/oHLiVAMfH5h6yv3dcOHy95fxG3QR3ug 4z9A== X-Received: by 10.50.142.73 with SMTP id ru9mr6635899igb.84.1443635314165; Wed, 30 Sep 2015 10:48:34 -0700 (PDT) Received: from buildhost2.vyatta.com. ([144.49.197.22]) by smtp.gmail.com with ESMTPSA id b10sm753288igb.9.2015.09.30.10.48.32 (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Wed, 30 Sep 2015 10:48:33 -0700 (PDT) From: Eric Kinzie To: dev@dpdk.org Date: Wed, 30 Sep 2015 10:48:15 -0700 Message-Id: <1443635297-13106-3-git-send-email-ehkinzie@gmail.com> X-Mailer: git-send-email 1.7.10.4 In-Reply-To: <1443635297-13106-1-git-send-email-ehkinzie@gmail.com> References: <1443635297-13106-1-git-send-email-ehkinzie@gmail.com> Cc: Eric Kinzie Subject: [dpdk-dev] [PATCH v5 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: , Errors-To: dev-bounces@dpdk.org Sender: "dev" 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) {