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 B4CFA45E41 for ; Sat, 7 Dec 2024 09:04:00 +0100 (CET) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id AD12B40E4C; Sat, 7 Dec 2024 09:04:00 +0100 (CET) Received: from NAM10-DM6-obe.outbound.protection.outlook.com (mail-dm6nam10on2083.outbound.protection.outlook.com [40.107.93.83]) by mails.dpdk.org (Postfix) with ESMTP id 597924065A for ; Sat, 7 Dec 2024 09:03:59 +0100 (CET) ARC-Seal: i=1; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=none; b=NxUrWD07Lnk3zX7WDloDz/YMSSSo2cilseCrmRVFRhgeag0YALiA7LDCjfuJUJ6+tr6KRt1EklxtmZNzJt0urOHMZs4+lIBN4/ofXTtIl6eCd9jLMIRcBicZ8IPPanZITYOnh5KhVy21whODsQM+XsjEXNt/DyUz4Nzxy/TVUIxCuRH78/XxY43QdpULH1LznnZE/6DXVMPRksWalb1LEaer5PGVFDnv5OvG7CAOntfGlVNWmEYOdChxqFibw50IQddbbi13t+QWmn4yAHKjXOM+NwRpA6eZ4wDv5IU/8BW8LjBJKqoxBovtHEc1gbmBSI2Q3jvSUVaOSmGqpy572Q== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector10001; 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=3dIjNN0Gdod8WGGnjua7SxAEAU5iJEs/F8KFgNj+Iuo=; b=yUUx8vbxEpAasQtgxI5ZsY+HoyGP2kC8vJHzVJzjm0a6MrJhz6GgIKMM/NAkNNt+b9NuMYVxiDDJVu+53VH7YpvsO6hixHRmw3vJ2jbnQN1AqE/yJcOo+PF7u/9XhC9kniT3QMD7mpEs0l/evsWzIUJM2XDULyI/bhu/uMMwfklTxGpdm9SL+gJ9dhcUShoceje64D4M7I59HTuoxlwfdIU2PWsy7meJPIqkD5tCcUL3f/w3t8YfLxdI4XQvm7o02KBdpCRc/qImIHomrFRnOQEkpAkogiFg4xFI1LMstHVPZfWmn8b2tX4vNEq0/5k6VsYLTuX0DcUQE+MKex4yag== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass (sender ip is 216.228.117.161) smtp.rcpttodomain=microsoft.com smtp.mailfrom=nvidia.com; dmarc=pass (p=reject sp=reject pct=100) action=none header.from=nvidia.com; dkim=none (message not signed); arc=none (0) 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=3dIjNN0Gdod8WGGnjua7SxAEAU5iJEs/F8KFgNj+Iuo=; b=s09m33If9DkwAlOKMzqGwXHGrYvIhGXQR8qOu5lBeVIT1B/2/NxGwL2YmTaVShEBBQnZ5esUxdCJPytON3vKsPKqeDJU06j8ZSELYIsoWBFNvsBlF72v6IM8lnwD+xjWXbDonCDic73NL4eume3GjDN5Ans5cp1O3Gr+hzStZMQnAw6TVfYDGGZApi6OJWWBypQJRwYuv+qwqFKk0LZm1N2YRPhdU+5ku7BPjJWUh+uSJ78k+wn1C06+QPc9KeQYmlXF6dSIW8+xPNtQ/HCs2zhv2IXZ21JsxLSCdFEWEU5biHzg2wIy4QmPOwsboEvFT2k1Vc0urvOMHctaFj/yvg== Received: from SJ0PR03CA0127.namprd03.prod.outlook.com (2603:10b6:a03:33c::12) by SN7PR12MB6790.namprd12.prod.outlook.com (2603:10b6:806:269::15) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.8207.20; Sat, 7 Dec 2024 08:03:52 +0000 Received: from SJ1PEPF00001CE2.namprd05.prod.outlook.com (2603:10b6:a03:33c:cafe::c4) by SJ0PR03CA0127.outlook.office365.com (2603:10b6:a03:33c::12) with Microsoft SMTP Server (version=TLS1_3, cipher=TLS_AES_256_GCM_SHA384) id 15.20.8230.12 via Frontend Transport; Sat, 7 Dec 2024 08:03:52 +0000 X-MS-Exchange-Authentication-Results: spf=pass (sender IP is 216.228.117.161) 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.117.161 as permitted sender) receiver=protection.outlook.com; client-ip=216.228.117.161; helo=mail.nvidia.com; pr=C Received: from mail.nvidia.com (216.228.117.161) by SJ1PEPF00001CE2.mail.protection.outlook.com (10.167.242.10) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.8230.7 via Frontend Transport; Sat, 7 Dec 2024 08:03:51 +0000 Received: from rnnvmail201.nvidia.com (10.129.68.8) by mail.nvidia.com (10.129.200.67) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.2.1544.4; Sat, 7 Dec 2024 00:03:40 -0800 Received: from nvidia.com (10.126.231.35) by rnnvmail201.nvidia.com (10.129.68.8) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.2.1544.4; Sat, 7 Dec 2024 00:03:38 -0800 From: Xueming Li To: Long Li CC: Xueming Li , Stephen Hemminger , dpdk stable Subject: patch 'net/netvsc: force Tx VLAN offload on 801.2Q packet' has been queued to stable release 23.11.3 Date: Sat, 7 Dec 2024 15:59:46 +0800 Message-ID: <20241207080055.488538-29-xuemingl@nvidia.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20241207080055.488538-1-xuemingl@nvidia.com> References: <20241111062847.216344-122-xuemingl@nvidia.com> <20241207080055.488538-1-xuemingl@nvidia.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Content-Type: text/plain X-Originating-IP: [10.126.231.35] X-ClientProxiedBy: rnnvmail201.nvidia.com (10.129.68.8) To rnnvmail201.nvidia.com (10.129.68.8) X-EOPAttributedMessage: 0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: SJ1PEPF00001CE2:EE_|SN7PR12MB6790:EE_ X-MS-Office365-Filtering-Correlation-Id: a4b1efd8-812c-4d46-b16e-08dd1695b04f X-LD-Processed: 43083d15-7273-40c1-b7db-39efd9ccc17a,ExtAddr X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; ARA:13230040|82310400026|1800799024|376014|36860700013|7053199007; X-Microsoft-Antispam-Message-Info: =?us-ascii?Q?eUAa1PH18ReiAtV4lmvXvN15nKkk5bDk3OsfYzDuMI19513n3DlasMlgfBTC?= =?us-ascii?Q?04eHbBiSxtjV1qLb00TJb1iCR6epIzw3SApkYwB0YijXKo0P1g1gXaayzUIX?= =?us-ascii?Q?34RwPNuqVSCu5EEpzaujbz95RyJIvocWL+c6LwVppxNbaYkAV9FPxgBIK4wK?= =?us-ascii?Q?dWwnUsRDcq4sAygey02vfTgXTOkh2f9dWeBRUR3ls5q7vKxTTW3GxX9RvgPD?= =?us-ascii?Q?zbLRRVwfIlRVUtY000rKlbVjjvZvC+E8vMcbex2x55IBmP86e0UJGY8Isni6?= =?us-ascii?Q?7U7IMMZkNznXuabehDFoXmCvDzuokJfPE68s15v/yp2qqXubfzraQnXsQNB9?= =?us-ascii?Q?Was2taTJDT4RQ1+czanNK+tn0zGmJWiCTvUS4+hoc3EYh9byetgqu4DNYt5l?= =?us-ascii?Q?1srcfUanEGzVJAdilbcjF2Y9sozq778elumh0ekXvEvYlIhmAalQotPNeisS?= =?us-ascii?Q?TUX1IYUMhnavqnrQvwGndT5HpjUyfT8nFLB291lShF3ITlvH50sogYvhQNFN?= =?us-ascii?Q?I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1iylkQbPHov+mTZJ?= =?us-ascii?Q?cZKBIKWeSSPtOrwfTQ8AcrEtGDSlmG4q?= X-Forefront-Antispam-Report: CIP:216.228.117.161; CTRY:US; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:mail.nvidia.com; PTR:dc6edge2.nvidia.com; CAT:NONE; SFS:(13230040)(82310400026)(1800799024)(376014)(36860700013)(7053199007); DIR:OUT; SFP:1101; X-OriginatorOrg: Nvidia.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 07 Dec 2024 08:03:51.9804 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: a4b1efd8-812c-4d46-b16e-08dd1695b04f X-MS-Exchange-CrossTenant-Id: 43083d15-7273-40c1-b7db-39efd9ccc17a X-MS-Exchange-CrossTenant-OriginalAttributedTenantConnectingIp: TenantId=43083d15-7273-40c1-b7db-39efd9ccc17a; Ip=[216.228.117.161]; Helo=[mail.nvidia.com] X-MS-Exchange-CrossTenant-AuthSource: SJ1PEPF00001CE2.namprd05.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: SN7PR12MB6790 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 23.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 12/10/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://git.dpdk.org/dpdk-stable/log/?h=23.11-staging This queued commit can be viewed at: https://git.dpdk.org/dpdk-stable/commit/?h=23.11-staging&id=9458e5b98f1d4c71dc0baeb88c0963033c8ebc69 Thanks. Xueming Li --- >From 9458e5b98f1d4c71dc0baeb88c0963033c8ebc69 Mon Sep 17 00:00:00 2001 From: Long Li Date: Fri, 18 Oct 2024 11:13:50 -0700 Subject: [PATCH] net/netvsc: force Tx VLAN offload on 801.2Q packet Cc: Xueming Li [ upstream commit 06c968f9ba8afeaf03b60871a453652a5828ff3f ] The VSP assumes the packet doesn't have VLAN tags. When VLAN tag is present in a TX packet, always strip it and use PPI to send VLAN info through VSP packet. Fixes: 4e9c73e96e83 ("net/netvsc: add Hyper-V network device") Signed-off-by: Long Li Reviewed-by: Stephen Hemminger --- drivers/net/netvsc/hn_rxtx.c | 20 +++++++++++++++++++- 1 file changed, 19 insertions(+), 1 deletion(-) diff --git a/drivers/net/netvsc/hn_rxtx.c b/drivers/net/netvsc/hn_rxtx.c index 5777a14d70..eea120ae82 100644 --- a/drivers/net/netvsc/hn_rxtx.c +++ b/drivers/net/netvsc/hn_rxtx.c @@ -1569,14 +1569,32 @@ hn_xmit_pkts(void *ptxq, struct rte_mbuf **tx_pkts, uint16_t nb_pkts) for (nb_tx = 0; nb_tx < nb_pkts; nb_tx++) { struct rte_mbuf *m = tx_pkts[nb_tx]; - uint32_t pkt_size = m->pkt_len + HN_RNDIS_PKT_LEN; struct rndis_packet_msg *pkt; struct hn_txdesc *txd; + uint32_t pkt_size; txd = hn_txd_get(txq); if (txd == NULL) break; + if (!(m->ol_flags & RTE_MBUF_F_TX_VLAN)) { + struct rte_ether_hdr *eh = + rte_pktmbuf_mtod(m, struct rte_ether_hdr *); + struct rte_vlan_hdr *vh; + + /* Force TX vlan offloading for 801.2Q packet */ + if (eh->ether_type == rte_cpu_to_be_16(RTE_ETHER_TYPE_VLAN)) { + vh = (struct rte_vlan_hdr *)(eh + 1); + m->ol_flags |= RTE_MBUF_F_TX_VLAN; + m->vlan_tci = rte_be_to_cpu_16(vh->vlan_tci); + + /* Copy ether header over */ + memmove(rte_pktmbuf_adj(m, sizeof(struct rte_vlan_hdr)), + eh, 2 * RTE_ETHER_ADDR_LEN); + } + } + pkt_size = m->pkt_len + HN_RNDIS_PKT_LEN; + /* For small packets aggregate them in chimney buffer */ if (m->pkt_len <= hv->tx_copybreak && pkt_size <= txq->agg_szmax) { -- 2.34.1 --- Diff of the applied patch vs upstream commit (please double-check if non-empty: --- --- - 2024-12-06 23:26:45.052428615 +0800 +++ 0028-net-netvsc-force-Tx-VLAN-offload-on-801.2Q-packet.patch 2024-12-06 23:26:43.913044828 +0800 @@ -1 +1 @@ -From 06c968f9ba8afeaf03b60871a453652a5828ff3f Mon Sep 17 00:00:00 2001 +From 9458e5b98f1d4c71dc0baeb88c0963033c8ebc69 Mon Sep 17 00:00:00 2001 @@ -4,0 +5,3 @@ +Cc: Xueming Li + +[ upstream commit 06c968f9ba8afeaf03b60871a453652a5828ff3f ] @@ -11 +13,0 @@ -Cc: stable@dpdk.org @@ -20 +22 @@ -index 52aedb001f..9d3948e03d 100644 +index 5777a14d70..eea120ae82 100644 @@ -23 +25 @@ -@@ -1557,14 +1557,32 @@ hn_xmit_pkts(void *ptxq, struct rte_mbuf **tx_pkts, uint16_t nb_pkts) +@@ -1569,14 +1569,32 @@ hn_xmit_pkts(void *ptxq, struct rte_mbuf **tx_pkts, uint16_t nb_pkts)