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 E9785A00C2 for ; Wed, 23 Nov 2022 19:05:27 +0100 (CET) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id E61DD42DB1; Wed, 23 Nov 2022 19:05:27 +0100 (CET) Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.129.124]) by mails.dpdk.org (Postfix) with ESMTP id 7E2D840E5A for ; Wed, 23 Nov 2022 19:05:26 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1669226725; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=e2fJXL971JhemwVSfi7tceBM0aGkB9jkVxmO0HJ9Iow=; b=PI4p6m+flZojFq+VQs730tG+tFjjglAklLb62jWau4mCmUSSlcLr6fS8HJCveMfWLKPsil AczKxwuqiyV01SEpSjl0lEWH76pUxMcAY2+jCC9TBzHINC+jwyE1pn4zbIBk8PkUYy21wb SGUKtonbtQEB3zdgIZgokFHK3bcbIPM= Received: from mimecast-mx02.redhat.com (mimecast-mx02.redhat.com [66.187.233.88]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id us-mta-615-XDKPTy1PNq6sdbBLq5vpbQ-1; Wed, 23 Nov 2022 13:05:22 -0500 X-MC-Unique: XDKPTy1PNq6sdbBLq5vpbQ-1 Received: from smtp.corp.redhat.com (int-mx10.intmail.prod.int.rdu2.redhat.com [10.11.54.10]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx02.redhat.com (Postfix) with ESMTPS id 257738027F5; Wed, 23 Nov 2022 18:05:22 +0000 (UTC) Received: from rh.Home (unknown [10.39.195.16]) by smtp.corp.redhat.com (Postfix) with ESMTP id 76575492B07; Wed, 23 Nov 2022 18:05:21 +0000 (UTC) From: Kevin Traynor To: Olivier Matz Cc: Wenjun Wu , dpdk stable Subject: patch 'net/ixgbevf: fix promiscuous and allmulti' has been queued to stable release 21.11.3 Date: Wed, 23 Nov 2022 18:04:05 +0000 Message-Id: <20221123180413.733554-52-ktraynor@redhat.com> In-Reply-To: <20221123180413.733554-1-ktraynor@redhat.com> References: <20221123180413.733554-1-ktraynor@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 3.1 on 10.11.54.10 X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Transfer-Encoding: 8bit Content-Type: text/plain; charset="US-ASCII"; x-default=true 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 21.11.3 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/28/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/4b50df7128c6444e85e6e9cec8e0be0e8fafde23 Thanks. Kevin --- >From 4b50df7128c6444e85e6e9cec8e0be0e8fafde23 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 31d06b6110..b56ac0e9f9 100644 --- a/drivers/net/ixgbe/ixgbe_ethdev.c +++ b/drivers/net/ixgbe/ixgbe_ethdev.c @@ -7790,7 +7790,11 @@ 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; @@ -7814,4 +7818,7 @@ ixgbevf_dev_allmulticast_enable(struct rte_eth_dev *dev) int mode = IXGBEVF_XCAST_MODE_ALLMULTI; + if (dev->data->promiscuous) + return 0; + switch (hw->mac.ops.update_xcast_mode(hw, mode)) { case IXGBE_SUCCESS: @@ -7835,4 +7842,7 @@ ixgbevf_dev_allmulticast_disable(struct rte_eth_dev *dev) int ret; + if (dev->data->promiscuous) + return 0; + switch (hw->mac.ops.update_xcast_mode(hw, IXGBEVF_XCAST_MODE_MULTI)) { case IXGBE_SUCCESS: -- 2.38.1 --- Diff of the applied patch vs upstream commit (please double-check if non-empty: --- --- - 2022-11-23 09:55:58.270962412 +0000 +++ 0052-net-ixgbevf-fix-promiscuous-and-allmulti.patch 2022-11-23 09:55:57.108149405 +0000 @@ -1 +1 @@ -From 21e471abb548f91190479c75da0c28ebc25dec36 Mon Sep 17 00:00:00 2001 +From 4b50df7128c6444e85e6e9cec8e0be0e8fafde23 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 31d06b6110..b56ac0e9f9 100644 @@ -28 +29 @@ -@@ -7788,7 +7788,11 @@ ixgbevf_dev_promiscuous_disable(struct rte_eth_dev *dev) +@@ -7790,7 +7790,11 @@ ixgbevf_dev_promiscuous_disable(struct rte_eth_dev *dev) @@ -41 +42 @@ -@@ -7812,4 +7816,7 @@ ixgbevf_dev_allmulticast_enable(struct rte_eth_dev *dev) +@@ -7814,4 +7818,7 @@ ixgbevf_dev_allmulticast_enable(struct rte_eth_dev *dev) @@ -49 +50 @@ -@@ -7833,4 +7840,7 @@ ixgbevf_dev_allmulticast_disable(struct rte_eth_dev *dev) +@@ -7835,4 +7842,7 @@ ixgbevf_dev_allmulticast_disable(struct rte_eth_dev *dev)