From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from dpdk.org (dpdk.org [92.243.14.124]) by inbox.dpdk.org (Postfix) with ESMTP id A8F5EA04C3; Mon, 28 Sep 2020 18:00:01 +0200 (CEST) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id 826DC1DA0A; Mon, 28 Sep 2020 18:00:00 +0200 (CEST) Received: from mga07.intel.com (mga07.intel.com [134.134.136.100]) by dpdk.org (Postfix) with ESMTP id E83601DA06 for ; Mon, 28 Sep 2020 17:59:58 +0200 (CEST) IronPort-SDR: Ww75t36F8CwH9FD5aJHwHG1Qn2FIeDVARCkc2ujCnRSaETBhMc/l7QOwmctYHZlikqXA5aWRFS wGel86fAS4tA== X-IronPort-AV: E=McAfee;i="6000,8403,9758"; a="226164634" X-IronPort-AV: E=Sophos;i="5.77,313,1596524400"; d="scan'208";a="226164634" X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from orsmga005.jf.intel.com ([10.7.209.41]) by orsmga105.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 28 Sep 2020 08:59:56 -0700 IronPort-SDR: LBDPexI4wdn59vgHaNf4JEXEMm/V1JThUqYSblEUFkNbH7TvwO2hZl1xuJXTEylE3TQGSmrit/ vPr3ibJ4l4mg== X-IronPort-AV: E=Sophos;i="5.77,313,1596524400"; d="scan'208";a="488634055" Received: from fyigit-mobl1.ger.corp.intel.com (HELO [10.213.193.117]) ([10.213.193.117]) by orsmga005-auth.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 28 Sep 2020 08:59:55 -0700 To: Jeff Guo , jingjing.wu@intel.com, qi.z.zhang@intel.com, beilei.xing@intel.com Cc: dev@dpdk.org, haiyue.wang@intel.com References: <20200909025415.6185-1-jia.guo@intel.com> <20200927020859.69387-1-jia.guo@intel.com> From: Ferruh Yigit Message-ID: Date: Mon, 28 Sep 2020 16:59:51 +0100 User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:78.0) Gecko/20100101 Thunderbird/78.2.2 MIME-Version: 1.0 In-Reply-To: <20200927020859.69387-1-jia.guo@intel.com> Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: en-US Content-Transfer-Encoding: 8bit Subject: Re: [dpdk-dev] [PATCH v6] net/iavf: support flex desc metadata extraction X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org Sender: "dev" On 9/27/2020 3:08 AM, Jeff Guo wrote: > Enable metadata extraction for flexible descriptors in AVF, that would > allow network function directly get metadata without additional parsing > which would reduce the CPU cost for VFs. The enabling metadata > extractions involve the metadata of VLAN/IPv4/IPv6/IPv6-FLOW/TCP/MPLS > flexible descriptors, and the VF could negotiate the capability of > the flexible descriptor with PF and correspondingly configure the > specific offload at receiving queues. > > Signed-off-by: Jeff Guo > Acked-by: Haiyue Wang <...> > +/* Rx L3/L4 checksum */ > +static inline uint64_t > +iavf_rxd_error_to_pkt_flags(uint16_t stat_err0) > +{ > + uint64_t flags = 0; > + > + /* check if HW has decoded the packet and checksum */ > + if (unlikely(!(stat_err0 & (1 << IAVF_RX_FLEX_DESC_STATUS0_L3L4P_S)))) > + return 0; > + > + if (likely(!(stat_err0 & IAVF_RX_FLEX_ERR0_BITS))) { > + flags |= (PKT_RX_IP_CKSUM_GOOD | PKT_RX_L4_CKSUM_GOOD); > + return flags; > + } > + > + if (unlikely(stat_err0 & (1 << IAVF_RX_FLEX_DESC_STATUS0_XSUM_IPE_S))) > + flags |= PKT_RX_IP_CKSUM_BAD; > + else > + flags |= PKT_RX_IP_CKSUM_GOOD; > + > + if (unlikely(stat_err0 & (1 << IAVF_RX_FLEX_DESC_STATUS0_XSUM_L4E_S))) > + flags |= PKT_RX_L4_CKSUM_BAD; > + else > + flags |= PKT_RX_L4_CKSUM_GOOD; > + > + if (unlikely(stat_err0 & (1 << IAVF_RX_FLEX_DESC_STATUS0_XSUM_EIPE_S))) > + flags |= PKT_RX_EIP_CKSUM_BAD; > + > + return flags; > +} Is this static inline function used anywhere? If not can we delete it? > + > static inline void > iavf_rxd_to_vlan_tci(struct rte_mbuf *mb, volatile union iavf_rx_desc *rxdp) > { > @@ -740,6 +967,21 @@ iavf_flex_rxd_to_vlan_tci(struct rte_mbuf *mb, > } else { > mb->vlan_tci = 0; > } > + > +#ifndef RTE_LIBRTE_IAVF_16BYTE_RX_DESC > + if (rte_le_to_cpu_16(rxdp->wb.status_error1) & > + (1 << IAVF_RX_FLEX_DESC_STATUS1_L2TAG2P_S)) { > + mb->ol_flags |= PKT_RX_QINQ_STRIPPED | PKT_RX_QINQ | > + PKT_RX_VLAN_STRIPPED | PKT_RX_VLAN; > + mb->vlan_tci_outer = mb->vlan_tci; > + mb->vlan_tci = rte_le_to_cpu_16(rxdp->wb.l2tag2_2nd); > + PMD_RX_LOG(DEBUG, "Descriptor l2tag2_1: %u, l2tag2_2: %u", > + rte_le_to_cpu_16(rxdp->wb.l2tag2_1st), > + rte_le_to_cpu_16(rxdp->wb.l2tag2_2nd)); > + } else { > + mb->vlan_tci_outer = 0; > + } > +#endif How this 'RTE_LIBRTE_IAVF_16BYTE_RX_DESC' controlled with meson? Also is it mentioned in any driver documentation?