patches for DPDK stable branches
 help / color / mirror / Atom feed
* [PATCH 19.11 0/2] backport two patches for bonding and hns3 driver
@ 2022-12-01  6:08 Huisong Li
  2022-12-01  6:08 ` [PATCH 19.11 1/2] net/bonding: fix slave device Rx/Tx offload configuration Huisong Li
                   ` (2 more replies)
  0 siblings, 3 replies; 7+ messages in thread
From: Huisong Li @ 2022-12-01  6:08 UTC (permalink / raw)
  To: stable, christian.ehrhardt
  Cc: liudongdong3, fengchengwen, huangdaode, lihuisong

Fix slave device Rx/Tx offload configuration for bonding driver and delete
unused markup for hns3 driver.

Huisong Li (2):
  net/bonding: fix slave device Rx/Tx offload configuration
  net/hns3: delete unused markup

 drivers/net/bonding/rte_eth_bond_pmd.c | 11 ++++-------
 drivers/net/hns3/hns3_stats.c          | 23 ++++++-----------------
 2 files changed, 10 insertions(+), 24 deletions(-)

-- 
2.33.0


^ permalink raw reply	[flat|nested] 7+ messages in thread

* [PATCH 19.11 1/2] net/bonding: fix slave device Rx/Tx offload configuration
  2022-12-01  6:08 [PATCH 19.11 0/2] backport two patches for bonding and hns3 driver Huisong Li
@ 2022-12-01  6:08 ` Huisong Li
  2022-12-01  6:08 ` [PATCH 19.11 2/2] net/hns3: delete unused markup Huisong Li
  2022-12-05  6:55 ` [PATCH 19.11 0/2] backport two patches for bonding and hns3 driver Christian Ehrhardt
  2 siblings, 0 replies; 7+ messages in thread
From: Huisong Li @ 2022-12-01  6:08 UTC (permalink / raw)
  To: stable, christian.ehrhardt
  Cc: liudongdong3, fengchengwen, huangdaode, lihuisong

[ upstream commit b5145667785e8954077c593480ddfb2bdd708eac ]

Normally, the Rx/Tx offload capability of bonding interface is
the intersection of the capability of all slave devices. And
Rx/Tx offloads configuration of slave device comes from bonding
interface. But now there is a risk that slave device retains its
previous offload configurations which is not within the offload
configurations of bond interface.

Signed-off-by: Huisong Li <lihuisong@huawei.com>
Acked-by: Min Hu (Connor) <humin29@huawei.com>
---
 drivers/net/bonding/rte_eth_bond_pmd.c | 11 ++++-------
 1 file changed, 4 insertions(+), 7 deletions(-)

diff --git a/drivers/net/bonding/rte_eth_bond_pmd.c b/drivers/net/bonding/rte_eth_bond_pmd.c
index a182e4306f..0e7498b150 100644
--- a/drivers/net/bonding/rte_eth_bond_pmd.c
+++ b/drivers/net/bonding/rte_eth_bond_pmd.c
@@ -1737,13 +1737,10 @@ slave_configure(struct rte_eth_dev *bonded_eth_dev,
 				bonded_eth_dev->data->dev_conf.rxmode.mq_mode;
 	}
 
-	if (bonded_eth_dev->data->dev_conf.rxmode.offloads &
-			DEV_RX_OFFLOAD_VLAN_FILTER)
-		slave_eth_dev->data->dev_conf.rxmode.offloads |=
-				DEV_RX_OFFLOAD_VLAN_FILTER;
-	else
-		slave_eth_dev->data->dev_conf.rxmode.offloads &=
-				~DEV_RX_OFFLOAD_VLAN_FILTER;
+	slave_eth_dev->data->dev_conf.txmode.offloads =
+			bonded_eth_dev->data->dev_conf.txmode.offloads;
+	slave_eth_dev->data->dev_conf.rxmode.offloads =
+			bonded_eth_dev->data->dev_conf.rxmode.offloads;
 
 	nb_rx_queues = bonded_eth_dev->data->nb_rx_queues;
 	nb_tx_queues = bonded_eth_dev->data->nb_tx_queues;
-- 
2.33.0


^ permalink raw reply	[flat|nested] 7+ messages in thread

* [PATCH 19.11 2/2] net/hns3: delete unused markup
  2022-12-01  6:08 [PATCH 19.11 0/2] backport two patches for bonding and hns3 driver Huisong Li
  2022-12-01  6:08 ` [PATCH 19.11 1/2] net/bonding: fix slave device Rx/Tx offload configuration Huisong Li
@ 2022-12-01  6:08 ` Huisong Li
  2022-12-05  6:55 ` [PATCH 19.11 0/2] backport two patches for bonding and hns3 driver Christian Ehrhardt
  2 siblings, 0 replies; 7+ messages in thread
From: Huisong Li @ 2022-12-01  6:08 UTC (permalink / raw)
  To: stable, christian.ehrhardt
  Cc: liudongdong3, fengchengwen, huangdaode, lihuisong

[ upstream commit c05a540902b0e1661945775dc39b144a572c2404 ]

The '__rte_unused' tag in the input parameter  of 'hns3_mac_stats_reset'
is redundant. This patch remove this tag. In addition, this function is
aimed to clear MAC statics. So using 'struct hns3_hw' as input parameter
is better than 'struct rte_eth_dev', and it also facilitates the call of
this function.

Fixes: 8839c5e202f3 ("net/hns3: support device stats")

Signed-off-by: Huisong Li <lihuisong@huawei.com>
Signed-off-by: Dongdong Liu <liudongdong3@huawei.com>
---
 drivers/net/hns3/hns3_stats.c | 23 ++++++-----------------
 1 file changed, 6 insertions(+), 17 deletions(-)

diff --git a/drivers/net/hns3/hns3_stats.c b/drivers/net/hns3/hns3_stats.c
index b4bc4f28f3..3f3e9f1c22 100644
--- a/drivers/net/hns3/hns3_stats.c
+++ b/drivers/net/hns3/hns3_stats.c
@@ -347,15 +347,6 @@ hns3_query_mac_stats_reg_num(struct hns3_hw *hw)
 	return 0;
 }
 
-static int
-hns3_query_update_mac_stats(struct rte_eth_dev *dev)
-{
-	struct hns3_adapter *hns = dev->data->dev_private;
-	struct hns3_hw *hw = &hns->hw;
-
-	return hns3_update_mac_stats(hw);
-}
-
 /* Get tqp stats from register */
 static int
 hns3_update_tqp_stats(struct hns3_hw *hw)
@@ -519,14 +510,13 @@ hns3_stats_reset(struct rte_eth_dev *eth_dev)
 }
 
 static int
-hns3_mac_stats_reset(__rte_unused struct rte_eth_dev *dev)
+hns3_mac_stats_reset(struct hns3_hw *hw)
 {
-	struct hns3_adapter *hns = dev->data->dev_private;
-	struct hns3_hw *hw = &hns->hw;
 	struct hns3_mac_stats *mac_stats = &hw->mac_stats;
 	int ret;
 
-	ret = hns3_query_update_mac_stats(dev);
+	/* Clear hardware MAC statistics by reading it. */
+	ret = hns3_update_mac_stats(hw);
 	if (ret) {
 		hns3_err(hw, "Clear Mac stats fail : %d", ret);
 		return ret;
@@ -590,8 +580,7 @@ hns3_dev_xstats_get(struct rte_eth_dev *dev, struct rte_eth_xstat *xstats,
 	count = 0;
 
 	if (!hns->is_vf) {
-		/* Update Mac stats */
-		ret = hns3_query_update_mac_stats(dev);
+		ret = hns3_update_mac_stats(hw);
 		if (ret < 0) {
 			hns3_err(hw, "Update Mac stats fail : %d", ret);
 			return ret;
@@ -929,6 +918,7 @@ int
 hns3_dev_xstats_reset(struct rte_eth_dev *dev)
 {
 	struct hns3_adapter *hns = dev->data->dev_private;
+	struct hns3_hw *hw = &hns->hw;
 	struct hns3_pf *pf = &hns->pf;
 	struct hns3_rx_queue *rxq;
 	int ret;
@@ -956,8 +946,7 @@ hns3_dev_xstats_reset(struct rte_eth_dev *dev)
 	if (hns->is_vf)
 		return 0;
 
-	/* HW registers are cleared on read */
-	ret = hns3_mac_stats_reset(dev);
+	ret = hns3_mac_stats_reset(hw);
 	if (ret)
 		return ret;
 
-- 
2.33.0


^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: [PATCH 19.11 0/2] backport two patches for bonding and hns3 driver
  2022-12-01  6:08 [PATCH 19.11 0/2] backport two patches for bonding and hns3 driver Huisong Li
  2022-12-01  6:08 ` [PATCH 19.11 1/2] net/bonding: fix slave device Rx/Tx offload configuration Huisong Li
  2022-12-01  6:08 ` [PATCH 19.11 2/2] net/hns3: delete unused markup Huisong Li
@ 2022-12-05  6:55 ` Christian Ehrhardt
  2022-12-06  1:27   ` lihuisong (C)
  2 siblings, 1 reply; 7+ messages in thread
From: Christian Ehrhardt @ 2022-12-05  6:55 UTC (permalink / raw)
  To: Huisong Li; +Cc: stable, liudongdong3, fengchengwen, huangdaode

On Thu, Dec 1, 2022 at 7:08 AM Huisong Li <lihuisong@huawei.com> wrote:
>
> Fix slave device Rx/Tx offload configuration for bonding driver and delete
> unused markup for hns3 driver.
>
> Huisong Li (2):
>   net/bonding: fix slave device Rx/Tx offload configuration
>   net/hns3: delete unused markup

Hi Huisong,
unfortunately your backports arrived after -rc1 was tagged and I' not
like to reset testing for everyone.

I'll keep them open - if anything else is severe enough to reset to an
-rc2 anyway I'll happily apply them.

Otherwise I'll queue them for when there is another release,
but honestly that isn't sure as 19.11.14 was meant to be the last
normal stable release of the 19.11.x series.

>  drivers/net/bonding/rte_eth_bond_pmd.c | 11 ++++-------
>  drivers/net/hns3/hns3_stats.c          | 23 ++++++-----------------
>  2 files changed, 10 insertions(+), 24 deletions(-)
>
> --
> 2.33.0
>


-- 
Christian Ehrhardt
Senior Staff Engineer, Ubuntu Server
Canonical Ltd

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: [PATCH 19.11 0/2] backport two patches for bonding and hns3 driver
  2022-12-05  6:55 ` [PATCH 19.11 0/2] backport two patches for bonding and hns3 driver Christian Ehrhardt
@ 2022-12-06  1:27   ` lihuisong (C)
  2022-12-06  6:43     ` Christian Ehrhardt
  0 siblings, 1 reply; 7+ messages in thread
From: lihuisong (C) @ 2022-12-06  1:27 UTC (permalink / raw)
  To: Christian Ehrhardt; +Cc: stable, liudongdong3, fengchengwen, huangdaode


在 2022/12/5 14:55, Christian Ehrhardt 写道:
> On Thu, Dec 1, 2022 at 7:08 AM Huisong Li <lihuisong@huawei.com> wrote:
>> Fix slave device Rx/Tx offload configuration for bonding driver and delete
>> unused markup for hns3 driver.
>>
>> Huisong Li (2):
>>    net/bonding: fix slave device Rx/Tx offload configuration
>>    net/hns3: delete unused markup
> Hi Huisong,
> unfortunately your backports arrived after -rc1 was tagged and I' not
> like to reset testing for everyone.
Sorry for my late backports.
>
> I'll keep them open - if anything else is severe enough to reset to an
> -rc2 anyway I'll happily apply them.
I thought there would be -rc2 later. Does the -rc version of LTS run 
like this?
>
> Otherwise I'll queue them for when there is another release,
> but honestly that isn't sure as 19.11.14 was meant to be the last
> normal stable release of the 19.11.x series.
Follow your plan. Thanks, Christian.😁
>>   drivers/net/bonding/rte_eth_bond_pmd.c | 11 ++++-------
>>   drivers/net/hns3/hns3_stats.c          | 23 ++++++-----------------
>>   2 files changed, 10 insertions(+), 24 deletions(-)
>>
>> --
>> 2.33.0
>>
>

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: [PATCH 19.11 0/2] backport two patches for bonding and hns3 driver
  2022-12-06  1:27   ` lihuisong (C)
@ 2022-12-06  6:43     ` Christian Ehrhardt
  2022-12-06  6:54       ` lihuisong (C)
  0 siblings, 1 reply; 7+ messages in thread
From: Christian Ehrhardt @ 2022-12-06  6:43 UTC (permalink / raw)
  To: lihuisong (C); +Cc: stable, liudongdong3, fengchengwen, huangdaode

On Tue, Dec 6, 2022 at 2:27 AM lihuisong (C) <lihuisong@huawei.com> wrote:
>
>
> 在 2022/12/5 14:55, Christian Ehrhardt 写道:
> > On Thu, Dec 1, 2022 at 7:08 AM Huisong Li <lihuisong@huawei.com> wrote:
> >> Fix slave device Rx/Tx offload configuration for bonding driver and delete
> >> unused markup for hns3 driver.
> >>
> >> Huisong Li (2):
> >>    net/bonding: fix slave device Rx/Tx offload configuration
> >>    net/hns3: delete unused markup
> > Hi Huisong,
> > unfortunately your backports arrived after -rc1 was tagged and I' not
> > like to reset testing for everyone.
> Sorry for my late backports.
> >
> > I'll keep them open - if anything else is severe enough to reset to an
> > -rc2 anyway I'll happily apply them.
> I thought there would be -rc2 later. Does the -rc version of LTS run
> like this?

Yeah, they are meant to be stable after all :-)
We'd hope (but not always succeed) that all backports are fine on the first try.

We usually try to only have -rc1 which becomes the release if passing
verification without regressions to the older version.

Any patches arriving late are always welcome and queued for either the
next LTS release or at the next -rc if verification results trigger
the need for that.

And in addition the fact that this was meant to be the last normal
19.11.x LTS makes this a special case.

> > Otherwise I'll queue them for when there is another release,
> > but honestly that isn't sure as 19.11.14 was meant to be the last
> > normal stable release of the 19.11.x series.
> Follow your plan. Thanks, Christian.😁
> >>   drivers/net/bonding/rte_eth_bond_pmd.c | 11 ++++-------
> >>   drivers/net/hns3/hns3_stats.c          | 23 ++++++-----------------
> >>   2 files changed, 10 insertions(+), 24 deletions(-)
> >>
> >> --
> >> 2.33.0
> >>
> >



-- 
Christian Ehrhardt
Senior Staff Engineer, Ubuntu Server
Canonical Ltd

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: [PATCH 19.11 0/2] backport two patches for bonding and hns3 driver
  2022-12-06  6:43     ` Christian Ehrhardt
@ 2022-12-06  6:54       ` lihuisong (C)
  0 siblings, 0 replies; 7+ messages in thread
From: lihuisong (C) @ 2022-12-06  6:54 UTC (permalink / raw)
  To: Christian Ehrhardt; +Cc: stable, liudongdong3, fengchengwen, huangdaode


在 2022/12/6 14:43, Christian Ehrhardt 写道:
> On Tue, Dec 6, 2022 at 2:27 AM lihuisong (C) <lihuisong@huawei.com> wrote:
>>
>> 在 2022/12/5 14:55, Christian Ehrhardt 写道:
>>> On Thu, Dec 1, 2022 at 7:08 AM Huisong Li <lihuisong@huawei.com> wrote:
>>>> Fix slave device Rx/Tx offload configuration for bonding driver and delete
>>>> unused markup for hns3 driver.
>>>>
>>>> Huisong Li (2):
>>>>     net/bonding: fix slave device Rx/Tx offload configuration
>>>>     net/hns3: delete unused markup
>>> Hi Huisong,
>>> unfortunately your backports arrived after -rc1 was tagged and I' not
>>> like to reset testing for everyone.
>> Sorry for my late backports.
>>> I'll keep them open - if anything else is severe enough to reset to an
>>> -rc2 anyway I'll happily apply them.
>> I thought there would be -rc2 later. Does the -rc version of LTS run
>> like this?
> Yeah, they are meant to be stable after all :-)
> We'd hope (but not always succeed) that all backports are fine on the first try.
>
> We usually try to only have -rc1 which becomes the release if passing
> verification without regressions to the older version.
>
> Any patches arriving late are always welcome and queued for either the
> next LTS release or at the next -rc if verification results trigger
> the need for that.
>
> And in addition the fact that this was meant to be the last normal
> 19.11.x LTS makes this a special case.
Got it. Thanks.
>
>>> Otherwise I'll queue them for when there is another release,
>>> but honestly that isn't sure as 19.11.14 was meant to be the last
>>> normal stable release of the 19.11.x series.
>> Follow your plan. Thanks, Christian.😁
>>>>    drivers/net/bonding/rte_eth_bond_pmd.c | 11 ++++-------
>>>>    drivers/net/hns3/hns3_stats.c          | 23 ++++++-----------------
>>>>    2 files changed, 10 insertions(+), 24 deletions(-)
>>>>
>>>> --
>>>> 2.33.0
>>>>
>
>

^ permalink raw reply	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2022-12-06  6:54 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-12-01  6:08 [PATCH 19.11 0/2] backport two patches for bonding and hns3 driver Huisong Li
2022-12-01  6:08 ` [PATCH 19.11 1/2] net/bonding: fix slave device Rx/Tx offload configuration Huisong Li
2022-12-01  6:08 ` [PATCH 19.11 2/2] net/hns3: delete unused markup Huisong Li
2022-12-05  6:55 ` [PATCH 19.11 0/2] backport two patches for bonding and hns3 driver Christian Ehrhardt
2022-12-06  1:27   ` lihuisong (C)
2022-12-06  6:43     ` Christian Ehrhardt
2022-12-06  6:54       ` lihuisong (C)

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).