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 4C664A0505 for ; Fri, 20 May 2022 17:33:59 +0200 (CEST) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 41BF9427F2; Fri, 20 May 2022 17:33:59 +0200 (CEST) Received: from NAM12-DM6-obe.outbound.protection.outlook.com (mail-dm6nam12on2089.outbound.protection.outlook.com [40.107.243.89]) by mails.dpdk.org (Postfix) with ESMTP id C348340156; Fri, 20 May 2022 17:33:56 +0200 (CEST) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=Pfwh98DxdgpFVQFNh9dBQcJYi3PPbbsmqpe4kiz/o1do1QpPNL73DwB2JZc14Gh2jN7DyOCmd4x6pNR6k0yJt/60itNBt3A42mE5rsZ+TyLN06v3KxGoMmR1i1nVCDqR8BR/Trsf7Iviyo4nQGGnWhX/CSWgQRbf9aaDpV7P+8mZO48rxsqyeyKvLT2SR1hKUbIBzDug72WrG6MIzFOSY2eX7qM/LXlZajb5bNDtvVFH5AYrJY6Em2FihO1mP6gFgACjiJyqbfAJ7/yPoGKu2nMakaZKxQxv/gYCqz7Q0NMrIvr7ZJgI8K/Oc9ErdVHPJAk7qFCKDe87jj2gX4Wjbg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=qGAIecwWXUtl9bgInRqDam/w0peEdSI/7SCbALf98A8=; b=m8DbhmrTOmTZsKwH5XSChfaYZY8oeaMxpMRIceTHxOOgyZGl0nW6d1QOQ8cU7wsGb+ywa6tXj6UlN8MtJwQ78Hdcl8Ciqc4VZVJCjVffJSbUlzsxxaMdAKNWhRLKgI9PGsU1nVLBvf0btf3IR78tEt4gxAZbhw2bagQKxne/4YtfdyX4oHC9lHuw4eJvQv30DCGcbVmHqLp8rdVOeEk5iJk28UL6awuZirZDJuOgsTv4JE55TOXOFrQgqSHbNGQr5RN4IVEN86X8mLkYYNNHN6X2K7rnOydiR04NHmHFmxIIqVV8ze8po8Iw0BtgaLlawWBOEvvDcFeeEmD6tGt1gg== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=softfail (sender ip is 149.199.80.198) smtp.rcpttodomain=huawei.com smtp.mailfrom=amd.com; dmarc=fail (p=quarantine sp=quarantine pct=100) action=quarantine header.from=amd.com; dkim=none (message not signed); arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=xilinx.onmicrosoft.com; s=selector2-xilinx-onmicrosoft-com; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=qGAIecwWXUtl9bgInRqDam/w0peEdSI/7SCbALf98A8=; b=T+G1jzivpoJY5HIcgtQMdqQb4qzf5C4xLbE47nEUxkImxObUrVjDEDqPWCmtCya1qF1sMieWvVbsOC4zqNZoJrWH0zAi4xTRnc5Z8TCkd/vLikVTTdhrI7NvzYgWUN7teizqkweHpryq4WQw+H5n9WAy/CbcMoYM6panM1eEX0w= Received: from BN6PR13CA0056.namprd13.prod.outlook.com (2603:10b6:404:11::18) by DM6PR02MB4651.namprd02.prod.outlook.com (2603:10b6:5:2c::19) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.5273.14; Fri, 20 May 2022 15:33:55 +0000 Received: from BN1NAM02FT024.eop-nam02.prod.protection.outlook.com (2603:10b6:404:11:cafe::d1) by BN6PR13CA0056.outlook.office365.com (2603:10b6:404:11::18) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.5206.6 via Frontend Transport; Fri, 20 May 2022 15:33:55 +0000 X-MS-Exchange-Authentication-Results: spf=softfail (sender IP is 149.199.80.198) smtp.mailfrom=amd.com; dkim=none (message not signed) header.d=none;dmarc=fail action=quarantine header.from=amd.com; Received-SPF: SoftFail (protection.outlook.com: domain of transitioning amd.com discourages use of 149.199.80.198 as permitted sender) Received: from xir-pvapexch02.xlnx.xilinx.com (149.199.80.198) by BN1NAM02FT024.mail.protection.outlook.com (10.13.2.138) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.20.5273.14 via Frontend Transport; Fri, 20 May 2022 15:33:54 +0000 Received: from xir-pvapexch02.xlnx.xilinx.com (172.21.17.17) by xir-pvapexch02.xlnx.xilinx.com (172.21.17.17) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2176.14; Fri, 20 May 2022 16:33:53 +0100 Received: from smtp.xilinx.com (172.21.105.198) by xir-pvapexch02.xlnx.xilinx.com (172.21.17.17) with Microsoft SMTP Server id 15.1.2176.14 via Frontend Transport; Fri, 20 May 2022 16:33:53 +0100 Envelope-to: humin29@huawei.com, jilei8@huawei.com, dev@dpdk.org, chas3@att.com, zhaohui8@huawei.com, yu.yutao@huawei.com, hejiajun@huawei.com, liucheng11@huawei.com, yinpeijun@huawei.com, stable@dpdk.org Received: from [10.71.119.221] (port=57955) by smtp.xilinx.com with esmtp (Exim 4.90) (envelope-from ) id 1ns4dV-0003EO-J6; Fri, 20 May 2022 16:33:53 +0100 Message-ID: Date: Fri, 20 May 2022 16:33:53 +0100 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:91.0) Gecko/20100101 Thunderbird/91.9.0 Subject: Re: [dpdk-dev] [PATCH] net/bonding:fix balance-xor link down stack overflow Content-Language: en-US To: "Min Hu (Connor)" , jilei , CC: , , , , , , References: <20210810064323.4161835-1-jilei8@huawei.com> From: Ferruh Yigit In-Reply-To: Content-Type: text/plain; charset="UTF-8"; format=flowed Content-Transfer-Encoding: 8bit X-EOPAttributedMessage: 0 X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: 0873e1f1-a2a3-4ffb-6400-08da3a762639 X-MS-TrafficTypeDiagnostic: DM6PR02MB4651:EE_ X-Microsoft-Antispam-PRVS: X-MS-Exchange-SenderADCheck: 2 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: DOXalIQiFQMDmmQEzCTBDNprcJF0ob3IGtDdm+g4BX/SHfJA9xrg3/BZPyYBghU6Md03BRHtlsDVEeUQShFXmn3pqs+3f8BUzhOUSQUBkzZRzNXHzGHkqRu1tlifDHSz7y4sP7bLRzS7/rTcG23DjLBVakeHF8VOTrMzv7ZVLpUikf453jgptFJGkLYmE01YJIFTdY7jywyUeeXYWRgCftl4Iwb9H21bi7jmf5QdPltviLthb7q6SkxgN6Wl6/SRkcArw/eWhYLcUAywXhtZOBTImM7t1xNuIF9ZDwA8JagV4QqsdRPJX4QEVxWIgq/Itri72xybQ+BVbWS0O6SWrOvobj88sQ7Plq6xAjrjr4pEWbNv12QR/ynqANd+jaN4NPrkJKCS+RLSatBBPw83g34m7/lDk3Daag6vUd4qFABQQFsIwB2gbp/Zz4729U2SjPe5G5E0YrxmVQJLeLy2J3Jf1209fdSWXOjIpzEIAcrdNvBMYhnJuwE0pxqm9cL2FQ9jaCN7C9cRm5D7Xep6lExAETMKrombfU0HMfITSxxwewlaHptzzSVl6E+tF8uY4K4LdpmP9fDn7yY8yP3ZyFSZe4JJUlHz30uFOSH6iMgeVlxVRc73QcEa6YKto3DFygaeJb2GSwmXbKGD9pZIWfYMmVUE3e2qsfpp2foaXAEwY7iv/r9lusjwnFkNSl2A9KGKMmAilqTXsqflthHQySX6Kq4D/vsHFQvU9EugEQU= X-Forefront-Antispam-Report: CIP:149.199.80.198; CTRY:IE; LANG:en; SCL:1; SRV:; IPV:CAL; SFV:NSPM; H:xir-pvapexch02.xlnx.xilinx.com; PTR:unknown-80-198.xilinx.com; CAT:NONE; SFS:(13230001)(4636009)(40470700004)(46966006)(31696002)(7416002)(336012)(86362001)(8936002)(508600001)(47076005)(31686004)(54906003)(316002)(40460700003)(5660300002)(9786002)(110136005)(7636003)(83380400001)(36756003)(35950700001)(4326008)(44832011)(356005)(82310400005)(70586007)(2616005)(53546011)(26005)(2906002)(70206006)(8676002)(50156003)(43740500002); DIR:OUT; SFP:1101; X-OriginatorOrg: xilinx.onmicrosoft.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 20 May 2022 15:33:54.6475 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: 0873e1f1-a2a3-4ffb-6400-08da3a762639 X-MS-Exchange-CrossTenant-Id: 657af505-d5df-48d0-8300-c31994686c5c X-MS-Exchange-CrossTenant-OriginalAttributedTenantConnectingIp: TenantId=657af505-d5df-48d0-8300-c31994686c5c; Ip=[149.199.80.198]; Helo=[xir-pvapexch02.xlnx.xilinx.com] X-MS-Exchange-CrossTenant-AuthSource: BN1NAM02FT024.eop-nam02.prod.protection.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: DM6PR02MB4651 X-BeenThere: stable@dpdk.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: patches for DPDK stable branches List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: stable-bounces@dpdk.org On 8/10/2021 8:50 AM, Min Hu (Connor) wrote: > 在 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; >>       } >> > > Hi, > Your patch is OK, but the description is misleading and has > syntax errors. Please fix it ,thanks. > Hi jilei, The patch is waiting for a minor update from you, can you please send a new version with the requested change? Btw, please add your sign off in following format: Signed-off-by: Name Surname Thanks, ferruh