mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Stefan Wahren <wahrenst@gmx.net>
To: Paolo Abeni <pabeni@redhat.com>,
	"David S. Miller" <davem@davemloft.net>,
	Eric Dumazet <edumazet@google.com>,
	Jakub Kicinski <kuba@kernel.org>
Cc: Lino Sanfilippo <LinoSanfilippo@gmx.de>,
	Florian Fainelli <f.fainelli@gmail.com>,
	netdev@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH 3/4 net] qca_spi: Fix ethtool -G iface tx behavior
Date: Fri, 24 Nov 2023 15:17:28 +0100	[thread overview]
Message-ID: <0d1cf97c-abbe-4a7a-a634-312caa882fad@gmx.net> (raw)
In-Reply-To: <ea0087881f20dc154ca08a5b748b853246e2b86f.camel@redhat.com>

Hi Paolo,

Am 23.11.23 um 12:51 schrieb Paolo Abeni:
> On Tue, 2023-11-21 at 17:30 +0100, Stefan Wahren wrote:
>> After calling ethtool -g it was not possible to adjust the TX ring size
>> again.
> Could you please report the exact command sequence that will fail?
ethtool -g eth1
ethtool -G eth1 tx 8
>
>
>> The reason for this is that the readonly setting rx_pending get
>> initialized and after that the range check in qcaspi_set_ringparam()
>> fails regardless of the provided parameter. Since there is no adjustable
>> RX ring at all, drop it from qcaspi_get_ringparam().
>> Fixes: 291ab06ecf67 ("net: qualcomm: new Ethernet over SPI driver for QCA7000")
>> Signed-off-by: Stefan Wahren <wahrenst@gmx.net>
>> ---
>>   drivers/net/ethernet/qualcomm/qca_debug.c | 2 --
>>   1 file changed, 2 deletions(-)
>>
>> diff --git a/drivers/net/ethernet/qualcomm/qca_debug.c b/drivers/net/ethernet/qualcomm/qca_debug.c
>> index 6f2fa2a42770..613eb688cba2 100644
>> --- a/drivers/net/ethernet/qualcomm/qca_debug.c
>> +++ b/drivers/net/ethernet/qualcomm/qca_debug.c
>> @@ -252,9 +252,7 @@ qcaspi_get_ringparam(struct net_device *dev, struct ethtool_ringparam *ring,
>>   {
>>   	struct qcaspi *qca = netdev_priv(dev);
>>
>> -	ring->rx_max_pending = 4;
>>   	ring->tx_max_pending = TX_RING_MAX_LEN;
>> -	ring->rx_pending = 4;
>>   	ring->tx_pending = qca->txr.count;
>>   }
> I think it's preferable update qcaspi_set_ringparam() to complete
> successfully when the provided arguments don't change the rx_pending
> default (4)

Sorry, i didn't get. The whole point is that there is no RX ring at all,
just a TX ring. During the time of writing this driver, i was under the
assumption that the driver needs to provide a rx_pending in
qcaspi_get_ringparam even this is no RX ring. The number 4 represent the
maximum of 4 packets which can be received at once. But it's not a ring.

Best regards

> Cheers,
>
> Paolo
>


  reply	other threads:[~2023-11-24 14:22 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-11-21 16:30 [PATCH 0/4 net] qca_spi: collection of major fixes Stefan Wahren
2023-11-21 16:30 ` [PATCH 1/4 net] qca_spi: Fix SPI thread creation Stefan Wahren
2023-11-23 11:26   ` Paolo Abeni
2023-11-24 13:40     ` Stefan Wahren
2023-11-21 16:30 ` [PATCH 2/4 net] qca_spi: Fix SPI IRQ handling Stefan Wahren
2023-11-23 11:37   ` Paolo Abeni
2023-11-24 14:01     ` Stefan Wahren
2023-11-24 15:33       ` Paolo Abeni
2023-11-24 22:02         ` Stefan Wahren
2023-11-21 16:30 ` [PATCH 3/4 net] qca_spi: Fix ethtool -G iface tx behavior Stefan Wahren
2023-11-23 11:51   ` Paolo Abeni
2023-11-24 14:17     ` Stefan Wahren [this message]
2023-11-24 15:49       ` Paolo Abeni
2023-11-21 16:30 ` [PATCH 4/4 net] qca_spi: Fix reset behavior Stefan Wahren

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=0d1cf97c-abbe-4a7a-a634-312caa882fad@gmx.net \
    --to=wahrenst@gmx.net \
    --cc=LinoSanfilippo@gmx.de \
    --cc=davem@davemloft.net \
    --cc=edumazet@google.com \
    --cc=f.fainelli@gmail.com \
    --cc=kuba@kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=netdev@vger.kernel.org \
    --cc=pabeni@redhat.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®