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 E5D6745C9B for ; Tue, 12 Nov 2024 23:09:20 +0100 (CET) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id E06F84064C; Tue, 12 Nov 2024 23:09:20 +0100 (CET) Received: from mail-wm1-f43.google.com (mail-wm1-f43.google.com [209.85.128.43]) by mails.dpdk.org (Postfix) with ESMTP id 84FA14064C for ; Tue, 12 Nov 2024 23:09:19 +0100 (CET) Received: by mail-wm1-f43.google.com with SMTP id 5b1f17b1804b1-4314f38d274so78045825e9.1 for ; Tue, 12 Nov 2024 14:09:19 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1731449359; x=1732054159; 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=mxq7txDyejb+2dYPBd3lJ29nv556hWfqxjph9JcBPkI=; b=I74gGgQ5gtRKFP0NaimPHj1JHEby3bZnS604AqozQK3rJpGwchfDwcSR+bx1MB41M9 gfhf9BWSiUhSczdkhoxIRzAsL9fh4oFw2Zcvf3AT31QyeZFKjASwq/g8PTddnuKRWtVR Q/9glJzkJyLbCfWgFD8fow8yBYkMC2E6aLZNUMRL64s+m8T/peFBeKh8RAPDAFQWGEIt tiVa8qw5/kIJcPpM2dwEiF+yT2ZkQLHajtvtgGXEeIYbGiUgcCidjv4m9KYVWXN9aF1C 04sKKXA5qR7Q4+Xve5aohSJeLkeFpkjj5jecV1HCT9FExkgZamUElrwgvnqNMxU8m6hw YKmg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1731449359; x=1732054159; 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=mxq7txDyejb+2dYPBd3lJ29nv556hWfqxjph9JcBPkI=; b=XkaObI4FV6L3mJErDrX0Zb0LZbuJFbWURk0K1Reyh7LdZm6BNIq+zl8ucd6MplcFQr 5SAAC9l9Pur0yaEIgirO6OWDI3FMWUlf+2qhlZGD4UqPWg/yZUSvG1nFhTeaigJEIEwH NSZ52+D4dRjG3BiNt9oGS8RoKs1H0pQBh1vvvgxcJMagD2GoJcp/U/OzMCtjiNyCjmfF XpVBaCLInqwbUaLXtZTyqdudNx3JW7QXPGTlpKpvN9k6UXRFdC7d8rMGQ4VGMuB1QRRS yWDQK5vddM3+ZP422dCXARgxB9c0QaqiuSLXFJiF0wTJhDSeMd9ZDw9GD6t+uxXhkmqp kBOw== X-Forwarded-Encrypted: i=1; AJvYcCWylxAdN3zJuLAxslKYUH1F7aAAHrwtbwx+51/VBAgaJ84r+fxHA4Cjnh5QhWcD7E9vpqk4S30=@dpdk.org X-Gm-Message-State: AOJu0YyGtnrIJrEEXRmR45duFd4hi7+q4JjmzLfILCwvZt9ntGhS45J4 NLsINCEIiGfFinkKPFPZvLYXnEut4YluAtftPK9AtMxqokyXs79QIdxDMw== X-Google-Smtp-Source: AGHT+IEW7gojscCJeTZnGEnTGlqgXL7gFP54pOlNgkEv06NPtgCw04wmjep871JGA1JAFLRoqmmziw== X-Received: by 2002:a05:600c:34c8:b0:431:604d:b22 with SMTP id 5b1f17b1804b1-432b750acc4mr198156345e9.16.1731449358996; Tue, 12 Nov 2024 14:09:18 -0800 (PST) Received: from localhost ([2a01:4b00:d036:ae00:e89d:e9a1:da72:2f9d]) by smtp.gmail.com with ESMTPSA id 5b1f17b1804b1-432d54f82b6sm1010775e9.15.2024.11.12.14.09.16 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 12 Nov 2024 14:09:17 -0800 (PST) From: luca.boccassi@gmail.com 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 22.11.7 Date: Tue, 12 Nov 2024 22:07:31 +0000 Message-ID: <20241112220754.666489-21-luca.boccassi@gmail.com> X-Mailer: git-send-email 2.45.2 In-Reply-To: <20241112220754.666489-1-luca.boccassi@gmail.com> References: <20241023211704.1216956-79-luca.boccassi@gmail.com> <20241112220754.666489-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.7 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/14/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/19fe4f972bb03c453127acd784f139791c62dbf1 Thanks. Luca Boccassi --- >From 19fe4f972bb03c453127acd784f139791c62dbf1 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 fc9df9f3b4..080cab4464 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.45.2 --- Diff of the applied patch vs upstream commit (please double-check if non-empty: --- --- - 2024-11-12 22:06:59.353468525 +0000 +++ 0021-net-netvsc-force-Tx-VLAN-offload-on-801.2Q-packet.patch 2024-11-12 22:06:58.667307202 +0000 @@ -1 +1 @@ -From 06c968f9ba8afeaf03b60871a453652a5828ff3f Mon Sep 17 00:00:00 2001 +From 19fe4f972bb03c453127acd784f139791c62dbf1 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 fc9df9f3b4..080cab4464 100644 @@ -23 +24 @@ -@@ -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)