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 B3887376C for ; Mon, 4 Sep 2017 16:18:28 +0200 (CEST) Received: from fmsmga001.fm.intel.com ([10.253.24.23]) by fmsmga105.fm.intel.com with ESMTP; 04 Sep 2017 07:18:27 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.41,475,1498546800"; d="scan'208";a="1191378246" Received: from irsmsx106.ger.corp.intel.com ([163.33.3.31]) by fmsmga001.fm.intel.com with ESMTP; 04 Sep 2017 07:18:26 -0700 Received: from irsmsx105.ger.corp.intel.com ([169.254.7.75]) by IRSMSX106.ger.corp.intel.com ([169.254.8.36]) with mapi id 14.03.0319.002; Mon, 4 Sep 2017 15:18:25 +0100 From: "Ananyev, Konstantin" To: Thomas Monjalon CC: Shahaf Shuler , "dev@dpdk.org" Thread-Topic: [dpdk-dev] [PATCH 4/4] ethdev: add helpers to move to the new offloads API Thread-Index: AQHTJYU8DF/tpFi9okyg3kyCdEiysqKkwPgQ Date: Mon, 4 Sep 2017 14:18:25 +0000 Message-ID: <2601191342CEEE43887BDE71AB9772584F2460F1@irsmsx105.ger.corp.intel.com> References: <810c1d26724f82f0d9fc9d6684dc4b1c62fd5f62.1504508375.git.shahafs@mellanox.com> <2601191342CEEE43887BDE71AB9772584F24602F@irsmsx105.ger.corp.intel.com> <2327783.H4uO08xLcu@xps> In-Reply-To: <2327783.H4uO08xLcu@xps> Accept-Language: en-IE, en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: dlp-product: dlpe-windows dlp-version: 11.0.0.116 dlp-reaction: no-action x-originating-ip: [163.33.239.180] Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 Subject: Re: [dpdk-dev] [PATCH 4/4] ethdev: add helpers to move to the new 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, 04 Sep 2017 14:18:29 -0000 > -----Original Message----- > From: Thomas Monjalon [mailto:thomas@monjalon.net] > Sent: Monday, September 4, 2017 2:54 PM > To: Ananyev, Konstantin > Cc: Shahaf Shuler ; dev@dpdk.org > Subject: Re: [dpdk-dev] [PATCH 4/4] ethdev: add helpers to move to the ne= w offloads API >=20 > 04/09/2017 15:25, Ananyev, Konstantin: > > Hi Shahaf, > > > > > +/** > > > + * A conversion function from rxmode offloads API to rte_eth_rxq_con= f > > > + * offloads API. > > > + */ > > > +static void > > > +rte_eth_convert_rxmode_offloads(struct rte_eth_rxmode *rxmode, > > > + struct rte_eth_rxq_conf *rxq_conf) > > > +{ > > > + if (rxmode->header_split =3D=3D 1) > > > + rxq_conf->offloads |=3D DEV_RX_OFFLOAD_HEADER_SPLIT; > > > + if (rxmode->hw_ip_checksum =3D=3D 1) > > > + rxq_conf->offloads |=3D DEV_RX_OFFLOAD_CHECKSUM; > > > + if (rxmode->hw_vlan_filter =3D=3D 1) > > > + rxq_conf->offloads |=3D DEV_RX_OFFLOAD_VLAN_FILTER; > > > > Thinking on it a bit more: > > VLAN_FILTER is definitely one per device, as it would affect VFs also. > > At least that's what we have for Intel devices (ixgbe, i40e) right now. > > For Intel devices VLAN_STRIP is also per device and > > will also be applied to all corresponding VFs. > > In fact, right now it is possible to query/change these 3 vlan offload = flags on the fly > > (after dev_start) on port basis by rte_eth_dev_(get|set)_vlan_offload = API. > > So, I think at least these 3 flags need to be remained on a port basis. >=20 > I don't understand how it helps to be able to configure the same thing > in 2 places. Because some offloads are per device, another - per queue. Configuring on a device basis would allow most users to conjure all queues in the same manner by default. Those users who would need more fine-grained setup (per queue) will be able to overwrite it by rx_queue_setup(). =20 > I think you are just describing a limitation of these HW: some offloads > must be the same for all queues. As I said above - on some devices some offloads might also affect queues that belong to VFs (to another ports in DPDK words). =20 You might never invoke rx_queue_setup() for these queues per your app. But you still want to enable this offload on that device. > It does not prevent from configuring them in the per-queue setup. >=20 > > In fact, why can't we have both per port and per queue RX offload: > > - dev_configure() will accept RX_OFFLOAD_* flags and apply them on a po= rt basis. > > - rx_queue_setup() will also accept RX_OFFLOAD_* flags and apply them o= n a queue basis. > > - if particular RX_OFFLOAD flag for that device couldn't be setup on a = queue basis - > > rx_queue_setup() will return an error. >=20 > The queue setup can work while the value is the same for every queues. Ok, and how people would know that? That for device N offload X has to be the same for all queues, and for device M offload X can be differs for different queues. Again, if we don't allow to enable/disable offloads for particular queue, why to bother with updating rx_queue_setup() API at all?=20 >=20 > > - rte_eth_rxq_info can be extended to provide information which RX_OFFL= OADs > > can be configured on a per queue basis. >=20 > Yes the PMD should advertise its limitations like being forced to > apply the same configuration to all its queues. Didn't get your last sentence. Konstantin >=20 > > BTW - in that case we probably wouldn't need ignore flag inside rx_conf= anymore.