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: <f15674a0a6544d8c90522cc8938e3eb6@mikrotik.com>
Date:   Wed, 12 May 2021 10:53:37 +0300
From:   Gatis Peisenieks <gatis@...rotik.com>
To:     Eric Dumazet <eric.dumazet@...il.com>
Cc:     chris.snook@...il.com, davem@...emloft.net, kuba@...nel.org,
        hkallweit1@...il.com, jesse.brandeburg@...el.com,
        dchickles@...vell.com, tully@...rotik.com, netdev@...r.kernel.org,
        linux-kernel@...r.kernel.org
Subject: Re: [PATCH net-next 2/4] atl1c: improve performance by avoiding
 unnecessary pcie writes on xmit



On 2021-05-12 00:39, Eric Dumazet wrote:
>> @@ -2270,8 +2272,11 @@ static netdev_tx_t atl1c_xmit_frame(struct 
>> sk_buff *skb,
>>  		atl1c_tx_rollback(adapter, tpd, type);
>>  		dev_kfree_skb_any(skb);
>>  	} else {
>> -		netdev_sent_queue(adapter->netdev, skb->len);
>> -		atl1c_tx_queue(adapter, skb, tpd, type);
>> +		bool more = netdev_xmit_more();
>> +
>> +		__netdev_sent_queue(adapter->netdev, skb->len, more);
> 
> 
> This is probably buggy.
> 
> You must check and use the return code of this function,
> as in :
> 
> 	bool door_bell = __netdev_sent_queue(adapter->netdev, skb->len,
> netdev_xmit_more());
> 
> 	if (door_bell)
> 		atl1c_tx_queue(adapter, type);
> 

Eric, thank you for taking your time to look at this!

You are correct, tx queue can get stopped in __netdev_sent_queue
and if there were more packets coming the submit to HW would be
missed / unnecessarily delayed.


> 
>> +		if (!more)
>> +			atl1c_tx_queue(adapter, type);
>>  	}
>> 
>>  	return NETDEV_TX_OK;
>> 

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ