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 B8227A034F for ; Wed, 10 Nov 2021 07:35:27 +0100 (CET) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id AE8E140142; Wed, 10 Nov 2021 07:35:27 +0100 (CET) Received: from NAM12-DM6-obe.outbound.protection.outlook.com (mail-dm6nam12on2081.outbound.protection.outlook.com [40.107.243.81]) by mails.dpdk.org (Postfix) with ESMTP id 2CAB640142 for ; Wed, 10 Nov 2021 07:35:26 +0100 (CET) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=ju757uYrmGvJUihY8KqW77VIUNYG9p76RjdbyA+eXYUcmO1fR64+bzBgQRd2yA3JsWZusfOjiYxGsJDuS6qaWxp2jFsersoHSyOPjtQCJSs4kaEtZfFYxmAkSQtxmxm1GT2FeKLsK0aebG6yHY3ysl2TLMtQW7DA8A4e/ZC0trg05PkhYVLNf6iH7Q6rbiodW2NpVmOn+ckt4qTP+QAQLdHQZVuJSGzoH7NPvzgcNcA93L5lOPMIHtC2RrKpa02RT4HeFKSryRWqmIVtUoeGze9+0bgR9n0QpUl5fEKLwqCS5dVBqDr38TzofejqDQ580Kn2EWqLelsUNr06aEaSFA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=VHgM1dD5zutH3j+Ua37kuuAwt7N3q+Be56oPJ8EoxCo=; b=T18Zd39VA+cVGCyzniCuSQwB0VNMEsQfTajgLitsJxy1TY7pW9mt8dzyoVlJLPcMEV92jNsM7PqmBpTvW/Lcc1tHW3Q6XflhqmGKSnCWmLVdngVT80VoVnl7rfDQJ5sdAiT8x5+9br7Bc0NuKmnc3EerWRjt2NvWjfrDWr13NzxdSxiHXzDfln2ho95o6W4DqlsnM9Aw1/Usc9T47QbLbOaxzJ0nY9rDKtDHjd0D2lL30bodJgc+aBqgwXW4+hkPNO+hPOHtTvE4hzoMTqHR0VxOECVfUsLDKxBrvEnmpGn4l6i/qQFdZ65RyV+rNSxt/zRRnMaB7cf+gMlrp5p5rQ== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass (sender ip is 216.228.112.34) smtp.rcpttodomain=broadcom.com smtp.mailfrom=nvidia.com; dmarc=pass (p=quarantine sp=quarantine pct=100) action=none header.from=nvidia.com; dkim=none (message not signed); arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=Nvidia.com; s=selector2; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=VHgM1dD5zutH3j+Ua37kuuAwt7N3q+Be56oPJ8EoxCo=; b=iSv5Al2IeH2V/dT0GAjW1fKiL5K3tC4wDr4QFu0qgED4XL7JwFp6X8hh4s8+onEY7KOvdVdEdc1ZEoAfvKHwJOlJAraE3rfbqYPTsQkmw224KLLi9IrlHPvQ3TOXitXAupXLpznhdgyyfTE6yinTdP18kGSH17BAibe23UF4TIsc8gz9Pzh1NGMQbNMydGaSjayivZ5Zu/WKO69rAfnN21l57wJc0a+GqmY4Cs106NZd5S6CFO0JbsSOjOcqROMmx7v/wXieACw0OHucYIowcMH36huFXsdorBApn7UdMcmNSsTeEpMUes1bAxPL/JNaw103zuG08XrXicLiZSiwmQ== Received: from DM6PR05CA0047.namprd05.prod.outlook.com (2603:10b6:5:335::16) by DM6PR12MB3337.namprd12.prod.outlook.com (2603:10b6:5:118::13) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4690.15; Wed, 10 Nov 2021 06:35:24 +0000 Received: from DM6NAM11FT033.eop-nam11.prod.protection.outlook.com (2603:10b6:5:335:cafe::4d) by DM6PR05CA0047.outlook.office365.com (2603:10b6:5:335::16) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4690.12 via Frontend Transport; Wed, 10 Nov 2021 06:35:24 +0000 X-MS-Exchange-Authentication-Results: spf=pass (sender IP is 216.228.112.34) smtp.mailfrom=nvidia.com; dkim=none (message not signed) header.d=none;dmarc=pass action=none header.from=nvidia.com; Received-SPF: Pass (protection.outlook.com: domain of nvidia.com designates 216.228.112.34 as permitted sender) receiver=protection.outlook.com; client-ip=216.228.112.34; helo=mail.nvidia.com; Received: from mail.nvidia.com (216.228.112.34) by DM6NAM11FT033.mail.protection.outlook.com (10.13.172.221) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384) id 15.20.4669.10 via Frontend Transport; Wed, 10 Nov 2021 06:35:23 +0000 Received: from nvidia.com (172.20.187.5) by HQMAIL107.nvidia.com (172.20.187.13) with Microsoft SMTP Server (TLS) id 15.0.1497.18; Wed, 10 Nov 2021 06:35:21 +0000 From: Xueming Li To: Kalesh AP CC: Luca Boccassi , Somnath Kotur , Lance Richardson , Ajit Khaparde , dpdk stable Date: Wed, 10 Nov 2021 14:28:31 +0800 Message-ID: <20211110063216.2744012-28-xuemingl@nvidia.com> X-Mailer: git-send-email 2.33.0 In-Reply-To: <20211110063216.2744012-1-xuemingl@nvidia.com> References: <20211110063216.2744012-1-xuemingl@nvidia.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Content-Type: text/plain X-Originating-IP: [172.20.187.5] X-ClientProxiedBy: HQMAIL101.nvidia.com (172.20.187.10) To HQMAIL107.nvidia.com (172.20.187.13) X-EOPAttributedMessage: 0 X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: 8511f08c-641d-4b35-0cc9-08d9a4144697 X-MS-TrafficTypeDiagnostic: DM6PR12MB3337: X-Microsoft-Antispam-PRVS: X-MS-Oob-TLC-OOBClassifiers: OLM:10000; X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: 8l928wcsQqq9dni/sRVITaNQEbgjf1c85322CpwvExrlPGSjGXEJJzM8zhhxWfawW6N167IIqn5BYciB8OPd0Zt65Qi6Zk9Gl+M/5BktfRSeHl6nen5ng5hjtz8s98bj3f+cRZgeJFHv4ZrirXc8cqOuZIxoMoAJ14xMY5S4V+9Xi/DNaL2B1CY54Ba9FjcG4AnixhRlgcAwfd98TucGq/VcBP8Wk19HNMOVo9JfH2SE9LRhJ4tmgvqcFIAYnPSbwPIclgP0us5KdtUGGaVdmn+CO8+Z9fGes8rGTqmZO+kwXxNjVuTbDKDklSl2mobP4jDrD9OnFJmiTUlaLuNNuJSRBgww9dINQ5LWWeOOONWXJgI8Vl++hGcorXN894ZMf3ug0z+lmkYLZm5yfeNtdZ0oUiyI45hAKsHJw5jGR1AG1ph3gLJ5S77/YqDxHfXEMzfCQzKp1Mjg1xIClQVx2gMLJwPfvkLCcSrKvkmtdc1hFQePeReKpWS6cFmgCB5d7KTUEL8mRRcpESK014Nako/uow2+Tnd+ZsUFM6tG0pyLbMxDd8e3kzNf0qlrinG26x+zOd1EGISva+/iWyqMG35vOb2YV2dFeUuMsFUeU4n5YMjFMndodvQYBWc8H0o0Dzzraevjub6+H0WV9MywPwB8gHXeFfdKMCpsOU4cwOCvYMRf4rnC6e0Z542ILzLQN3FYYUO4Jwr/WroDl2HtJmCEOmJOt7QeaAkYMQWZruKz/dPiJDKR9nZpNgxyC2q5IMD+EISWB/D0ifOYIcDYgZSi0T+I0dKtvWtiQ/nTuzyesobvOZaqVkK0EZTslxAXKJ/U+pe1rzZh1yBfZmbzmA== X-Forefront-Antispam-Report: CIP:216.228.112.34; CTRY:US; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:mail.nvidia.com; PTR:schybrid03.nvidia.com; CAT:NONE; SFS:(4636009)(46966006)(36840700001)(6916009)(2616005)(426003)(5660300002)(6286002)(2906002)(8676002)(70206006)(4001150100001)(36860700001)(54906003)(19627235002)(336012)(508600001)(47076005)(966005)(7636003)(70586007)(53546011)(186003)(55016002)(36906005)(26005)(16526019)(8936002)(316002)(6666004)(82310400003)(86362001)(1076003)(356005)(7696005)(36756003)(4326008); DIR:OUT; SFP:1101; X-OriginatorOrg: Nvidia.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 10 Nov 2021 06:35:23.8532 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: 8511f08c-641d-4b35-0cc9-08d9a4144697 X-MS-Exchange-CrossTenant-Id: 43083d15-7273-40c1-b7db-39efd9ccc17a X-MS-Exchange-CrossTenant-OriginalAttributedTenantConnectingIp: TenantId=43083d15-7273-40c1-b7db-39efd9ccc17a; Ip=[216.228.112.34]; Helo=[mail.nvidia.com] X-MS-Exchange-CrossTenant-AuthSource: DM6NAM11FT033.eop-nam11.prod.protection.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: DM6PR12MB3337 Subject: [dpdk-stable] patch 'net/bnxt: fix mbuf VLAN in scalar Rx' has been queued to stable release 20.11.4 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 Sender: "stable" Hi, FYI, your patch has been queued to stable release 20.11.4 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/12/21. 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/steevenlee/dpdk This queued commit can be viewed at: https://github.com/steevenlee/dpdk/commit/16f8bcc3d8dea84d2bf65f3d7d33d9690eb645cf Thanks. Xueming Li --- >From 16f8bcc3d8dea84d2bf65f3d7d33d9690eb645cf Mon Sep 17 00:00:00 2001 From: Kalesh AP Date: Mon, 23 Aug 2021 13:42:12 +0530 Subject: [PATCH] net/bnxt: fix mbuf VLAN in scalar Rx Cc: Xueming Li [ upstream commit 167978c1678fc5fd525e4e731de4c00093aee129 ] In the scalar Rx path, for the VLAN packet, TCI is not saved in the "mbuf->vlan_tci", however the STRIPPED offload flag is set along with PKT_RX_VLAN flag. Fixes: c1b33d40315f ("net/bnxt: use table based mbuf flags handling") Signed-off-by: Kalesh AP Reviewed-by: Somnath Kotur Reviewed-by: Lance Richardson Reviewed-by: Ajit Khaparde --- drivers/net/bnxt/bnxt_rxr.c | 2 ++ drivers/net/bnxt/bnxt_rxr.h | 10 ++++++++++ 2 files changed, 12 insertions(+) diff --git a/drivers/net/bnxt/bnxt_rxr.c b/drivers/net/bnxt/bnxt_rxr.c index 655f09a9bf..6b3603d11f 100644 --- a/drivers/net/bnxt/bnxt_rxr.c +++ b/drivers/net/bnxt/bnxt_rxr.c @@ -891,6 +891,8 @@ static int bnxt_rx_pkt(struct rte_mbuf **rx_pkt, } #endif + bnxt_set_vlan(rxcmp1, mbuf); + if (BNXT_TRUFLOW_EN(bp)) mark_id = bnxt_ulp_set_mark_in_mbuf(rxq->bp, rxcmp1, mbuf, &vfr_flag); diff --git a/drivers/net/bnxt/bnxt_rxr.h b/drivers/net/bnxt/bnxt_rxr.h index 46b284024e..0fd5920f0a 100644 --- a/drivers/net/bnxt/bnxt_rxr.h +++ b/drivers/net/bnxt/bnxt_rxr.h @@ -126,3 +126,13 @@ bnxt_cfa_code_dynfield(struct rte_mbuf *mbuf) #define BNXT_PTYPE_TBL_DIM 128 extern uint32_t bnxt_ptype_table[BNXT_PTYPE_TBL_DIM]; #endif +static inline void bnxt_set_vlan(struct rx_pkt_cmpl_hi *rxcmp1, + struct rte_mbuf *mbuf) +{ + uint32_t metadata = rte_le_to_cpu_32(rxcmp1->metadata); + + mbuf->vlan_tci = metadata & (RX_PKT_CMPL_METADATA_VID_MASK | + RX_PKT_CMPL_METADATA_DE | + RX_PKT_CMPL_METADATA_PRI_MASK); +} + -- 2.33.0 --- Diff of the applied patch vs upstream commit (please double-check if non-empty: --- --- - 2021-11-10 14:17:03.326320246 +0800 +++ 0027-net-bnxt-fix-mbuf-VLAN-in-scalar-Rx.patch 2021-11-10 14:17:01.767413603 +0800 @@ -1 +1 @@ -From 167978c1678fc5fd525e4e731de4c00093aee129 Mon Sep 17 00:00:00 2001 +From 16f8bcc3d8dea84d2bf65f3d7d33d9690eb645cf Mon Sep 17 00:00:00 2001 @@ -4,0 +5,3 @@ +Cc: Xueming Li + +[ upstream commit 167978c1678fc5fd525e4e731de4c00093aee129 ] @@ -11 +13,0 @@ -Cc: stable@dpdk.org @@ -23 +25 @@ -index 73fbdd17d1..ccff80b944 100644 +index 655f09a9bf..6b3603d11f 100644 @@ -26,3 +28,3 @@ -@@ -962,6 +962,8 @@ static int bnxt_rx_pkt(struct rte_mbuf **rx_pkt, - - mbuf->packet_type = bnxt_parse_pkt_type(rxcmp, rxcmp1); +@@ -891,6 +891,8 @@ static int bnxt_rx_pkt(struct rte_mbuf **rx_pkt, + } + #endif @@ -36 +38 @@ -index dc2b1b7b4f..59adb7242c 100644 +index 46b284024e..0fd5920f0a 100644 @@ -39,2 +41,2 @@ -@@ -185,6 +185,16 @@ bnxt_check_ptype_constants(void) - +@@ -126,3 +126,13 @@ bnxt_cfa_code_dynfield(struct rte_mbuf *mbuf) + #define BNXT_PTYPE_TBL_DIM 128 @@ -42 +44 @@ - + #endif @@ -53,3 +54,0 @@ - /* Stingray2 specific code for RX completion parsing */ - #define RX_CMP_VLAN_VALID(rxcmp) \ - (((struct rx_pkt_v2_cmpl *)rxcmp)->metadata1_payload_offset & \