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] [day] [month] [year] [list]
Date:   Tue, 6 Apr 2021 10:21:25 +0000
From:   Claudiu Manoil <claudiu.manoil@....com>
To:     Rasmus Villemoes <rasmus.villemoes@...vas.dk>
CC:     Network Development <netdev@...r.kernel.org>,
        Vladimir Oltean <vladimir.oltean@....com>,
        Ioana Ciornei <ioana.ciornei@....com>,
        Esben Haabendal <esben@...nix.com>
Subject: RE: gianfar driver and GFAR_MQ_POLLING

>-----Original Message-----
>From: Rasmus Villemoes <rasmus.villemoes@...vas.dk>
>Sent: Tuesday, April 6, 2021 12:56 PM
>To: Claudiu Manoil <claudiu.manoil@....com>
>Cc: Network Development <netdev@...r.kernel.org>; Vladimir Oltean
><vladimir.oltean@....com>; Ioana Ciornei <ioana.ciornei@....com>; Esben
>Haabendal <esben@...nix.com>
>Subject: gianfar driver and GFAR_MQ_POLLING
>
>Hi,
>
>I noticed that gfar_of_init() has
>
>	if (of_device_is_compatible(np, "fsl,etsec2")) {
>		mode = MQ_MG_MODE;
>		poll_mode = GFAR_SQ_POLLING;
>	} else {
>		mode = SQ_SG_MODE;
>		poll_mode = GFAR_SQ_POLLING;
>	}
>
>i.e., poll_mode is always set to GFAR_SQ_POLLING, and I can't find
>anywhere that GFAR_MQ_POLLING is used (except for comments). So it
>seems
>that everything in the else branches of the "if (priv->poll_mode ==
>GFAR_SQ_POLLING)"s, including the gfar_poll_rx and gfar_poll_tx
>callbacks, is currently dead code.
>
>I'm wondering if this is deliberate, and if so, if the dead code
>could/should just be removed?
>
>FWIW, some quick testing naively doing
>
>        if (of_device_is_compatible(np, "fsl,etsec2")) {
>                mode = MQ_MG_MODE;
>-               poll_mode = GFAR_SQ_POLLING;
>+               poll_mode = GFAR_MQ_POLLING;
>        } else {
>
>results in broken network - ping answers the first packet, but then
>nothing after that, and ssh is completely broken (and if ssh is
>attempted first, ping doesn't work at all). This is on a ls1021a-derived
>board.
>

I think GFAR_MQ_POLLING should be finally defeatured. There was no
request so far to re-enable multiple Rx and Tx queues (more than one per CPU).
To support multiple Tx queues a different mechanism should be implemented,
that enables the extra queues via ndo_setup_tc instead of device tree properties.
I can prepare a patch to remove this dead code.

Thanks.
Claudiu

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ