From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from EUR01-HE1-obe.outbound.protection.outlook.com (mail-he1eur01on0075.outbound.protection.outlook.com [104.47.0.75]) by dpdk.org (Postfix) with ESMTP id 6CE2D1B66F for ; Wed, 6 Jun 2018 15:57:53 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=Mellanox.com; s=selector1; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=S0n4zIQkjcEr6Kc3ega3iGPEe4qcRMynrg5fL6ImUIw=; b=pKn+0FROw/1WGSCmqOXQNZklqnn+mJv3zwNgYIgeXW4xUIxSRIyjHYcvfhnmynKB9bdHp5ERQuXzcDQ6CAChlw2U49K14tZWRyYIfkdUptGRnkAnL3kim+5wsZNfDXoPHfZk14jDanaHOSGNM6rov5eYgMHnw1fvhZwL6VYKDEk= Received: from VI1PR0501MB2608.eurprd05.prod.outlook.com (10.168.137.20) by VI1PR0501MB2110.eurprd05.prod.outlook.com (10.167.196.14) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.820.12; Wed, 6 Jun 2018 13:57:51 +0000 Received: from VI1PR0501MB2608.eurprd05.prod.outlook.com ([fe80::4548:a183:6278:6d9f]) by VI1PR0501MB2608.eurprd05.prod.outlook.com ([fe80::4548:a183:6278:6d9f%2]) with mapi id 15.20.0820.015; Wed, 6 Jun 2018 13:57:51 +0000 From: Matan Azrad To: Chas Williams <3chas3@gmail.com>, "dev@dpdk.org" CC: "declan.doherty@intel.com" , "Charles (Chas) Williams" Thread-Topic: [dpdk-dev] [PATCH] net/bonding: don't clear active slave count Thread-Index: AQHT/ZGibAuwN/BuY06w1uqCfzyv/6RTP6BA Date: Wed, 6 Jun 2018 13:57:51 +0000 Message-ID: References: <20180606122627.18418-1-3chas3@gmail.com> In-Reply-To: <20180606122627.18418-1-3chas3@gmail.com> Accept-Language: en-US, he-IL Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: authentication-results: spf=none (sender IP is ) smtp.mailfrom=matan@mellanox.com; x-originating-ip: [193.47.165.251] x-ms-publictraffictype: Email x-microsoft-exchange-diagnostics: 1; VI1PR0501MB2110; 7:qJW4nj/p3/aSFJjBSXvVmNB4y8iXrOHziQlvJ0i9wjmwFJ7d64WGYRTSGF8JaJJNh9Msr5bzWx6SLYzcQ+7s73ZZX1C9620uLzYPB5Q1IUsgR/ggI9QiOyBVqW7sG2liXvYCxgv736pUBKiiPN934K3Gdge864m3CFExyD3dHjvKR2NsJaw3E+7ZUlQAq3C1Bw5gY4QZUYQpF+NPPEO4ZqYDsEpTqZYepPjLndxTvVMbZNeUh7m01J0WuzHdRANr x-ms-exchange-antispam-srfa-diagnostics: SOS; x-ms-office365-filtering-ht: Tenant x-microsoft-antispam: UriScan:; BCL:0; PCL:0; RULEID:(7020095)(4652020)(48565401081)(5600026)(4534165)(4627221)(201703031133081)(201702281549075)(2017052603328)(7153060)(7193020); SRVR:VI1PR0501MB2110; x-ms-traffictypediagnostic: VI1PR0501MB2110: x-microsoft-antispam-prvs: x-exchange-antispam-report-test: UriScan:(97927398514766); x-ms-exchange-senderadcheck: 1 x-exchange-antispam-report-cfa-test: BCL:0; PCL:0; RULEID:(8211001083)(6040522)(2401047)(8121501046)(5005006)(10201501046)(93006095)(93001095)(3002001)(3231254)(944501410)(52105095)(6055026)(149027)(150027)(6041310)(201703131423095)(201702281528075)(20161123555045)(201703061421075)(201703061406153)(20161123560045)(20161123562045)(20161123558120)(20161123564045)(6072148)(201708071742011)(7699016); SRVR:VI1PR0501MB2110; BCL:0; PCL:0; RULEID:; SRVR:VI1PR0501MB2110; x-forefront-prvs: 06952FC175 x-forefront-antispam-report: SFV:NSPM; SFS:(10009020)(39380400002)(396003)(39860400002)(366004)(376002)(346002)(189003)(199004)(8936002)(66066001)(4326008)(39060400002)(25786009)(33656002)(55016002)(6436002)(446003)(11346002)(476003)(486006)(186003)(7736002)(81156014)(229853002)(305945005)(81166006)(8676002)(74316002)(68736007)(6116002)(105586002)(106356001)(478600001)(5660300001)(3280700002)(5250100002)(53936002)(3846002)(3660700001)(6246003)(2900100001)(97736004)(9686003)(2906002)(2501003)(76176011)(316002)(6506007)(7696005)(86362001)(110136005)(54906003)(99286004)(102836004)(26005)(59450400001)(14454004); DIR:OUT; SFP:1101; SCL:1; SRVR:VI1PR0501MB2110; H:VI1PR0501MB2608.eurprd05.prod.outlook.com; FPR:; SPF:None; LANG:en; PTR:InfoNoRecords; MX:1; A:1; received-spf: None (protection.outlook.com: mellanox.com does not designate permitted sender hosts) x-microsoft-antispam-message-info: pCGcBXg2DMZ7Eqv1ONansCzc8GCNrmWacBJCeCpMgvLE+OEkf3ScBQ4TDTuG5SKf5slFsdF+cwvxcvHpZ60a29CjiYOZbOMmzQn3eNuNVrI1ZVypvg6AXu9AMSdvtRnRe11Gy38gLH20SwXGKt9np+E0qmRFHTwPF8873Lie0fiBNdKdOGfz9asZFEwyoKGb spamdiagnosticoutput: 1:99 spamdiagnosticmetadata: NSPM Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 X-MS-Office365-Filtering-Correlation-Id: 281f246a-1e14-4de1-913a-08d5cbb57e9b X-OriginatorOrg: Mellanox.com X-MS-Exchange-CrossTenant-Network-Message-Id: 281f246a-1e14-4de1-913a-08d5cbb57e9b X-MS-Exchange-CrossTenant-originalarrivaltime: 06 Jun 2018 13:57:51.5968 (UTC) X-MS-Exchange-CrossTenant-fromentityheader: Hosted X-MS-Exchange-CrossTenant-id: a652971c-7d2e-4d9b-a6a4-d149256f461b X-MS-Exchange-Transport-CrossTenantHeadersStamped: VI1PR0501MB2110 Subject: Re: [dpdk-dev] [PATCH] net/bonding: don't clear active slave count 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, 06 Jun 2018 13:57:53 -0000 Hi Chas From: Chas Williams > From: "Charles (Chas) Williams" >=20 > When the bond PMD is stopped, the active slave count is reset. > For 802.3ad mode this potentially leaks memory and clears state since a s= econd > sequential activate_slave() will occur when the bond PMD is restarted and= the > LSC callback is triggered while the active slave count is 0. To fix this,= don't clear > the active slave count when stopping. Only deactivate_slave() should be u= sed to > clear the slaves. >=20 Looks like it is a fix, so need fix title, CC stable and fixes line, no? > Signed-off-by: Chas Williams > --- > drivers/net/bonding/rte_eth_bond_pmd.c | 1 - > 1 file changed, 1 deletion(-) >=20 > diff --git a/drivers/net/bonding/rte_eth_bond_pmd.c > b/drivers/net/bonding/rte_eth_bond_pmd.c > index 02d94b1b1..4ae577078 100644 > --- a/drivers/net/bonding/rte_eth_bond_pmd.c > +++ b/drivers/net/bonding/rte_eth_bond_pmd.c > @@ -2173,7 +2173,6 @@ bond_ethdev_stop(struct rte_eth_dev *eth_dev) > tlb_last_obytets[internals->active_slaves[i]] =3D 0; > } >=20 > - internals->active_slave_count =3D 0; But why not to call deactivate_slave() for all the active slaves?=20 > internals->link_status_polling_enabled =3D 0; > for (i =3D 0; i < internals->slave_count; i++) > internals->slaves[i].last_link_status =3D 0; > -- > 2.14.3