From: David Miller <davem@davemloft.net>
To: madalin.bucur@nxp.com
Cc: netdev@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH] dpaa_eth: add ethtool coalesce control
Date: Wed, 07 Nov 2018 22:33:11 -0800 (PST) [thread overview]
Message-ID: <20181107.223311.1952221214450219759.davem@davemloft.net> (raw)
In-Reply-To: <1541598823-22533-1-git-send-email-madalin.bucur@nxp.com>
From: Madalin Bucur <madalin.bucur@nxp.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.
prev parent reply other threads:[~2018-11-08 6:33 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-11-07 13:53 [PATCH] dpaa_eth: add ethtool coalesce control Madalin Bucur
2018-11-08 6:33 ` David Miller [this message]
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=20181107.223311.1952221214450219759.davem@davemloft.net \
--to=davem@davemloft.net \
--cc=linux-kernel@vger.kernel.org \
--cc=madalin.bucur@nxp.com \
--cc=netdev@vger.kernel.org \
/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;
as well as URLs for NNTP newsgroup(s).