From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mails.dpdk.org (mails.dpdk.org [217.70.189.124]) by inbox.dpdk.org (Postfix) with ESMTP id 14572A0C53; Tue, 10 Aug 2021 09:50:25 +0200 (CEST) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 9BAF740E6E; Tue, 10 Aug 2021 09:50:24 +0200 (CEST) Received: from szxga08-in.huawei.com (szxga08-in.huawei.com [45.249.212.255]) by mails.dpdk.org (Postfix) with ESMTP id 1F8104068E; Tue, 10 Aug 2021 09:50:23 +0200 (CEST) Received: from dggeme756-chm.china.huawei.com (unknown [172.30.72.56]) by szxga08-in.huawei.com (SkyGuard) with ESMTP id 4GkQ8t5v98z1CTq5; Tue, 10 Aug 2021 15:50:06 +0800 (CST) Received: from [10.67.103.128] (10.67.103.128) by dggeme756-chm.china.huawei.com (10.3.19.102) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256_P256) id 15.1.2176.2; Tue, 10 Aug 2021 15:50:20 +0800 To: jilei , CC: , , , , , , References: <20210810064323.4161835-1-jilei8@huawei.com> From: "Min Hu (Connor)" Message-ID: Date: Tue, 10 Aug 2021 15:50:19 +0800 User-Agent: Mozilla/5.0 (Windows NT 10.0; WOW64; rv:68.0) Gecko/20100101 Thunderbird/68.3.1 MIME-Version: 1.0 In-Reply-To: <20210810064323.4161835-1-jilei8@huawei.com> Content-Type: text/plain; charset="gbk"; format=flowed Content-Transfer-Encoding: 8bit X-Originating-IP: [10.67.103.128] X-ClientProxiedBy: dggems703-chm.china.huawei.com (10.3.19.180) To dggeme756-chm.china.huawei.com (10.3.19.102) X-CFilter-Loop: Reflected Subject: Re: [dpdk-dev] [PATCH] net/bonding:fix balance-xor link down stack overflow X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.29 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" Hi, Your patch is OK, but the description is misleading and has syntax errors. Please fix it ,thanks. ÔÚ 2021/8/10 14:43, jilei дµÀ: > When slave link down, deactivate_slave will internals->active_slaves > and internals->active_slave_count.Active_slave in bond_ethdev_rx_burst > may out of range in internals->active_slaves.It will get bond's port_id > cause stack overflow > > Cc: stable@dpdk.org > Signed-off-by: jilei > --- > drivers/net/bonding/rte_eth_bond_pmd.c | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/drivers/net/bonding/rte_eth_bond_pmd.c b/drivers/net/bonding/rte_eth_bond_pmd.c > index a6755661c4..46f2c42d60 100644 > --- a/drivers/net/bonding/rte_eth_bond_pmd.c > +++ b/drivers/net/bonding/rte_eth_bond_pmd.c > @@ -82,7 +82,7 @@ bond_ethdev_rx_burst(void *queue, struct rte_mbuf **bufs, uint16_t nb_pkts) > bufs + num_rx_total, nb_pkts); > num_rx_total += num_rx_slave; > nb_pkts -= num_rx_slave; > - if (++active_slave == slave_count) > + if (++active_slave >= slave_count) > active_slave = 0; > } > >