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 A09B6A06CB for ; Tue, 22 Nov 2022 23:03:15 +0100 (CET) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 999EE42D79; Tue, 22 Nov 2022 23:03:15 +0100 (CET) Received: from mail-wr1-f46.google.com (mail-wr1-f46.google.com [209.85.221.46]) by mails.dpdk.org (Postfix) with ESMTP id A8C1D42B77 for ; Tue, 22 Nov 2022 23:03:11 +0100 (CET) Received: by mail-wr1-f46.google.com with SMTP id x17so13415365wrn.6 for ; Tue, 22 Nov 2022 14:03:11 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=LPj9Et9Wtb33C7sS/dcosBoxmtfzN1nx/ieGp4npwFI=; b=VuJ4mskRyg1CxgLzcWzp5sYIF+Uy2rnWELT40vcPXsDzFpS1NsU5Wr0mBJqVozzW6C a6ijGnLNWrnFfeWXRm/062vh6gKllc5kwZyo/GvzfIZA2hLRmBHjWzJCsqRerGKUW8bl 6ti5g+wlDe3yan4jV09JuUXELCFqLeWmP8rOm24aC38jYLA0Eom3MTW3RLl0XxAsUFkg a0vyNhD0VyFDPSbZBGddm3tKAkUrKaajclDb/CeXTt+urLKcMw1lt4tUNgzZUyjL7qmG MKLpf0fOjcV3yGVDVFPSu+QO/FQ9B+lde2M2uyneXDlBbCrt7R3MGfNDpgtau/A2WM9D yT6A== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=LPj9Et9Wtb33C7sS/dcosBoxmtfzN1nx/ieGp4npwFI=; b=bwZRuYm56bWtFaQGiE9Qr+7GiaeK3Jz4W4nEzy23BBbuZraxmDwpQnrjuxQgrWsw51 HOtiNYseOvRRwfsA6A8R+E2mYgNt+J+DfW7Br/Aw78BCJ8I09+6i8lFLgtzEHp6Gw5Is F6AGLYjm3T7oKFna3UWCotDiQBh1/7OtCrFJhpaRyAwqxT8Je0EcWjIm7bQh9VXtAf17 tCtyQ7aLbIMEBPGdGiIsPeguU/v8EuLBODj7HfZ8yVxnrpbKMy+F3/Zvjc2Xq9fT91+2 2aiZQo+lnlyJEBlfDvZzwVdFSgJ0y3Kc2xpPhPkc1VHNbzTDYMSP6R5x3mEuHCaJiokl myrw== X-Gm-Message-State: ANoB5pmKitynwG96PueQGURcwatWQ5arZaAM0xFZuff2w/C1WRM8p00z qjMxY/PVDS9fuiWmSom0AN0= X-Google-Smtp-Source: AA0mqf5GLf0zoHZvPk1qf6euC0H0jbAFFG015z8FzTLEOpIi01QO3khXW1cSe0+GA5cuNHMRHN3UwA== X-Received: by 2002:a5d:6e84:0:b0:22d:6ad5:bc0f with SMTP id k4-20020a5d6e84000000b0022d6ad5bc0fmr15870764wrz.115.1669154591357; Tue, 22 Nov 2022 14:03:11 -0800 (PST) Received: from localhost ([2a01:4b00:d307:1000:f1d3:eb5e:11f4:a7d9]) by smtp.gmail.com with ESMTPSA id y3-20020adfee03000000b002365254ea42sm14964407wrn.1.2022.11.22.14.03.10 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 22 Nov 2022 14:03:10 -0800 (PST) From: luca.boccassi@gmail.com To: Olivier Matz Cc: Wenjun Wu , dpdk stable Subject: patch 'net/ixgbevf: fix promiscuous and allmulti' has been queued to stable release 20.11.7 Date: Tue, 22 Nov 2022 22:02:34 +0000 Message-Id: <20221122220241.926784-10-luca.boccassi@gmail.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20221122220241.926784-1-luca.boccassi@gmail.com> References: <20221117230859.611465-34-luca.boccassi@gmail.com> <20221122220241.926784-1-luca.boccassi@gmail.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit 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 Hi, FYI, your patch has been queued to stable release 20.11.7 Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet. It will be pushed if I get no objections before 11/24/22. 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/kevintraynor/dpdk-stable This queued commit can be viewed at: https://github.com/kevintraynor/dpdk-stable/commit/035d9a8422e0f1a00fda7bfc8503efe7bbf08966 Thanks. Luca Boccassi --- >From 035d9a8422e0f1a00fda7bfc8503efe7bbf08966 Mon Sep 17 00:00:00 2001 From: Olivier Matz Date: Thu, 29 Sep 2022 14:21:55 +0200 Subject: [PATCH] net/ixgbevf: fix promiscuous and allmulti [ upstream commit 21e471abb548f91190479c75da0c28ebc25dec36 ] The configuration of allmulti and promiscuous modes conflicts together. For instance, if we enable promiscuous mode, then enable and disable allmulti, then the promiscuous mode is wrongly disabled. Fix this behavior by: - doing nothing when we set/unset allmulti if promiscuous mode is on - restorting the proper mode (none or allmulti) when we disable promiscuous mode Fixes: 1f4564ed7696 ("net/ixgbevf: enable promiscuous mode") Signed-off-by: Olivier Matz Acked-by: Wenjun Wu --- drivers/net/ixgbe/ixgbe_ethdev.c | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/drivers/net/ixgbe/ixgbe_ethdev.c b/drivers/net/ixgbe/ixgbe_ethdev.c index 3bd4a838e5..cee7ee33f3 100644 --- a/drivers/net/ixgbe/ixgbe_ethdev.c +++ b/drivers/net/ixgbe/ixgbe_ethdev.c @@ -8033,9 +8033,13 @@ static int ixgbevf_dev_promiscuous_disable(struct rte_eth_dev *dev) { struct ixgbe_hw *hw = IXGBE_DEV_PRIVATE_TO_HW(dev->data->dev_private); + int mode = IXGBEVF_XCAST_MODE_NONE; int ret; - switch (hw->mac.ops.update_xcast_mode(hw, IXGBEVF_XCAST_MODE_NONE)) { + if (dev->data->all_multicast) + mode = IXGBEVF_XCAST_MODE_ALLMULTI; + + switch (hw->mac.ops.update_xcast_mode(hw, mode)) { case IXGBE_SUCCESS: ret = 0; break; @@ -8057,6 +8061,9 @@ ixgbevf_dev_allmulticast_enable(struct rte_eth_dev *dev) int ret; int mode = IXGBEVF_XCAST_MODE_ALLMULTI; + if (dev->data->promiscuous) + return 0; + switch (hw->mac.ops.update_xcast_mode(hw, mode)) { case IXGBE_SUCCESS: ret = 0; @@ -8078,6 +8085,9 @@ ixgbevf_dev_allmulticast_disable(struct rte_eth_dev *dev) struct ixgbe_hw *hw = IXGBE_DEV_PRIVATE_TO_HW(dev->data->dev_private); int ret; + if (dev->data->promiscuous) + return 0; + switch (hw->mac.ops.update_xcast_mode(hw, IXGBEVF_XCAST_MODE_MULTI)) { case IXGBE_SUCCESS: ret = 0; -- 2.34.1 --- Diff of the applied patch vs upstream commit (please double-check if non-empty: --- --- - 2022-11-22 22:01:32.181832353 +0000 +++ 0010-net-ixgbevf-fix-promiscuous-and-allmulti.patch 2022-11-22 22:01:31.507524649 +0000 @@ -1 +1 @@ -From 21e471abb548f91190479c75da0c28ebc25dec36 Mon Sep 17 00:00:00 2001 +From 035d9a8422e0f1a00fda7bfc8503efe7bbf08966 Mon Sep 17 00:00:00 2001 @@ -5,0 +6,2 @@ +[ upstream commit 21e471abb548f91190479c75da0c28ebc25dec36 ] + @@ -16 +17,0 @@ -Cc: stable@dpdk.org @@ -25 +26 @@ -index fd06ddbe35..ae9f65b334 100644 +index 3bd4a838e5..cee7ee33f3 100644 @@ -28 +29 @@ -@@ -7787,9 +7787,13 @@ static int +@@ -8033,9 +8033,13 @@ static int @@ -43 +44 @@ -@@ -7811,6 +7815,9 @@ ixgbevf_dev_allmulticast_enable(struct rte_eth_dev *dev) +@@ -8057,6 +8061,9 @@ ixgbevf_dev_allmulticast_enable(struct rte_eth_dev *dev) @@ -53 +54 @@ -@@ -7832,6 +7839,9 @@ ixgbevf_dev_allmulticast_disable(struct rte_eth_dev *dev) +@@ -8078,6 +8085,9 @@ ixgbevf_dev_allmulticast_disable(struct rte_eth_dev *dev)