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]
Message-ID: <20201106154025.qx6am5ybknjuwzsn@skbuf>
Date:   Fri, 6 Nov 2020 17:40:25 +0200
From:   Vladimir Oltean <olteanv@...il.com>
To:     Xiaoliang Yang <xiaoliang.yang_1@....com>
Cc:     davem@...emloft.net, netdev@...r.kernel.org,
        linux-kernel@...r.kernel.org, vinicius.gomes@...el.com,
        jhs@...atatu.com, xiyou.wangcong@...il.com, jiri@...nulli.us,
        kuba@...nel.org, Jose.Abreu@...opsys.com,
        allan.nielsen@...rochip.com, joergen.andreasen@...rochip.com,
        UNGLinuxDriver@...rochip.com, po.liu@....com,
        claudiu.manoil@....com, alexandru.marginean@....com,
        vladimir.oltean@....com, leoyang.li@....com, mingkai.hu@....com
Subject: Re: [RFC, net-next 2/3] net: dsa: felix: add preempt queues set
 support for vsc9959

On Tue, Oct 20, 2020 at 12:04:57PM +0800, Xiaoliang Yang wrote:
> +static int vsc9959_port_get_preempt(struct ocelot *ocelot, int port,
> +				    struct ethtool_fp *fpcmd)
> +{
> +	struct ocelot_port *ocelot_port = ocelot->ports[port];
> +	u32 val;
> +
> +	val = ocelot_port_readl(ocelot_port, DEV_MM_VERIF_CONFIG);
> +	val &= DEV_MM_CONFIG_VERIF_CONFIG_PRM_VERIFY_DIS;
> +	fpcmd->enabled = (val ? 0 : 1);
> +
> +	val = ocelot_read(ocelot, QSYS_PREEMPTION_CFG);

You have a bug here. This should be:

	val = ocelot_read_rix(ocelot, QSYS_PREEMPTION_CFG, port);

otherwise you're always retrieving the frame preemption configuration of
port 0, regardless of the port passed as argument.

> +	fpcmd->min_frag_size_mult = QSYS_PREEMPTION_CFG_MM_ADD_FRAG_SIZE_X(val);
> +
> +	return 0;
> +}

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ