lkml.org 
[lkml]   [2020]   [Nov]   [6]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [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;
> +}

\
 
 \ /
  Last update: 2020-11-06 16:40    [W:0.076 / U:1.088 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site