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 915AA45DB9 for ; Wed, 27 Nov 2024 18:22:33 +0100 (CET) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 8D375402DE; Wed, 27 Nov 2024 18:22:33 +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 0E4FD402DE for ; Wed, 27 Nov 2024 18:22:31 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1732728151; 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=yBxGJEDD7powHn6X1kv0/Whj0ZRM1ADnxbzvz/NH6nE=; b=D2vlBQ8HyDYY3KdYGjJLlCidBrzv/gpLdQPGENd1mKSer2RB+e8oU+8W4eJI1wlZCEO1I+ lMEEwlHkpOnJ39eA/EkJRpQjp3L4Uo99JYJVPLhx5Hl8rz84nzeeLKG6QaqdSikaBluWuG f2xZgvrjr0jL8hcSPT7M5Ol/+ykBUIs= Received: from mx-prod-mc-05.mail-002.prod.us-west-2.aws.redhat.com (ec2-54-186-198-63.us-west-2.compute.amazonaws.com [54.186.198.63]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-335-t3QVsjlZN-aSqrQs8mRfug-1; Wed, 27 Nov 2024 12:22:28 -0500 X-MC-Unique: t3QVsjlZN-aSqrQs8mRfug-1 X-Mimecast-MFC-AGG-ID: t3QVsjlZN-aSqrQs8mRfug Received: from mx-prod-int-01.mail-002.prod.us-west-2.aws.redhat.com (mx-prod-int-01.mail-002.prod.us-west-2.aws.redhat.com [10.30.177.4]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by mx-prod-mc-05.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTPS id 809C71956083; Wed, 27 Nov 2024 17:22:27 +0000 (UTC) Received: from rh.redhat.com (unknown [10.39.192.52]) by mx-prod-int-01.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTP id EBD0A300019E; Wed, 27 Nov 2024 17:22:25 +0000 (UTC) From: Kevin Traynor To: Long Li Cc: Stephen Hemminger , dpdk stable Subject: patch 'net/netvsc: force Tx VLAN offload on 801.2Q packet' has been queued to stable release 21.11.9 Date: Wed, 27 Nov 2024 17:18:31 +0000 Message-ID: <20241127171916.690404-84-ktraynor@redhat.com> In-Reply-To: <20241127171916.690404-1-ktraynor@redhat.com> References: <20241127171916.690404-1-ktraynor@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 3.4.1 on 10.30.177.4 X-Mimecast-Spam-Score: 0 X-Mimecast-MFC-PROC-ID: yn8AmuCBzicdQbxpAIAVI4CToUBXbxHswWA4yd2Bblw_1732728147 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.9 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/02/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/kevintraynor/dpdk-stable This queued commit can be viewed at: https://github.com/kevintraynor/dpdk-stable/commit/1958baf3103cb81b8f3f814b23f3e82d009d8b7b Thanks. Kevin --- >From 1958baf3103cb81b8f3f814b23f3e82d009d8b7b 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 [ 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 69588bc264..13dede941d 100644 --- a/drivers/net/netvsc/hn_rxtx.c +++ b/drivers/net/netvsc/hn_rxtx.c @@ -1572,7 +1572,7 @@ 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); @@ -1580,4 +1580,22 @@ hn_xmit_pkts(void *ptxq, struct rte_mbuf **tx_pkts, uint16_t nb_pkts) 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 && -- 2.47.0 --- Diff of the applied patch vs upstream commit (please double-check if non-empty: --- --- - 2024-11-27 17:17:40.911626432 +0000 +++ 0084-net-netvsc-force-Tx-VLAN-offload-on-801.2Q-packet.patch 2024-11-27 17:17:38.285269684 +0000 @@ -1 +1 @@ -From 06c968f9ba8afeaf03b60871a453652a5828ff3f Mon Sep 17 00:00:00 2001 +From 1958baf3103cb81b8f3f814b23f3e82d009d8b7b Mon Sep 17 00:00:00 2001 @@ -5,0 +6,2 @@ +[ upstream commit 06c968f9ba8afeaf03b60871a453652a5828ff3f ] + @@ -11 +12,0 @@ -Cc: stable@dpdk.org @@ -20 +21 @@ -index 52aedb001f..9d3948e03d 100644 +index 69588bc264..13dede941d 100644 @@ -23 +24 @@ -@@ -1558,7 +1558,7 @@ hn_xmit_pkts(void *ptxq, struct rte_mbuf **tx_pkts, uint16_t nb_pkts) +@@ -1572,7 +1572,7 @@ hn_xmit_pkts(void *ptxq, struct rte_mbuf **tx_pkts, uint16_t nb_pkts) @@ -32 +33 @@ -@@ -1566,4 +1566,22 @@ hn_xmit_pkts(void *ptxq, struct rte_mbuf **tx_pkts, uint16_t nb_pkts) +@@ -1580,4 +1580,22 @@ hn_xmit_pkts(void *ptxq, struct rte_mbuf **tx_pkts, uint16_t nb_pkts)