From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: <3chas3@gmail.com> Received: from mail-qk1-f196.google.com (mail-qk1-f196.google.com [209.85.222.196]) by dpdk.org (Postfix) with ESMTP id 3D7BF374E for ; Wed, 13 Mar 2019 19:02:50 +0100 (CET) Received: by mail-qk1-f196.google.com with SMTP id i5so1646920qkd.13 for ; Wed, 13 Mar 2019 11:02:50 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=subject:to:references:from:message-id:date:user-agent:mime-version :in-reply-to:content-language:content-transfer-encoding; bh=HkiycbO1frNJwccTw9sGlSvRrWaslviYmC4Rs9A3LKc=; b=COIsJhVyx0AEgovHrbo2ycK3j1utR+C06FTL+/hqG1jiQAe+pbWAEiSvxbHGOyA683 +qhaoBvZ6Tag804ApGeYFfFvDdmXcVdWVNKcda/rN8rtAy+E4SbA2AhxDS7CVGQKkqLs jYOLfijivBMqq1pG/uN1OrkIn6wiU5xmHiFLFjwOO0uSzVP+56S/cCnHAr6jWaSU/vyf 63c0mgYjQ2a7ncvIbxaK0YHKKA4Nk92HLCipjtIDDx0zzdsTAO7n47f8hTkjb+oMmV78 XgT6BgBcXH2pNs8SKQSUzj8B84wSFTUO859KZLHibPIPgv6YgOR8sh67Xecsy6X89DYT +sqQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:subject:to:references:from:message-id:date :user-agent:mime-version:in-reply-to:content-language :content-transfer-encoding; bh=HkiycbO1frNJwccTw9sGlSvRrWaslviYmC4Rs9A3LKc=; b=lrqIrOBH9FOM0wXQ7uwi35dyLOR3wc+xsKqnpMeK+IYt0ThrePs7qvgdvPGXvB4zFA NfzS4ryQB50X1D+3G+n4GvluVbNRpVt2jrCfhQok6SYTkIyBmRmlEsoWWfXF1s43PUf+ twYwZabwyHgYPZY3hdJ8EpDHWtn3exVmIpReLtkg4iFPKP8nN9+FS5OI0oqnpebGoTaR PS12MBgp7vaSJ+92QtHQ5As0f9Bcsm/fiCJH54dbFwHR3F+S6b5BcbSsHghWU4jSYzXM SyScBNC2ItEKluDSGfqt3uOxs+T32OPg2tDWIaSBPcj4PnLXY8FNjJdHb64XGRLkDTAI HHxQ== X-Gm-Message-State: APjAAAXGrYpcfwhytE0ONxg/XindqitCOUwgcX9Iazou/v7yGn80FccT lw9dDtfwu5fKgoatuikYfL+tVz/+ X-Google-Smtp-Source: APXvYqzeQ4p0KQdjp166g+9q4/u7QFxWelgC/fdmzCMqZ602VYueCMSKU+99o1XH8f6Crl4NDhkdSA== X-Received: by 2002:a05:620a:12b1:: with SMTP id x17mr26167839qki.32.1552500169195; Wed, 13 Mar 2019 11:02:49 -0700 (PDT) Received: from [192.168.1.10] (pool-96-255-82-34.washdc.fios.verizon.net. [96.255.82.34]) by smtp.gmail.com with ESMTPSA id j9sm7195868qki.21.2019.03.13.11.02.48 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Wed, 13 Mar 2019 11:02:48 -0700 (PDT) To: Liang Zhang , dev@dpdk.org References: <1552483439-11083-1-git-send-email-zhangliang@bigo.sg> From: Chas Williams <3chas3@gmail.com> Message-ID: Date: Wed, 13 Mar 2019 14:02:47 -0400 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:60.0) Gecko/20100101 Thunderbird/60.4.0 MIME-Version: 1.0 In-Reply-To: <1552483439-11083-1-git-send-email-zhangliang@bigo.sg> Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: en-US Content-Transfer-Encoding: 7bit Subject: Re: [dpdk-dev] [PATCH] bonding: fix lacp negotiation failed X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 13 Mar 2019 18:02:50 -0000 At a minimum you need to address the long lines in your patch. See http://mails.dpdk.org/archives/test-report/2019-March/076663.html otherwise this looks fine to me. On 3/13/19 9:23 AM, Liang Zhang wrote: > When monitor(port-mirroring) traffic from other lacp port-channel, > rx_machine_update may recieving other lacp negotiation packets. > Thus bond mode 4 will negotiation failed. > > Signed-off-by: Liang Zhang > --- > drivers/net/bonding/rte_eth_bond_8023ad.c | 9 +++++++-- > drivers/net/bonding/rte_eth_bond_8023ad_private.h | 1 + > 2 files changed, 8 insertions(+), 2 deletions(-) > > diff --git a/drivers/net/bonding/rte_eth_bond_8023ad.c b/drivers/net/bonding/rte_eth_bond_8023ad.c > index dd847c6..e518956 100644 > --- a/drivers/net/bonding/rte_eth_bond_8023ad.c > +++ b/drivers/net/bonding/rte_eth_bond_8023ad.c > @@ -784,13 +784,17 @@ static void > rx_machine_update(struct bond_dev_private *internals, uint8_t slave_id, > struct rte_mbuf *lacp_pkt) { > struct lacpdu_header *lacp; > + struct lacpdu_actor_partner_params *partner; > > if (lacp_pkt != NULL) { > lacp = rte_pktmbuf_mtod(lacp_pkt, struct lacpdu_header *); > RTE_ASSERT(lacp->lacpdu.subtype == SLOW_SUBTYPE_LACP); > > - /* This is LACP frame so pass it to rx_machine */ > - rx_machine(internals, slave_id, &lacp->lacpdu); > + partner = &lacp->lacpdu.partner; > + if (is_same_ether_addr(&partner->port_params.system, &internals->mode4.mac_addr)) { > + /* This is LACP frame to the bonding port so pass it to rx_machine */ > + rx_machine(internals, slave_id, &lacp->lacpdu); > + } > rte_pktmbuf_free(lacp_pkt); > } else > rx_machine(internals, slave_id, NULL); > @@ -1140,6 +1144,7 @@ bond_mode_8023ad_setup(struct rte_eth_dev *dev, > bond_mode_8023ad_conf_assign(mode4, conf); > mode4->slowrx_cb = conf->slowrx_cb; > mode4->agg_selection = AGG_STABLE; > + rte_eth_macaddr_get(internals->port_id, &mode4->mac_addr); > > if (dev->data->dev_started) > bond_mode_8023ad_start(dev); > diff --git a/drivers/net/bonding/rte_eth_bond_8023ad_private.h b/drivers/net/bonding/rte_eth_bond_8023ad_private.h > index c51426b..f91902e 100644 > --- a/drivers/net/bonding/rte_eth_bond_8023ad_private.h > +++ b/drivers/net/bonding/rte_eth_bond_8023ad_private.h > @@ -150,6 +150,7 @@ struct mode8023ad_private { > uint64_t update_timeout_us; > rte_eth_bond_8023ad_ext_slowrx_fn slowrx_cb; > uint8_t external_sm; > + struct ether_addr mac_addr; > > struct rte_eth_link slave_link; > /***< slave link properties */ >