lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <0d1cf97c-abbe-4a7a-a634-312caa882fad@gmx.net>
Date:   Fri, 24 Nov 2023 15:17:28 +0100
From:   Stefan Wahren <wahrenst@....net>
To:     Paolo Abeni <pabeni@...hat.com>,
        "David S. Miller" <davem@...emloft.net>,
        Eric Dumazet <edumazet@...gle.com>,
        Jakub Kicinski <kuba@...nel.org>
Cc:     Lino Sanfilippo <LinoSanfilippo@....de>,
        Florian Fainelli <f.fainelli@...il.com>,
        netdev@...r.kernel.org, linux-kernel@...r.kernel.org
Subject: Re: [PATCH 3/4 net] qca_spi: Fix ethtool -G iface tx behavior

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@....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
>

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ