From mboxrd@z Thu Jan 1 00:00:00 1970 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) X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from fmsmga007.fm.intel.com ([10.253.24.52]) by orsmga102.jf.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 18 Mar 2018 23:24:44 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.48,329,1517904000"; d="scan'208";a="25133699" Received: from pgsmsx104.gar.corp.intel.com ([10.221.44.91]) by fmsmga007.fm.intel.com with ESMTP; 18 Mar 2018 23:24:43 -0700 Received: from pgsmsx112.gar.corp.intel.com ([169.254.3.227]) by PGSMSX104.gar.corp.intel.com ([169.254.3.189]) with mapi id 14.03.0319.002; Mon, 19 Mar 2018 14:24:42 +0800 From: "Dai, Wei" To: "Ananyev, Konstantin" , "Lu, Wenzhuo" CC: "dev@dpdk.org" Thread-Topic: [PATCH 4/4] net/ixgbe: convert to new Tx offloads API Thread-Index: AQHTr+a2P13SlB4xaEGIDNibs3CM+KPP76yAgAc78PA= 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> In-Reply-To: <2601191342CEEE43887BDE71AB9772589E28FDE7@irsmsx105.ger.corp.intel.com> Accept-Language: zh-CN, en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-titus-metadata-40: eyJDYXRlZ29yeUxhYmVscyI6IiIsIk1ldGFkYXRhIjp7Im5zIjoiaHR0cDpcL1wvd3d3LnRpdHVzLmNvbVwvbnNcL0ludGVsMyIsImlkIjoiMWM1YzQ2ZjctY2NkYi00ZjA5LWIwYWYtZGUyYjA5MTk3MTMwIiwicHJvcHMiOlt7Im4iOiJDVFBDbGFzc2lmaWNhdGlvbiIsInZhbHMiOlt7InZhbHVlIjoiQ1RQX05UIn1dfV19LCJTdWJqZWN0TGFiZWxzIjpbXSwiVE1DVmVyc2lvbiI6IjE2LjUuOS4zIiwiVHJ1c3RlZExhYmVsSGFzaCI6IkFrV1E2QncxVWFWU25udkNvd1AramlPN1g0OEhSSlFPeVpjV2hkXC9Qbm5RPSJ9 x-ctpclassification: CTP_NT dlp-product: dlpe-windows dlp-version: 11.0.0.116 dlp-reaction: no-action x-originating-ip: [172.30.20.206] Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 Subject: Re: [dpdk-dev] [PATCH 4/4] net/ixgbe: convert to new Tx offloads API 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: , X-List-Received-Date: Mon, 19 Mar 2018 06:24:47 -0000 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