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]
Date:   Wed, 1 Feb 2023 14:43:44 +0100
From:   Simon Horman <simon.horman@...igine.com>
To:     Vladimir Oltean <vladimir.oltean@....com>
Cc:     netdev@...r.kernel.org, "David S. Miller" <davem@...emloft.net>,
        Eric Dumazet <edumazet@...gle.com>,
        Jakub Kicinski <kuba@...nel.org>,
        Paolo Abeni <pabeni@...hat.com>,
        Claudiu Manoil <claudiu.manoil@....com>,
        Vinicius Costa Gomes <vinicius.gomes@...el.com>,
        Kurt Kanzenbach <kurt@...utronix.de>,
        Jacob Keller <jacob.e.keller@...el.com>,
        Jamal Hadi Salim <jhs@...atatu.com>,
        Cong Wang <xiyou.wangcong@...il.com>,
        Jiri Pirko <jiri@...nulli.us>
Subject: Re: [PATCH v4 net-next 04/15] net: enetc: ensure we always have a
 minimum number of TXQs for stack

On Mon, Jan 30, 2023 at 07:31:34PM +0200, Vladimir Oltean wrote:
> Currently it can happen that an mqprio qdisc is installed with num_tc 8,
> and this will reserve 8 (out of 8) TXQs for the network stack. Then we
> can attach an XDP program, and this will crop 2 TXQs, leaving just 6 for
> mqprio. That's not what the user requested, and we should fail it.
> 
> On the other hand, if mqprio isn't requested, we still give the 8 TXQs
> to the network stack (with hashing among a single traffic class), but
> then, cropping 2 TXQs for XDP is fine, because the user didn't
> explicitly ask for any number of TXQs, so no expectations are violated.
> 
> Simply put, the logic that mqprio should impose a minimum number of TXQs
> for the network never existed. Let's say (more or less arbitrarily) that
> without mqprio, the driver expects a minimum number of TXQs equal to the
> number of CPUs (on NXP LS1028A, that is either 1, or 2). And with mqprio,
> mqprio gives the minimum required number of TXQs.
> 
> Signed-off-by: Vladimir Oltean <vladimir.oltean@....com>

The nit below notwithstanding,

Reviewed-by: Simon Horman <simon.horman@...igine.com>

...

> diff --git a/drivers/net/ethernet/freescale/enetc/enetc.h b/drivers/net/ethernet/freescale/enetc/enetc.h
> index 1fe8dfd6b6d4..e21d096c5a90 100644
> --- a/drivers/net/ethernet/freescale/enetc/enetc.h
> +++ b/drivers/net/ethernet/freescale/enetc/enetc.h
> @@ -369,6 +369,9 @@ struct enetc_ndev_priv {
>  
>  	struct psfp_cap psfp_cap;
>  
> +	/* Minimum number of TX queues required by the network stack */
> +	unsigned int min_num_stack_tx_queues;
> +

It is probably not important.
But I do notice there are several holes in struct enetc_ndev_priv
that would fit this field.

>  	struct phylink *phylink;
>  	int ic_mode;
>  	u32 tx_ictt;
> -- 
> 2.34.1
> 

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ