From mboxrd@z Thu Jan 1 00:00:00 1970 From: "Dai, Wei" Subject: Re: [PATCH 4/4] net/ixgbe: convert to new Tx offloads API Date: Mon, 19 Mar 2018 06:24:42 +0000 Message-ID: <49759EB36A64CF4892C1AFEC9231E8D66CF60428@PGSMSX112.gar.corp.intel.com> References: <1519747291-6969-1-git-send-email-wei.dai@intel.com> <1519747291-6969-5-git-send-email-wei.dai@intel.com> <2601191342CEEE43887BDE71AB9772589E28FDE7@irsmsx105.ger.corp.intel.com> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable Cc: "dev@dpdk.org" To: "Ananyev, Konstantin" , "Lu, Wenzhuo" Return-path: Received: from mga09.intel.com (mga09.intel.com [134.134.136.24]) by dpdk.org (Postfix) with ESMTP id 2444F354D for ; Mon, 19 Mar 2018 07:24:45 +0100 (CET) In-Reply-To: <2601191342CEEE43887BDE71AB9772589E28FDE7@irsmsx105.ger.corp.intel.com> Content-Language: en-US List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org Sender: "dev" Hi, Konstantin Thanks for your feedback. > -----Original Message----- > From: Ananyev, Konstantin > Sent: Thursday, March 15, 2018 7:19 AM > To: Dai, Wei ; Lu, Wenzhuo > Cc: dev@dpdk.org > Subject: RE: [PATCH 4/4] net/ixgbe: convert to new Tx offloads API >=20 >=20 > > diff --git a/drivers/net/ixgbe/ixgbe_rxtx.h > > b/drivers/net/ixgbe/ixgbe_rxtx.h index 30095fa..d7f0535 100644 > > --- a/drivers/net/ixgbe/ixgbe_rxtx.h > > +++ b/drivers/net/ixgbe/ixgbe_rxtx.h > > @@ -223,6 +223,7 @@ struct ixgbe_tx_queue { > > uint8_t hthresh; /**< Host threshold register. */ > > uint8_t wthresh; /**< Write-back threshold reg. > */ > > uint32_t txq_flags; /**< Holds flags for this TXq */ > > + uint64_t offloads; /**< Tx offload flags of DEV_TX_OFFLOAD_* */ > > uint32_t ctx_curr; /**< Hardware context states. > */ > > /** Hardware context0 history. */ > > struct ixgbe_advctx_info ctx_cache[IXGBE_CTX_NUM]; @@ -254,6 > +255,12 > > @@ struct ixgbe_txq_ops { #define IXGBE_SIMPLE_FLAGS > > ((uint32_t)ETH_TXQ_FLAGS_NOMULTSEGS | \ > > ETH_TXQ_FLAGS_NOOFFLOADS) > > > > +#define IXGBE_SIMPLE_TX_OFFLOAD_FLAGS > ((uint64_t)DEV_TX_OFFLOAD_MULTI_SEGS |\ > > + DEV_TX_OFFLOAD_VLAN_INSERT |\ > > + DEV_TX_OFFLOAD_SCTP_CKSUM |\ > > + DEV_TX_OFFLOAD_UDP_CKSUM |\ > > + DEV_TX_OFFLOAD_TCP_CKSUM) >=20 >=20 > Hmm and why IP_CKSUM, TSO, OUTER_IP_CKSUM, etc. is not included into > that macro? > In fact do you really need that? > As I understand right now vector TX doesn't support any offloads, so > tx_offload !=3D 0, should be enough for tx function selection, right? > Konstanitn In this patch, IXGBE_SIMPLE_TX_OFFLOAD_FLAGS is just a reverse transform of IXGBE_SIMPLE_FLAGS which is used in old offload API. Yes, current vector Tx doesn't support any offloads. I will use tx_offload=3D=3D0 following your guide. >=20 > > + > > /* > > * Populate descriptors with the following info: > > * 1.) buffer_addr =3D phys_addr + headroom @@ -307,6 +314,7 @@ > > uint16_t ixgbe_xmit_fixed_burst_vec(void *tx_queue, struct rte_mbuf > **tx_pkts, > > uint16_t nb_pkts); > > int ixgbe_txq_vec_setup(struct ixgbe_tx_queue *txq); > > > > +uint64_t ixgbe_get_tx_port_offlaods(struct rte_eth_dev *dev); > > uint64_t ixgbe_get_rx_queue_offloads(struct rte_eth_dev *dev); > > uint64_t ixgbe_get_rx_port_offloads(struct rte_eth_dev *dev); > > > > -- > > 2.7.5