[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-Id: <20181107.223311.1952221214450219759.davem@davemloft.net>
Date: Wed, 07 Nov 2018 22:33:11 -0800 (PST)
From: David Miller <davem@...emloft.net>
To: madalin.bucur@....com
Cc: netdev@...r.kernel.org, linux-kernel@...r.kernel.org
Subject: Re: [PATCH] dpaa_eth: add ethtool coalesce control
From: Madalin Bucur <madalin.bucur@....com>
Date: Wed, 7 Nov 2018 15:53:43 +0200
> +static int dpaa_set_coalesce(struct net_device *dev,
> + struct ethtool_coalesce *c)
> +{
> + const cpumask_t *cpus = qman_affine_cpus();
> + struct qman_portal *portal;
> + u32 period;
> + u8 thresh;
> + int cpu;
> +
> + period = c->rx_coalesce_usecs;
> + thresh = c->rx_max_coalesced_frames;
> +
> + for_each_cpu(cpu, cpus) {
> + portal = qman_get_affine_portal(cpu);
> + qman_portal_set_iperiod(portal, period);
> + qman_dqrr_set_ithresh(portal, thresh);
> + }
You really have to check to see if the user is trying to configure
a setting you don't support, for example if the user tries
to set ->use_adative_rx_coalesce or uses a period or threshold
value which is out of range.
Thanks.
Powered by blists - more mailing lists