From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from dpdk.org (dpdk.org [92.243.14.124]) by dpdk.space (Postfix) with ESMTP id AE1F3A0096 for ; Thu, 14 Mar 2019 13:10:25 +0100 (CET) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id D99E9374E; Thu, 14 Mar 2019 13:10:24 +0100 (CET) Received: from yy.com (unknown [183.36.123.141]) by dpdk.org (Postfix) with ESMTP id E376D324D for ; Thu, 14 Mar 2019 13:10:22 +0100 (CET) Received: from bigo.sg (unknown [14.29.89.90]) by centos (Coremail) with SMTP id AQAAfwB3f5OmRIpcqMEuAA--.5777S2; Thu, 14 Mar 2019 20:10:14 +0800 (CST) Received: from ubuntu.bigo.local (unknown [58.248.226.7]) by coremail_mail (Coremail) with SMTP id WlkdDgAnL7N1RYpcCOpgAA--.11S2; Thu, 14 Mar 2019 20:13:47 +0800 (CST) From: Liang Zhang To: dev@dpdk.org Cc: Liang Zhang Date: Thu, 14 Mar 2019 20:09:53 +0800 Message-Id: <1552565393-14475-1-git-send-email-zhangliang@bigo.sg> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1552483439-11083-1-git-send-email-zhangliang@bigo.sg> References: <1552483439-11083-1-git-send-email-zhangliang@bigo.sg> X-CM-TRANSID: AQAAfwB3f5OmRIpcqMEuAA--.5777S2 Authentication-Results: centos; spf=neutral smtp.mail=zhangliang@bigo. sg; X-Coremail-Antispam: 1UD129KBjvJXoW7tw4DWFWkJw45CF1rZF13urg_yoW8Cw4xpF WUCw43Ww1kta15Z3WxCFW8Cr1Uurn7Aw12gFyrAas09Fn0vF1xWw1jgFWjvFWjkrWj9Fsr Ar45CwsI9a1UCrDanT9S1TB71UUUUUUqnTZGkaVYY2UrUUUUjbIjqfuFe4nvWSU8nxnvy2 9KBjDU0xBIdaVrnUUvcSsGvfC2KfnxnUUI43ZEXa7xR_UUUUUUUUU== X-CM-SenderInfo: x2kd0wxold0w2s6exwnrovw/ Subject: [dpdk-dev] [PATCH v2] bonding: change mac_addr filled position 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: , Errors-To: dev-bounces@dpdk.org Sender: "dev" Content-Type: text/plain; charset="UTF-8" Message-ID: <20190314120953.AgpVo1A0YxATLHebs5xL-cD4CP7_jI2uPBWDUsSee7E@z> When mac_address update in bond_mode_8023ad_mac_address_update, bonding port's mac_addr should update also. Signed-off-by: Liang Zhang --- drivers/net/bonding/rte_eth_bond_8023ad.c | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/drivers/net/bonding/rte_eth_bond_8023ad.c b/drivers/net/bonding/rte_eth_bond_8023ad.c index e518956..eefc7a2 100644 --- a/drivers/net/bonding/rte_eth_bond_8023ad.c +++ b/drivers/net/bonding/rte_eth_bond_8023ad.c @@ -791,8 +791,12 @@ rx_machine_update(struct bond_dev_private *internals, uint8_t slave_id, RTE_ASSERT(lacp->lacpdu.subtype == SLOW_SUBTYPE_LACP); 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 */ + if (is_same_ether_addr(&partner->port_params.system, + &internals->mode4.mac_addr)) { + + /* This LACP frame is sending to the bonding port + * so pass it to rx_machine. + */ rx_machine(internals, slave_id, &lacp->lacpdu); } rte_pktmbuf_free(lacp_pkt); @@ -1144,7 +1148,6 @@ 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); @@ -1170,6 +1173,7 @@ bond_mode_8023ad_start(struct rte_eth_dev *bond_dev) struct mode8023ad_private *mode4 = &internals->mode4; static const uint64_t us = BOND_MODE_8023AX_UPDATE_TIMEOUT_MS * 1000; + rte_eth_macaddr_get(internals->port_id, &mode4->mac_addr); if (mode4->slowrx_cb) return rte_eal_alarm_set(us, &bond_mode_8023ad_ext_periodic_cb, bond_dev); -- 2.7.4