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 EBE87455AD for ; Mon, 15 Jul 2024 17:29:48 +0200 (CEST) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id E3DBF40DFB; Mon, 15 Jul 2024 17:29:48 +0200 (CEST) Received: from mail-wm1-f42.google.com (mail-wm1-f42.google.com [209.85.128.42]) by mails.dpdk.org (Postfix) with ESMTP id B335A40A71 for ; Mon, 15 Jul 2024 17:29:41 +0200 (CEST) Received: by mail-wm1-f42.google.com with SMTP id 5b1f17b1804b1-427b4c621b9so4519925e9.1 for ; Mon, 15 Jul 2024 08:29:41 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1721057381; x=1721662181; darn=dpdk.org; 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=kRWXW+CtIDf22q3qwf+DI96Jae1Messxjrm1UsBkVfQ=; b=BElUoPPwk5PraFhQaGaIoQEg0gG4mCMo5wKtJMkaI8acLCPpb32CXkSyHv80RBAzSg UOhZoXrZ+53Y/DgitJWd1ISwVaBT6bTgdnuXH7g85yMMWlMZqj9b+p3p3GAciD0rNv+/ Si2n0w1YhZ8ho36F44VP8eyAJgsljCYoTAwb7kp+7bgtAmXStdmJb6JtMi1xXmYwFKQZ eQESc3/Nj0t0lnLJISS49O2Lr7pu1ICg5VnCe5IQiQSJeKwwgVYth+eWtLSEHlJlUGA+ wttLAmfH3OKn0xQ/gb9tKE70/JWBrHj5GPznroPfZ3bT0GMbJ0C0LXB4SuPzAKOG3chy wn1w== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1721057381; x=1721662181; 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=kRWXW+CtIDf22q3qwf+DI96Jae1Messxjrm1UsBkVfQ=; b=Wd3i/AzAKK/juMjD2G1AnG6L2JohoMrIet3eNIGWd5A93ebFNtYiF2pOJSrbUZyJ1+ XxM4tTBB0ZMQZfdl95lhFSBKCc65myrR+HCWvv4eD2wOsgl425R8ZqRaJknPZSZKXkts arzYcpUt4rfZPdQRafKlB2r1aTgGpAcCsFes/XBPz68sjrxKPKrAP4NKavUJX35IaPY2 FjolEB+8+9ycPtGQgoNLDXsPOM3SlhBMFyMYlHXVg4EMhCJk97bvbjmzvVYBbKIe8PSi VLCYifXX3S+RfqZs4SWOR6w8tQRxd1kBlmxH+3i9VwWSJNCUodjfs513byGPZoz/lzp9 LOvA== X-Forwarded-Encrypted: i=1; AJvYcCX1PxHZGrefVRpj57hS/RJd79mBpQZ/mcVxJFyxYqSooXKidByoQ3t9nxHKklD5x7bFUCr3ZXSKnmv4hBqkGZI= X-Gm-Message-State: AOJu0YyvslQAZ2zyJLD/UlAEjFhJDoF4CNzqFVGyhH5uw9HMksayhR52 SThZvtHteKXRcG7oDLujfT8PmfDQudCtRIl70I5unQZ39i4tQqg8aWUwMpW/B/U= X-Google-Smtp-Source: AGHT+IEdAb41OiCltw17+SlXxh7nfYLkScYrx9ybmDtxmOcAKFEVCr1xOb1iWtbrxspftEj//F57JA== X-Received: by 2002:a05:600c:5112:b0:426:8884:3781 with SMTP id 5b1f17b1804b1-4268884382dmr116347615e9.24.1721057381300; Mon, 15 Jul 2024 08:29:41 -0700 (PDT) Received: from localhost ([137.220.120.171]) by smtp.gmail.com with ESMTPSA id 5b1f17b1804b1-427a5e8266asm92018215e9.13.2024.07.15.08.29.40 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 15 Jul 2024 08:29:40 -0700 (PDT) From: luca.boccassi@gmail.com To: Mateusz Pacuszka Cc: Ian Stokes , Bruce Richardson , dpdk stable Subject: patch 'net/ice/base: fix check for existing switch rule' has been queued to stable release 22.11.6 Date: Mon, 15 Jul 2024 16:26:28 +0100 Message-Id: <20240715152704.2229503-50-luca.boccassi@gmail.com> X-Mailer: git-send-email 2.39.2 In-Reply-To: <20240715152704.2229503-1-luca.boccassi@gmail.com> References: <20240624235907.885628-81-luca.boccassi@gmail.com> <20240715152704.2229503-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 22.11.6 Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet. It will be pushed if I get no objections before 07/17/24. 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/bluca/dpdk-stable This queued commit can be viewed at: https://github.com/bluca/dpdk-stable/commit/39696cfa70eccbd5a518dad057bbeb120ea4cc52 Thanks. Luca Boccassi --- >From 39696cfa70eccbd5a518dad057bbeb120ea4cc52 Mon Sep 17 00:00:00 2001 From: Mateusz Pacuszka Date: Wed, 26 Jun 2024 12:41:20 +0100 Subject: [PATCH] net/ice/base: fix check for existing switch rule [ upstream commit 771db7d9466488135a2899f8809d6e61bc685ed5 ] In case the rule already exists and another VSI wants to subscribe to it, a new VSI list is being created and both VSIs are moved to it. Currently, the check for already existing VSI with the same rule is done based on fdw_id.hw_vsi_id, which applies only to LOOKUP_RX flag. Change it to vsi_handle. This is software VSI ID, but it can be applied here, because vsi_map itself is also based on it. Additionally change return status in case the VSI already exists in the VSI map to "Already exists". Such case should be handled by the caller. Fixes: c7dd15931183 ("net/ice/base: add virtual switch code") Signed-off-by: Mateusz Pacuszka Signed-off-by: Ian Stokes Acked-by: Bruce Richardson --- drivers/net/ice/base/ice_switch.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/net/ice/base/ice_switch.c b/drivers/net/ice/base/ice_switch.c index 697b45ccf4..073c139c43 100644 --- a/drivers/net/ice/base/ice_switch.c +++ b/drivers/net/ice/base/ice_switch.c @@ -4339,7 +4339,7 @@ ice_add_update_vsi_list(struct ice_hw *hw, u16 vsi_handle_arr[2]; /* A rule already exists with the new VSI being added */ - if (cur_fltr->fwd_id.hw_vsi_id == new_fltr->fwd_id.hw_vsi_id) + if (cur_fltr->vsi_handle == new_fltr->vsi_handle) return ICE_ERR_ALREADY_EXISTS; vsi_handle_arr[0] = cur_fltr->vsi_handle; @@ -4387,7 +4387,7 @@ ice_add_update_vsi_list(struct ice_hw *hw, /* A rule already exists with the new VSI being added */ if (ice_is_bit_set(m_entry->vsi_list_info->vsi_map, vsi_handle)) - return ICE_SUCCESS; + return ICE_ERR_ALREADY_EXISTS; /* Update the previously created VSI list set with * the new VSI ID passed in -- 2.39.2 --- Diff of the applied patch vs upstream commit (please double-check if non-empty: --- --- - 2024-07-15 16:19:37.164552888 +0100 +++ 0050-net-ice-base-fix-check-for-existing-switch-rule.patch 2024-07-15 16:19:34.608207317 +0100 @@ -1 +1 @@ -From 771db7d9466488135a2899f8809d6e61bc685ed5 Mon Sep 17 00:00:00 2001 +From 39696cfa70eccbd5a518dad057bbeb120ea4cc52 Mon Sep 17 00:00:00 2001 @@ -5,0 +6,2 @@ +[ upstream commit 771db7d9466488135a2899f8809d6e61bc685ed5 ] + @@ -17 +18,0 @@ -Cc: stable@dpdk.org @@ -27 +28 @@ -index fa5bd94c58..f8d98d8a9e 100644 +index 697b45ccf4..073c139c43 100644 @@ -30 +31 @@ -@@ -4624,7 +4624,7 @@ ice_add_update_vsi_list(struct ice_hw *hw, +@@ -4339,7 +4339,7 @@ ice_add_update_vsi_list(struct ice_hw *hw, @@ -39 +40 @@ -@@ -4672,7 +4672,7 @@ ice_add_update_vsi_list(struct ice_hw *hw, +@@ -4387,7 +4387,7 @@ ice_add_update_vsi_list(struct ice_hw *hw, @@ -43 +44 @@ -- return 0; +- return ICE_SUCCESS;