From mboxrd@z Thu Jan 1 00:00:00 1970 From: Matan Azrad Subject: Re: [PATCH] net/bonding: switch to new offloading flags Date: Wed, 14 Mar 2018 12:50:26 +0000 Message-ID: References: <20180313122444.160759-1-ferruh.yigit@intel.com> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable Cc: "dev@dpdk.org" , Radu Nicolau To: Ferruh Yigit , Declan Doherty Return-path: Received: from EUR02-HE1-obe.outbound.protection.outlook.com (mail-eopbgr10073.outbound.protection.outlook.com [40.107.1.73]) by dpdk.org (Postfix) with ESMTP id D33BCA496 for ; Wed, 14 Mar 2018 13:50:27 +0100 (CET) In-Reply-To: <20180313122444.160759-1-ferruh.yigit@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 Ferruh From: Ferruh Yigit, Sent: Tuesday, March 13, 2018 2:25 PM > Switch from using deprecated bitfields in rxmode to offloads variable. >=20 > Signed-off-by: Ferruh Yigit > --- > drivers/net/bonding/rte_eth_bond_api.c | 3 ++- > drivers/net/bonding/rte_eth_bond_pmd.c | 9 +++++++-- > 2 files changed, 9 insertions(+), 3 deletions(-) >=20 > diff --git a/drivers/net/bonding/rte_eth_bond_api.c > b/drivers/net/bonding/rte_eth_bond_api.c > index f854b7375..669004fec 100644 > --- a/drivers/net/bonding/rte_eth_bond_api.c > +++ b/drivers/net/bonding/rte_eth_bond_api.c > @@ -194,7 +194,8 @@ slave_vlan_filter_set(uint16_t bonded_port_id, > uint16_t slave_port_id) > uint16_t first; >=20 > bonded_eth_dev =3D &rte_eth_devices[bonded_port_id]; > - if (bonded_eth_dev->data->dev_conf.rxmode.hw_vlan_filter =3D=3D 0) > + if ((bonded_eth_dev->data->dev_conf.rxmode.offloads & > + DEV_RX_OFFLOAD_VLAN_FILTER) =3D=3D 0) > return 0; >=20 > internals =3D bonded_eth_dev->data->dev_private; > diff --git a/drivers/net/bonding/rte_eth_bond_pmd.c > b/drivers/net/bonding/rte_eth_bond_pmd.c > index c34c3251f..c18aca222 100644 > --- a/drivers/net/bonding/rte_eth_bond_pmd.c > +++ b/drivers/net/bonding/rte_eth_bond_pmd.c > @@ -1818,8 +1818,13 @@ slave_configure(struct rte_eth_dev > *bonded_eth_dev, > bonded_eth_dev->data- > >dev_conf.rxmode.mq_mode; > } >=20 > - slave_eth_dev->data->dev_conf.rxmode.hw_vlan_filter =3D > - bonded_eth_dev->data- > >dev_conf.rxmode.hw_vlan_filter; > + if (bonded_eth_dev->data->dev_conf.rxmode.offloads & > + DEV_RX_OFFLOAD_VLAN_FILTER) > + slave_eth_dev->data->dev_conf.rxmode.offloads |=3D > + DEV_RX_OFFLOAD_VLAN_FILTER; > + else > + slave_eth_dev->data->dev_conf.rxmode.offloads &=3D > + ~DEV_RX_OFFLOAD_VLAN_FILTER; >=20 > nb_rx_queues =3D bonded_eth_dev->data->nb_rx_queues; > nb_tx_queues =3D bonded_eth_dev->data->nb_tx_queues; > -- > 2.13.6 The bonding PMD is using internal variables to save the offload capabilitie= s (Actually holds the offloads intersection set of all the bond slaves). I think you are missing next: You should change the next variable types to uint64_t to support the new o= ffload flags: internals->rx_offload_capa internals->tx_offload_capa You should add the new per queue offload variables to save the intersectio= n set of it too: rx_queue_offload_capa tx_queue_offload_capa Questions: Have you an idea why bonding PMD doesn't adjust the slaves port configurati= ons to the bonding port configuration like he does for slave queue configur= ation? Is the responsibility to fill the slave port configuration structure for th= e application? What do you think about next configuration checks (both per port and per qu= eue)? Validate the actual bonding offloads with the bonding capability. Validate that the queue offloads includes all the port configured offloads= . Matan.