From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mga05.intel.com (mga05.intel.com [192.55.52.43]) by dpdk.org (Postfix) with ESMTP id C72C57D46 for ; Wed, 23 Aug 2017 14:21:11 +0200 (CEST) Received: from fmsmga006.fm.intel.com ([10.253.24.20]) by fmsmga105.fm.intel.com with ESMTP; 23 Aug 2017 05:21:10 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.41,416,1498546800"; d="scan'208";a="143656919" Received: from irsmsx102.ger.corp.intel.com ([163.33.3.155]) by fmsmga006.fm.intel.com with ESMTP; 23 Aug 2017 05:21:09 -0700 Received: from irsmsx105.ger.corp.intel.com ([169.254.7.25]) by IRSMSX102.ger.corp.intel.com ([169.254.2.91]) with mapi id 14.03.0319.002; Wed, 23 Aug 2017 13:21:08 +0100 From: "Ananyev, Konstantin" To: Shahaf Shuler , "dev@dpdk.org" Thread-Topic: [dpdk-dev] [RFC PATCH 2/4] ethdev: introduce Rx queue offloads API Thread-Index: AQHTD2u1xwNK4CyG0kKy7hKg4mn1r6KR9BWQ Date: Wed, 23 Aug 2017 12:21:08 +0000 Message-ID: <2601191342CEEE43887BDE71AB977258489B5058@irsmsx105.ger.corp.intel.com> References: In-Reply-To: Accept-Language: en-IE, en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: dlp-product: dlpe-windows dlp-version: 10.0.102.7 dlp-reaction: no-action x-originating-ip: [163.33.239.181] Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 Subject: Re: [dpdk-dev] [RFC PATCH 2/4] ethdev: introduce Rx queue 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: Wed, 23 Aug 2017 12:21:12 -0000 Hi, > Introduce a new API to configure Rx offloads. >=20 > The new API will re-use existing DEV_RX_OFFLOAD_* flags > to enable the different offloads. This will ease the process > of adding a new Rx offloads, as no ABI breakage is involved. > In addition, the offload configuration can be done per queue, > instead of per port. >=20 > The Rx queue offload API can be used only with devices which advertize > the RTE_ETH_DEV_RXQ_OFFLOAD capability. Not sure why do we need that? Why (till the deprication) user can't use both old rxmode and new offload f= lags? I.E. at rte_ethdev_rx_queue_setup() we always convert rxmode to new offload= flags (as I can see you already have a function for it), then we call dev_ops->rx= _queue_setup(). That way both new and old ethdev API should work. Of course that mean that all PMDs have to support new way to setup rx offlo= ads... But I suppose that have to be done anyway. Same for TX path. Konstantin >=20 > The old Rx offloads API is kept for the meanwhile, in order to enable a > smooth transition for PMDs and application to the new API. >=20 > Signed-off-by: Shahaf Shuler > --- > lib/librte_ether/rte_ethdev.h | 30 +++++++++++++++++++++++++++++- > 1 file changed, 29 insertions(+), 1 deletion(-) >=20 > diff --git a/lib/librte_ether/rte_ethdev.h b/lib/librte_ether/rte_ethdev.= h > index f7a44578c..ce33c61c4 100644 > --- a/lib/librte_ether/rte_ethdev.h > +++ b/lib/librte_ether/rte_ethdev.h > @@ -357,7 +357,14 @@ struct rte_eth_rxmode { > jumbo_frame : 1, /**< Jumbo Frame Receipt enable. */ > hw_strip_crc : 1, /**< Enable CRC stripping by hardware. */ > enable_scatter : 1, /**< Enable scatter packets rx handler */ > - enable_lro : 1; /**< Enable LRO */ > + enable_lro : 1, /**< Enable LRO */ > + ignore : 1; > + /** > + * When set the rxmode offloads should be ignored, > + * instead the Rx offloads will be set on rte_eth_rxq_conf. > + * This bit is temporary till rxmode Rx offloads API will > + * be deprecated. > + */ > }; >=20 > /** > @@ -691,6 +698,12 @@ struct rte_eth_rxq_conf { > uint16_t rx_free_thresh; /**< Drives the freeing of RX descriptors. */ > uint8_t rx_drop_en; /**< Drop packets if no descriptors are available. = */ > uint8_t rx_deferred_start; /**< Do not start queue with rte_eth_dev_sta= rt(). */ > + uint64_t offloads; > + /** > + * Enable Rx offloads using DEV_RX_OFFLOAD_* flags. > + * Supported only for devices which advertize the > + * RTE_ETH_DEV_RXQ_OFFLOAD capability. > + */ > }; >=20 > #define ETH_TXQ_FLAGS_NOMULTSEGS 0x0001 /**< nb_segs=3D1 for all mbufs *= / > @@ -907,6 +920,19 @@ struct rte_eth_conf { > #define DEV_RX_OFFLOAD_QINQ_STRIP 0x00000020 > #define DEV_RX_OFFLOAD_OUTER_IPV4_CKSUM 0x00000040 > #define DEV_RX_OFFLOAD_MACSEC_STRIP 0x00000080 > +#define DEV_RX_OFFLOAD_HEADER_SPLIT 0x00000100 > +#define DEV_RX_OFFLOAD_VLAN_FILTER 0x00000200 > +#define DEV_RX_OFFLOAD_VLAN_EXTEND 0x00000400 > +#define DEV_RX_OFFLOAD_JUMBO_FRAME 0x00000800 > +#define DEV_RX_OFFLOAD_CRC_STRIP 0x00001000 > +#define DEV_RX_OFFLOAD_SCATTER 0x00002000 > +#define DEV_RX_OFFLOAD_LRO 0x00004000 > +#define DEV_RX_OFFLOAD_CHECKSUM (DEV_RX_OFFLOAD_IPV4_CKSUM | \ > + DEV_RX_OFFLOAD_UDP_CKSUM | \ > + DEV_RX_OFFLOAD_TCP_CKSUM) > +#define DEV_RX_OFFLOAD_VLAN (DEV_RX_OFFLOAD_VLAN_STRIP | \ > + DEV_RX_OFFLOAD_VLAN_FILTER | \ > + DEV_RX_OFFLOAD_VLAN_EXTEND) >=20 > /** > * TX offload capabilities of a device. > @@ -1723,6 +1749,8 @@ struct rte_eth_dev_data { > #define RTE_ETH_DEV_BONDED_SLAVE 0x0004 > /** Device supports device removal interrupt */ > #define RTE_ETH_DEV_INTR_RMV 0x0008 > +/** Device supports the rte_eth_rxq_conf offloads API */ > +#define RTE_ETH_DEV_RXQ_OFFLOAD 0x0010 >=20 > /** > * @internal > -- > 2.12.0