Netdev List
 help / color / mirror / Atom feed
From: Vladimir Oltean <olteanv@gmail.com>
To: Xiaoliang Yang <xiaoliang.yang_1@nxp.com>
Cc: davem@davemloft.net, netdev@vger.kernel.org,
	linux-kernel@vger.kernel.org, vinicius.gomes@intel.com,
	jhs@mojatatu.com, xiyou.wangcong@gmail.com, jiri@resnulli.us,
	kuba@kernel.org, Jose.Abreu@synopsys.com,
	allan.nielsen@microchip.com, joergen.andreasen@microchip.com,
	UNGLinuxDriver@microchip.com, po.liu@nxp.com,
	claudiu.manoil@nxp.com, alexandru.marginean@nxp.com,
	vladimir.oltean@nxp.com, leoyang.li@nxp.com, mingkai.hu@nxp.com
Subject: Re: [RFC, net-next 2/3] net: dsa: felix: add preempt queues set support for vsc9959
Date: Fri, 6 Nov 2020 17:40:25 +0200	[thread overview]
Message-ID: <20201106154025.qx6am5ybknjuwzsn@skbuf> (raw)
In-Reply-To: <20201020040458.39794-3-xiaoliang.yang_1@nxp.com>

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;
> +}

  reply	other threads:[~2020-11-06 15:40 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-10-20  4:04 [RFC, net-next 0/3] net: dsa: felix: frame preemption support Xiaoliang Yang
2020-10-20  4:04 ` [RFC, net-next 1/3] net: dsa: ethtool preempt ops support on slave ports Xiaoliang Yang
2020-10-20  4:04 ` [RFC, net-next 2/3] net: dsa: felix: add preempt queues set support for vsc9959 Xiaoliang Yang
2020-11-06 15:40   ` Vladimir Oltean [this message]
2020-10-20  4:04 ` [RFC, net-next 3/3] net: dsa: felix: tc-taprio preempt set support Xiaoliang Yang
2020-10-20 11:04 ` [RFC, net-next 0/3] net: dsa: felix: frame preemption support Vladimir Oltean

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20201106154025.qx6am5ybknjuwzsn@skbuf \
    --to=olteanv@gmail.com \
    --cc=Jose.Abreu@synopsys.com \
    --cc=UNGLinuxDriver@microchip.com \
    --cc=alexandru.marginean@nxp.com \
    --cc=allan.nielsen@microchip.com \
    --cc=claudiu.manoil@nxp.com \
    --cc=davem@davemloft.net \
    --cc=jhs@mojatatu.com \
    --cc=jiri@resnulli.us \
    --cc=joergen.andreasen@microchip.com \
    --cc=kuba@kernel.org \
    --cc=leoyang.li@nxp.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mingkai.hu@nxp.com \
    --cc=netdev@vger.kernel.org \
    --cc=po.liu@nxp.com \
    --cc=vinicius.gomes@intel.com \
    --cc=vladimir.oltean@nxp.com \
    --cc=xiaoliang.yang_1@nxp.com \
    --cc=xiyou.wangcong@gmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox