From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: <3chas3@gmail.com> Received: from mail-qt0-f193.google.com (mail-qt0-f193.google.com [209.85.216.193]) by dpdk.org (Postfix) with ESMTP id EC5D4CF90 for ; Wed, 6 Jun 2018 14:26:33 +0200 (CEST) Received: by mail-qt0-f193.google.com with SMTP id q6-v6so6070207qtn.7 for ; Wed, 06 Jun 2018 05:26:33 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id; bh=3lmOUr2clF+0PDNuQUATAqpxQAiQ9sKfsnjL1F3yv8s=; b=rMFnvOaBs3Q7NguvVH7NUJ7neQpndMYwFks+QuIGNXl+qtdjO4WG8xHI3UZt+H7CI/ ylFkzpG2cfsOIz+Wu98I6KL4iO9yF/9q3R8cAvxpc4J1VuNmkrzyRKePp7+FRPmdvG2/ FU55CHvw7+NSkaxGslayosFPR7J9i78ajjJhCU8sDlW3IoNMULzHuUEVKOXTs8yt+4ON b59GtCZ4jlIeCofbsIXXCf1Y0rq93Xb204mCRAlQdgYm+OCY0WvXffc/fcwyED5sT14s LDHEdl4hrOcM6SLXHOXpfZDUQGdPgqV9gtb/wqfIoZ06hJMssTcxNqHhS0BEiuIwY3gb EiSw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id; bh=3lmOUr2clF+0PDNuQUATAqpxQAiQ9sKfsnjL1F3yv8s=; b=qKSab8S9wYrnCRtpdcH6ScyehpEG0tqGt032Av5gScT7621q9FfGFcPzG5wit5unMZ +gMKPNK1PKr3hv7MK3vNOJa1j2DuQHMrihK3NKFyuLw7rEX2TGzInNI0QlkRqzqTZUDg rzuzJ/CvSDLYonAqC84mFtnWIjCXNgqmMvCoAT7wAx9bem52IT8F/7CojvQD6RzQ+coz dBiCdJZMTM68DZ4wcSKJlsVuUb6WbEzUhJefcedqWfY+DLUA90R2zG9a/Kxbr3MNkglZ IiI34s6qIrJmK2rek+ZMbMWF6anySGgCtrz5zZ95jrwqTHnicyMdQk+1aXbVCT2Lqpe7 mJHQ== X-Gm-Message-State: APt69E2tp+czpBuqnq1z+yoRG2awKAaV6mpWvL9LBucsiWN31aVjq2w5 AQLBCfd6BG2dkXEzd5B0xPorAg== X-Google-Smtp-Source: ADUXVKIHnOVwdXZhbMcns/Cxe7m+7qFGnFmFOSagltbAer4Gg/5DXmpxETUnmZHUYZAC5+t1Gp5PZw== X-Received: by 2002:a0c:d911:: with SMTP id p17-v6mr2366715qvj.78.1528287993218; Wed, 06 Jun 2018 05:26:33 -0700 (PDT) Received: from monolith.fios-router.home (pool-173-79-169-217.washdc.fios.verizon.net. [173.79.169.217]) by smtp.gmail.com with ESMTPSA id m16-v6sm21185710qtn.92.2018.06.06.05.26.32 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Wed, 06 Jun 2018 05:26:32 -0700 (PDT) From: Chas Williams <3chas3@gmail.com> To: dev@dpdk.org Cc: declan.doherty@intel.com, "Charles (Chas) Williams" Date: Wed, 6 Jun 2018 08:26:27 -0400 Message-Id: <20180606122627.18418-1-3chas3@gmail.com> X-Mailer: git-send-email 2.14.3 Subject: [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 12:26:34 -0000 From: "Charles (Chas) Williams" 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 second 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 used to clear the slaves. Signed-off-by: Chas Williams --- drivers/net/bonding/rte_eth_bond_pmd.c | 1 - 1 file changed, 1 deletion(-) 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]] = 0; } - internals->active_slave_count = 0; internals->link_status_polling_enabled = 0; for (i = 0; i < internals->slave_count; i++) internals->slaves[i].last_link_status = 0; -- 2.14.3