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 1A7B041E80; Sun, 12 Mar 2023 14:44:49 +0100 (CET) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 1954140F18; Sun, 12 Mar 2023 14:44:47 +0100 (CET) Received: from vale.hankala.org (vale.hankala.org [164.138.26.161]) by mails.dpdk.org (Postfix) with ESMTP id C1970406A2 for ; Sun, 12 Mar 2023 14:44:45 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; s=jTVx8ZAn; t=1678628683; x=1679492683; bh=iZBQNdRxG6CWGoaAOKfax5jMyY9+XPakjTGR7kW x8/A=; h=content-type:mime-version:subject:cc:to:from:date; d=hankala.org; b=Pj9NVM43kVPsIC7wocfZG09svP5LgMPMnez2O5cyBH+WLZaWH5nzU azSWPlzCQSN1w33ZEcpNtU0sEPEBPoKm0d3/KsddZ5s+izCq48LaWPn/XKfkaO1o5QhM1i gxSLu0V9EgaMAS8fSUWr5oG+2lIhvKAzMoNVORx14BG3SO+I= Received: by vale.hankala.org (OpenSMTPD) with ESMTPS id 8dcd8895 (TLSv1.3:TLS_AES_256_GCM_SHA384:256:NO); Sun, 12 Mar 2023 13:44:43 +0000 (UTC) Date: Sun, 12 Mar 2023 13:44:42 +0000 From: Visa Hankala To: dev@dpdk.org Cc: Simei Su , Wenjun Wu Subject: [PATCH] net/e1000: fix saving of stripped VLAN TCI Message-ID: MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org When receiving a scattered packet, save the stripped VLAN TCI in the first mbuf segment where users expect to find it. Signed-off-by: Visa Hankala diff --git a/drivers/net/e1000/em_rxtx.c b/drivers/net/e1000/em_rxtx.c index d48fd52404..cb5ce2307b 100644 --- a/drivers/net/e1000/em_rxtx.c +++ b/drivers/net/e1000/em_rxtx.c @@ -1030,6 +1030,7 @@ eth_em_recv_scattered_pkts(void *rx_queue, struct rte_mbuf **rx_pkts, * - RX port identifier, * - hardware offload data, if any: * - IP checksum flag, + * - VLAN TCI, if any, * - error flags. */ first_seg->port = rxq->port_id; @@ -1039,7 +1040,7 @@ eth_em_recv_scattered_pkts(void *rx_queue, struct rte_mbuf **rx_pkts, rx_desc_error_to_pkt_flags(rxd.errors); /* Only valid if RTE_MBUF_F_RX_VLAN set in pkt_flags */ - rxm->vlan_tci = rte_le_to_cpu_16(rxd.special); + first_seg->vlan_tci = rte_le_to_cpu_16(rxd.special); /* Prefetch data of first segment, if configured to do so. */ rte_packet_prefetch((char *)first_seg->buf_addr +