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 for Android: free password hash cracker in your pocket
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <7b61f312-2377-53c2-ff66-cc4f71c124d3@engleder-embedded.com>
Date:   Thu, 5 Jan 2023 23:28:40 +0100
From:   Gerhard Engleder <gerhard@...leder-embedded.com>
To:     Alexander Lobakin <alexandr.lobakin@...el.com>
Cc:     davem@...emloft.net, kuba@...nel.org, edumazet@...gle.com,
        pabeni@...hat.com, Saeed Mahameed <saeed@...nel.org>,
        netdev@...r.kernel.org
Subject: Re: [PATCH net-next v3 8/9] tsnep: Add RX queue info for XDP support

On 05.01.23 18:35, Alexander Lobakin wrote:
> From: Gerhard Engleder <gerhard@...leder-embedded.com>
> Date: Wed Jan 04 2023 20:41:31 GMT+0100
> 
>> Register xdp_rxq_info with page_pool memory model. This is needed for
>> XDP buffer handling.
>>
>> Signed-off-by: Gerhard Engleder <gerhard@...leder-embedded.com>
>> Reviewed-by: Saeed Mahameed <saeed@...nel.org>
>> ---
>>   drivers/net/ethernet/engleder/tsnep.h      |  6 ++--
>>   drivers/net/ethernet/engleder/tsnep_main.c | 34 +++++++++++++++++-----
>>   2 files changed, 31 insertions(+), 9 deletions(-)
>>
>> diff --git a/drivers/net/ethernet/engleder/tsnep.h b/drivers/net/ethernet/engleder/tsnep.h
>> index 0e7fc36a64e1..0210dab90f71 100644
>> --- a/drivers/net/ethernet/engleder/tsnep.h
>> +++ b/drivers/net/ethernet/engleder/tsnep.h
>> @@ -133,17 +133,19 @@ struct tsnep_rx {
>>   	u32 dropped;
>>   	u32 multicast;
>>   	u32 alloc_failed;
>> +
>> +	struct xdp_rxq_info xdp_rxq;
>>   };
>>   
>>   struct tsnep_queue {
>>   	struct tsnep_adapter *adapter;
>>   	char name[IFNAMSIZ + 9];
>>   
>> +	struct napi_struct napi;
>> +
>>   	struct tsnep_tx *tx;
>>   	struct tsnep_rx *rx;
>>   
>> -	struct napi_struct napi;
>> -
> 
> I'd leave a word in the commit message that you're moving ::napi to
> improve structure cacheline span. Or even do that in a separate commit
> with some pahole output to make it clear why you do that.

I only reordered based on access order during initialization. But I 
understand that this not a valid reason. I will remove that reordering.

>>   	int irq;
>>   	u32 irq_mask;
>>   	void __iomem *irq_delay_addr;
> 
> [...]
> 
>> @@ -1253,6 +1266,7 @@ int tsnep_netdev_open(struct net_device *netdev)
>>   {
>>   	struct tsnep_adapter *adapter = netdev_priv(netdev);
>>   	int i;
>> +	unsigned int napi_id;
> 
> Reverse Christmas Tree variable style is already messed up here, maybe
> you could fix it inplace while at it or at least not make it worse? :D

I forgot to do that here. Will be fixed.

Gerhard

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ