2020-09-15 01:27:58

by Wong, Vee Khee

[permalink] [raw]
Subject: [PATCH net-next 0/3] net: stmmac: Add ethtool support for get|set channels

This patch set is to add support for user to get or set Tx/Rx channel
via ethtool. There are two patches that fixes bug introduced on upstream
in order to have the feature work.

Tested on Intel Tigerlake Platform.

Aashish Verma (1):
net: stmmac: Fix incorrect location to set real_num_rx|tx_queues

Ong Boon Leong (2):
net: stmmac: add ethtool support for get/set channels
net: stmmac: use netif_tx_start|stop_all_queues() function

drivers/net/ethernet/stmicro/stmmac/stmmac.h | 1 +
.../ethernet/stmicro/stmmac/stmmac_ethtool.c | 26 ++++
.../net/ethernet/stmicro/stmmac/stmmac_main.c | 135 +++++++++---------
3 files changed, 98 insertions(+), 64 deletions(-)

--
2.17.0


2020-09-15 01:29:58

by Wong, Vee Khee

[permalink] [raw]
Subject: [PATCH net-next 2/3] net: stmmac: Fix incorrect location to set real_num_rx|tx_queues

From: Aashish Verma <[email protected]>

netif_set_real_num_tx_queues() & netif_set_real_num_rx_queues() should be
used to inform network stack about the real Tx & Rx queue (active) number
in both stmmac_open() and stmmac_resume(), therefore, we move the code
from stmmac_dvr_probe() to stmmac_hw_setup().

Fixes: c02b7a914551 net: stmmac: use netif_set_real_num_{rx,tx}_queues

Signed-off-by: Aashish Verma <[email protected]>
Signed-off-by: Ong Boon Leong <[email protected]>
---
drivers/net/ethernet/stmicro/stmmac/stmmac_main.c | 8 ++++----
1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/drivers/net/ethernet/stmicro/stmmac/stmmac_main.c b/drivers/net/ethernet/stmicro/stmmac/stmmac_main.c
index 9302d8012a10..fea3b77892ab 100644
--- a/drivers/net/ethernet/stmicro/stmmac/stmmac_main.c
+++ b/drivers/net/ethernet/stmicro/stmmac/stmmac_main.c
@@ -2733,6 +2733,10 @@ static int stmmac_hw_setup(struct net_device *dev, bool init_ptp)
stmmac_enable_tbs(priv, priv->ioaddr, enable, chan);
}

+ /* Configure real RX and TX queues */
+ netif_set_real_num_rx_queues(dev, priv->plat->rx_queues_to_use);
+ netif_set_real_num_tx_queues(dev, priv->plat->tx_queues_to_use);
+
/* Start the ball rolling... */
stmmac_start_all_dma(priv);

@@ -4883,10 +4887,6 @@ int stmmac_dvr_probe(struct device *device,

stmmac_check_ether_addr(priv);

- /* Configure real RX and TX queues */
- netif_set_real_num_rx_queues(ndev, priv->plat->rx_queues_to_use);
- netif_set_real_num_tx_queues(ndev, priv->plat->tx_queues_to_use);
-
ndev->netdev_ops = &stmmac_netdev_ops;

ndev->hw_features = NETIF_F_SG | NETIF_F_IP_CSUM | NETIF_F_IPV6_CSUM |
--
2.17.0

2020-09-15 22:44:20

by David Miller

[permalink] [raw]
Subject: Re: [PATCH net-next 0/3] net: stmmac: Add ethtool support for get|set channels

From: Wong Vee Khee <[email protected]>
Date: Tue, 15 Sep 2020 09:28:37 +0800

> This patch set is to add support for user to get or set Tx/Rx channel
> via ethtool. There are two patches that fixes bug introduced on upstream
> in order to have the feature work.
>
> Tested on Intel Tigerlake Platform.

Series applied, thank you.

2020-09-15 22:55:35

by Florian Fainelli

[permalink] [raw]
Subject: Re: [PATCH net-next 0/3] net: stmmac: Add ethtool support for get|set channels



On 9/15/2020 3:43 PM, David Miller wrote:
> From: Wong Vee Khee <[email protected]>
> Date: Tue, 15 Sep 2020 09:28:37 +0800
>
>> This patch set is to add support for user to get or set Tx/Rx channel
>> via ethtool. There are two patches that fixes bug introduced on upstream
>> in order to have the feature work.
>>
>> Tested on Intel Tigerlake Platform.
>
> Series applied, thank you.

patch #2 does not have a proper Fixes: tag format, it should be:

Fixes: cafebabed00d ("some super subject")
--
Florian

2020-09-16 00:02:58

by Wong, Vee Khee

[permalink] [raw]
Subject: RE: [PATCH net-next 0/3] net: stmmac: Add ethtool support for get|set channels

My bad...

Hi David Miller,

Can you help with the commit message fix or do you want to to send a new patch with the fix since the patches are applied on net-next?

Regards,
Vee Khee

> -----Original Message-----
> From: Florian Fainelli <[email protected]>
> Sent: Wednesday, September 16, 2020 6:54 AM
> To: David Miller <[email protected]>; Wong, Vee Khee
> <[email protected]>
> Cc: [email protected]; [email protected];
> [email protected]; [email protected]; [email protected];
> [email protected]; [email protected]; [email protected];
> [email protected]; [email protected];
> [email protected]; [email protected]; Ong,
> Boon Leong <[email protected]>; Voon, Weifeng
> <[email protected]>; Vijaya Balan, Sadhishkhanna
> <[email protected]>; Seow, Chen Yong
> <[email protected]>
> Subject: Re: [PATCH net-next 0/3] net: stmmac: Add ethtool support for
> get|set channels
>
>
>
> On 9/15/2020 3:43 PM, David Miller wrote:
> > From: Wong Vee Khee <[email protected]>
> > Date: Tue, 15 Sep 2020 09:28:37 +0800
> >
> >> This patch set is to add support for user to get or set Tx/Rx channel
> >> via ethtool. There are two patches that fixes bug introduced on
> >> upstream in order to have the feature work.
> >>
> >> Tested on Intel Tigerlake Platform.
> >
> > Series applied, thank you.
>
> patch #2 does not have a proper Fixes: tag format, it should be:
>
> Fixes: cafebabed00d ("some super subject")
> --
> Florian

2020-09-16 00:06:10

by Florian Fainelli

[permalink] [raw]
Subject: Re: [PATCH net-next 0/3] net: stmmac: Add ethtool support for get|set channels



On 9/15/2020 4:59 PM, Wong, Vee Khee wrote:
> My bad...
>
> Hi David Miller,

(please don't top post)

>
> Can you help with the commit message fix or do you want to to send a new patch with the fix since the patches are applied on net-next?

It has already been applied, so this is too late, just telling you so
you can avoid it next time. And it should be part of David's CI while
applying patching, too.
--
Florian