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: <1dbae52d-6aba-467a-a864-24eeb3f96449@intel.com>
Date:   Thu, 5 Jan 2023 18:35:05 +0100
From:   Alexander Lobakin <alexandr.lobakin@...el.com>
To:     Gerhard Engleder <gerhard@...leder-embedded.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

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.

>  	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

>  	void __iomem *addr;
>  	int tx_queue_index = 0;
>  	int rx_queue_index = 0;

[...]

Thanks,
Olek

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ