From mboxrd@z Thu Jan 1 00:00:00 1970 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) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=Mellanox.com; s=selector1; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version; bh=YhdETdHgtZVvVpp2Baxrt5t9CYJ44AEXYZVl8GydCLQ=; b=AVsyASNRwIDP1i3e89aMC47uKRy66LFFpAc/9ZarGVcn8OUKi9Mvzv8cqU+OyQNHfwmLa1rBGbfdH2UZwEQrFZo3hVmMxDCwb+yrw9Gc2yTJT6angim5lFO2Ne7vpHFSTycgA1YKHAWnf/u5IakLJLc5mb7J42WcLdeuhQhIdBE= Received: from AM4PR0501MB2657.eurprd05.prod.outlook.com (10.172.215.19) by AM4PR0501MB2241.eurprd05.prod.outlook.com (10.165.82.24) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.567.12; Wed, 14 Mar 2018 12:50:26 +0000 Received: from AM4PR0501MB2657.eurprd05.prod.outlook.com ([fe80::b109:6e08:774:c81f]) by AM4PR0501MB2657.eurprd05.prod.outlook.com ([fe80::b109:6e08:774:c81f%2]) with mapi id 15.20.0567.018; Wed, 14 Mar 2018 12:50:26 +0000 From: Matan Azrad To: Ferruh Yigit , Declan Doherty CC: "dev@dpdk.org" , Radu Nicolau Thread-Topic: [dpdk-dev] [PATCH] net/bonding: switch to new offloading flags Thread-Index: AQHTusZRwEYK9Au1IkOjjcdqXfN/6aPPbM9A Date: Wed, 14 Mar 2018 12:50:26 +0000 Message-ID: References: <20180313122444.160759-1-ferruh.yigit@intel.com> In-Reply-To: <20180313122444.160759-1-ferruh.yigit@intel.com> Accept-Language: en-US, he-IL Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: authentication-results: spf=none (sender IP is ) smtp.mailfrom=matan@mellanox.com; x-originating-ip: [193.47.165.251] x-ms-publictraffictype: Email x-microsoft-exchange-diagnostics: 1; AM4PR0501MB2241; 7:qS9lvChKIz2Fu6WSX1QXN+jZh0Zbkuk97zWmWwraKLdEiZltkciFByig8AqMOz6z/58Z9CaqKWX8k/q+eyVDKRejKH8O/gRsG0u7orkgT0SxG/vTmgH5giFc1p4rzAtLmDvMSOS4a+yHfszuoDhrvtEqAv5bpecqhjg/utm37ckC6frDG0ALqAsq9bxk/Dc/wJHRu9zk7pujchlGZGMSAInjdPpPSs9ZfBQ+TBH3Ak/ZjNtxEfM6kV53+0YBQYL/ x-ms-exchange-antispam-srfa-diagnostics: SSOS; x-ms-office365-filtering-ht: Tenant x-ms-office365-filtering-correlation-id: 9ed433b3-5bea-415a-4c6c-08d589aa28cc x-microsoft-antispam: UriScan:; BCL:0; PCL:0; RULEID:(7020095)(4652020)(48565401081)(5600026)(4604075)(3008032)(4534165)(4627221)(201703031133081)(201702281549075)(2017052603328)(7153060)(7193020); SRVR:AM4PR0501MB2241; x-ms-traffictypediagnostic: AM4PR0501MB2241: x-microsoft-antispam-prvs: x-exchange-antispam-report-test: UriScan:(228905959029699); x-exchange-antispam-report-cfa-test: BCL:0; PCL:0; RULEID:(8211001083)(6040522)(2401047)(5005006)(8121501046)(3231221)(944501244)(52105095)(93006095)(93001095)(3002001)(10201501046)(6055026)(6041310)(20161123558120)(20161123562045)(20161123564045)(20161123560045)(201703131423095)(201702281528075)(20161123555045)(201703061421075)(201703061406153)(6072148)(201708071742011); SRVR:AM4PR0501MB2241; BCL:0; PCL:0; RULEID:; SRVR:AM4PR0501MB2241; x-forefront-prvs: 0611A21987 x-forefront-antispam-report: SFV:NSPM; SFS:(10009020)(366004)(376002)(396003)(346002)(39860400002)(39380400002)(189003)(76104003)(199004)(6246003)(3280700002)(99286004)(26005)(186003)(53936002)(102836004)(105586002)(33656002)(229853002)(81166006)(8936002)(66066001)(8676002)(5250100002)(7696005)(59450400001)(316002)(54906003)(6506007)(81156014)(9686003)(55016002)(76176011)(97736004)(6436002)(74316002)(2900100001)(6116002)(86362001)(5660300001)(3846002)(4326008)(110136005)(7736002)(3660700001)(68736007)(305945005)(2950100002)(14454004)(106356001)(478600001)(25786009)(2906002); DIR:OUT; SFP:1101; SCL:1; SRVR:AM4PR0501MB2241; H:AM4PR0501MB2657.eurprd05.prod.outlook.com; FPR:; SPF:None; PTR:InfoNoRecords; MX:1; A:1; LANG:en; received-spf: None (protection.outlook.com: mellanox.com does not designate permitted sender hosts) x-microsoft-antispam-message-info: geLjanST1dAcpQhOWUB3+mAaLBXPvOQXBdNNXUflNi+iYbk+d8Qzb1bElnvGQKCFAzfpOn0thRj6s8BOE1XYEyzVaU/MTAsjpkAPu5K5NojcOo2ZX47VY1/Mik76sgC4izQos2mSQlX9AHrjklilRLXbUfzY3GzdALJosQ+/O9xfozpnbNf9LH3Jfjt7+sJtNUMX/Gq5EBCqBzzNubox0DT4eA8vIyn7nq51L2OIxGzrb6UjoRjyoM921v5MT7b/hA40EScVCToYBqLPUe4bFk9AuE4FAd0Jc12do71jRfIFLh1I2NbBx+XusPmVo8iWegD+TLa4e++ChMKHWPB0jw== spamdiagnosticoutput: 1:99 spamdiagnosticmetadata: NSPM Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 X-OriginatorOrg: Mellanox.com X-MS-Exchange-CrossTenant-Network-Message-Id: 9ed433b3-5bea-415a-4c6c-08d589aa28cc X-MS-Exchange-CrossTenant-originalarrivaltime: 14 Mar 2018 12:50:26.2997 (UTC) X-MS-Exchange-CrossTenant-fromentityheader: Hosted X-MS-Exchange-CrossTenant-id: a652971c-7d2e-4d9b-a6a4-d149256f461b X-MS-Exchange-Transport-CrossTenantHeadersStamped: AM4PR0501MB2241 Subject: Re: [dpdk-dev] [PATCH] net/bonding: switch to new offloading flags 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, 14 Mar 2018 12:50:28 -0000 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.