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 E0787A0A0E for ; Mon, 10 May 2021 18:06:03 +0200 (CEST) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id DA8604003E; Mon, 10 May 2021 18:06:03 +0200 (CEST) Received: from NAM10-MW2-obe.outbound.protection.outlook.com (mail-mw2nam10on2045.outbound.protection.outlook.com [40.107.94.45]) by mails.dpdk.org (Postfix) with ESMTP id 93704406A3 for ; Mon, 10 May 2021 18:06:02 +0200 (CEST) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=FridiGBuJQ8iTouGrC6Px9DJtVTVLZMSAMdtdxeG70eZezhS7Uv+HS9ke94NaTDkwam6lhJTCzH2P5sz8xHgqVJ8g40x3vrtUMWwBdSpwXL6NivVZPuhGPd5QkKePXcr1Rz6DkTsykMgWBK6Jx1GEJ4+LHnq8RbCzMtVFz/QTYWOJI/FPkDxH135eWhtr9AzecmC/OY9/FmhNPfKzPJNz1icOhCIHe0qCrJDSXl9tQQlT4fuRtwj+8Z/ePrfEhIQYZnEkWbir7QYYQl8u3UZeImRdIyfDqX7nc0nX893zFiDWdlIEeItq0x0M/w+Bw5sXDYqYsSBF4rezg/ycOJTww== 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-SenderADCheck; bh=gSPzHTBF6un4zEzfPccigp6aKcJh8OqRygC2UdUEAic=; b=gtZw/UvZpQmGOx/Eyc5spUcfZ9mebokvbvmy/CjyUrUqCWrDydun8f/aZsdQZcPHoMxLPGa1lyWqLrI5vZG+M17Z8l0IdhmV7DF5ld6eQBgYCIgMY3oGNKbYarPdYvXaEFOPrnp09ZwO7ni3ZXIyZDP2+n7bhIekHNSy+plLObDkMwz+N9K8AdHHcO1KYapKnRamKiYWVzkUlOkcsxKoIpP8JHJvCMPAvOF/OFbv8HSuv/ca6vcjSqpLIGsVL2cXHfIrz1UmvdaReo3EIhlfRzXt2qIYvW6DPzEfpqxqoMO14N3a2G+R5XS1pT77A7DNm1VQbZ9x89hFncR7ZYKtTA== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass (sender ip is 216.228.112.34) smtp.rcpttodomain=huawei.com smtp.mailfrom=nvidia.com; dmarc=pass (p=none sp=none pct=100) action=none header.from=nvidia.com; dkim=none (message not signed); arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=Nvidia.com; s=selector2; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=gSPzHTBF6un4zEzfPccigp6aKcJh8OqRygC2UdUEAic=; b=rE0EWXS0dfYVpqw39cfOsZ6XHtUUGvMLS0nNj8r44aBbA9kirZOyHSiaCihKtAnsqjD8MSicJ2TURwPuH0onDoMVW5QhoA1tOkddl47nnPGbwTiRwPkZSo5yd/6YAunrJX4fua7OVGOJUQ6UVRpIgZ4Tp70YobMG0e3pQAD7UajPQuWiT8bQc5RgtQCEuKOO0qJHw60VqgJAmW8Ybnf47lEwLWGYjJu1DUdRLHaQrXZuoE+scuAx851iPuHmV3lotwj4d4un2rJxiUi7CQharOed4rzD/HxZLgvW87za3Kg5MK8k3sxTzcjeLnRPY7yl5DRzjsNaNp8YwtjdfqmvYQ== Received: from BN9PR03CA0492.namprd03.prod.outlook.com (2603:10b6:408:130::17) by CH2PR12MB4647.namprd12.prod.outlook.com (2603:10b6:610:b::30) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4108.25; Mon, 10 May 2021 16:06:00 +0000 Received: from BN8NAM11FT027.eop-nam11.prod.protection.outlook.com (2603:10b6:408:130:cafe::c0) by BN9PR03CA0492.outlook.office365.com (2603:10b6:408:130::17) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4108.25 via Frontend Transport; Mon, 10 May 2021 16:06:00 +0000 X-MS-Exchange-Authentication-Results: spf=pass (sender IP is 216.228.112.34) smtp.mailfrom=nvidia.com; huawei.com; dkim=none (message not signed) header.d=none;huawei.com; dmarc=pass action=none header.from=nvidia.com; Received-SPF: Pass (protection.outlook.com: domain of nvidia.com designates 216.228.112.34 as permitted sender) receiver=protection.outlook.com; client-ip=216.228.112.34; helo=mail.nvidia.com; Received: from mail.nvidia.com (216.228.112.34) by BN8NAM11FT027.mail.protection.outlook.com (10.13.177.96) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384) id 15.20.4108.25 via Frontend Transport; Mon, 10 May 2021 16:05:59 +0000 Received: from nvidia.com (172.20.145.6) by HQMAIL107.nvidia.com (172.20.187.13) with Microsoft SMTP Server (TLS) id 15.0.1497.2; Mon, 10 May 2021 16:05:57 +0000 From: Xueming Li To: Vadim Podovinnikov CC: Luca Boccassi , Min Hu , dpdk stable Date: Mon, 10 May 2021 23:59:38 +0800 Message-ID: <20210510160258.30982-29-xuemingl@nvidia.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20210510160258.30982-1-xuemingl@nvidia.com> References: <20210510160258.30982-1-xuemingl@nvidia.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Content-Type: text/plain X-Originating-IP: [172.20.145.6] X-ClientProxiedBy: HQMAIL111.nvidia.com (172.20.187.18) To HQMAIL107.nvidia.com (172.20.187.13) X-EOPAttributedMessage: 0 X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: 84ad80da-902b-4026-4e3c-08d913cd80d6 X-MS-TrafficTypeDiagnostic: CH2PR12MB4647: X-Microsoft-Antispam-PRVS: X-MS-Oob-TLC-OOBClassifiers: OLM:8273; X-MS-Exchange-SenderADCheck: 1 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: pvutE2MmqYLkZPPKSz7S/lVerSf7UQ/44lWR4u9FCZ0Jc8L8v5f5jw811jcqeSJ2mJJwCbpXcfld2IaMR3NRC6mQaZOrNBVSHqmRN2PJFTBsY5eK9q1XcRqbVvMBamTuTD/FvXwqTm0ir8hb5tZ9F2zoDwSCcuDpbdGzIz6SB2gKEXDMj0srV0n2qaEeXCB/KGL6U3QN+ODPFRQDC7dJdNFDR8IZvGbDsWJIHSc98aEPCbUxFKe/lnerWwejhwG6Sofz/FkUGHiehNywUtnenSmuhGGHqXwMO8tq+ypXgh5Gu9gNfQJv8N1rrd0f5/IQGyauaLnZTheVjyvrZGK9pk8OQOITXC0w62RV/WCLVQJ59O/Y6FRQib7uNPGVgLOAlRjAK7PYpyTNMmU2kqY3hxUvzMGTC+mZxVn/OK97PJtKU4tXpW3n1XLBiOgOZmodrHB7NgsN5bDUxMuLPkghJ/wn72BtRBszN87BjWMHTcnAHK9q0dhE91gJrENmrQEpUbQXLyqpXJ+eRywz98x3lbNWegVtjN+kIublKr3IEMYxUFRIS5GWehAdKVovSRvbHAMiuCDkfQ6X42iO9+/sNXy6qZcn6yKhUVEeJrKXcBNR7UnuKubHdjeVxdoR2d4+BdtyEq/PXSks3amCJDDQz4qsqeF++DgTLqxouchPKbdkRXyifyR2MtALkOv/CMbgKibetEKZ5l0uXeaxK2n8hiQ9U0co6oEhwA3+1LfFn9ggJaiRC9Mbp6GjRWUOoayNx/2INlMPTCnEf811STtXsA== X-Forefront-Antispam-Report: CIP:216.228.112.34; CTRY:US; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:mail.nvidia.com; PTR:schybrid03.nvidia.com; CAT:NONE; SFS:(4636009)(346002)(136003)(39860400002)(396003)(376002)(46966006)(36840700001)(7696005)(36756003)(2616005)(55016002)(26005)(8676002)(36906005)(36860700001)(316002)(8936002)(54906003)(47076005)(336012)(6666004)(6916009)(82310400003)(426003)(2906002)(16526019)(6286002)(186003)(5660300002)(86362001)(478600001)(356005)(7636003)(966005)(82740400003)(70586007)(70206006)(4326008)(53546011)(1076003)(83380400001); DIR:OUT; SFP:1101; X-OriginatorOrg: Nvidia.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 10 May 2021 16:05:59.8608 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: 84ad80da-902b-4026-4e3c-08d913cd80d6 X-MS-Exchange-CrossTenant-Id: 43083d15-7273-40c1-b7db-39efd9ccc17a X-MS-Exchange-CrossTenant-OriginalAttributedTenantConnectingIp: TenantId=43083d15-7273-40c1-b7db-39efd9ccc17a; Ip=[216.228.112.34]; Helo=[mail.nvidia.com] X-MS-Exchange-CrossTenant-AuthSource: BN8NAM11FT027.eop-nam11.prod.protection.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: CH2PR12MB4647 Subject: [dpdk-stable] patch 'net/bonding: fix LACP system address check' has been queued to stable release 20.11.2 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 Sender: "stable" Hi, FYI, your patch has been queued to stable release 20.11.2 Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet. It will be pushed if I get no objections before 05/12/21. So please shout if anyone has objections. Also note that after the patch there's a diff of the upstream commit vs the patch applied to the branch. This will indicate if there was any rebasing needed to apply to the stable branch. If there were code changes for rebasing (ie: not only metadata diffs), please double check that the rebase was correctly done. Queued patches are on a temporary branch at: https://github.com/steevenlee/dpdk This queued commit can be viewed at: https://github.com/steevenlee/dpdk/commit/96cc541d1115b9ce2df3cf6c83e513c88766e040 Thanks. Xueming Li --- >From 96cc541d1115b9ce2df3cf6c83e513c88766e040 Mon Sep 17 00:00:00 2001 From: Vadim Podovinnikov Date: Wed, 17 Feb 2021 16:26:55 +0000 Subject: [PATCH] net/bonding: fix LACP system address check Cc: Luca Boccassi [ upstream commit fad80ab3698e7f7d3e9c2a28c371da6a17fbc477 ] In bond (LACP) we have several NICs (ports), when we have negotiation with peer about what port we prefer, we send information about what system we preferred in partner system name field. Peer also sends us what partner system name it prefer. When we receive a message from it we must compare its preferred system name with our system name, but not with our port mac address In my test I have several problems with that: 1. If master port (mac address same as system address) shuts down (I have two ports) I loose connection 2. If secondary port (mac address not same as system address) receives message before master port, my connection is not established. Fixes: 56cbc0817399 ("net/bonding: fix LACP negotiation") Signed-off-by: Vadim Podovinnikov Acked-by: Min Hu (Connor) --- drivers/net/bonding/rte_eth_bond_8023ad.c | 17 ++++++++++++++++- 1 file changed, 16 insertions(+), 1 deletion(-) diff --git a/drivers/net/bonding/rte_eth_bond_8023ad.c b/drivers/net/bonding/rte_eth_bond_8023ad.c index 5fe004e551..128754f459 100644 --- a/drivers/net/bonding/rte_eth_bond_8023ad.c +++ b/drivers/net/bonding/rte_eth_bond_8023ad.c @@ -804,19 +804,34 @@ rx_machine_update(struct bond_dev_private *internals, uint16_t slave_id, struct rte_mbuf *lacp_pkt) { struct lacpdu_header *lacp; struct lacpdu_actor_partner_params *partner; + struct port *port, *agg; if (lacp_pkt != NULL) { lacp = rte_pktmbuf_mtod(lacp_pkt, struct lacpdu_header *); RTE_ASSERT(lacp->lacpdu.subtype == SLOW_SUBTYPE_LACP); partner = &lacp->lacpdu.partner; + port = &bond_mode_8023ad_ports[slave_id]; + agg = &bond_mode_8023ad_ports[port->aggregator_port_id]; + if (rte_is_zero_ether_addr(&partner->port_params.system) || rte_is_same_ether_addr(&partner->port_params.system, - &internals->mode4.mac_addr)) { + &agg->actor.system)) { /* This LACP frame is sending to the bonding port * so pass it to rx_machine. */ rx_machine(internals, slave_id, &lacp->lacpdu); + } else { + char preferred_system_name[RTE_ETHER_ADDR_FMT_SIZE]; + char self_system_name[RTE_ETHER_ADDR_FMT_SIZE]; + + rte_ether_format_addr(preferred_system_name, + RTE_ETHER_ADDR_FMT_SIZE, &partner->port_params.system); + rte_ether_format_addr(self_system_name, + RTE_ETHER_ADDR_FMT_SIZE, &agg->actor.system); + MODE4_DEBUG("preferred partner system %s " + "is not equal with self system: %s\n", + preferred_system_name, self_system_name); } rte_pktmbuf_free(lacp_pkt); } else -- 2.25.1 --- Diff of the applied patch vs upstream commit (please double-check if non-empty: --- --- - 2021-05-10 23:59:27.458009500 +0800 +++ 0030-net-bonding-fix-LACP-system-address-check.patch 2021-05-10 23:59:26.360000000 +0800 @@ -1 +1 @@ -From fad80ab3698e7f7d3e9c2a28c371da6a17fbc477 Mon Sep 17 00:00:00 2001 +From 96cc541d1115b9ce2df3cf6c83e513c88766e040 Mon Sep 17 00:00:00 2001 @@ -4,0 +5,3 @@ +Cc: Luca Boccassi + +[ upstream commit fad80ab3698e7f7d3e9c2a28c371da6a17fbc477 ] @@ -21 +23,0 @@ -Cc: stable@dpdk.org