From: Vinicius Costa Gomes <vinicius.gomes@intel.com>
To: Jiri Pirko <jiri@resnulli.us>
Cc: netdev@vger.kernel.org, intel-wired-lan@lists.osuosl.org,
jhs@mojatatu.com, xiyou.wangcong@gmail.com,
andre.guedes@intel.com, ivan.briano@intel.com,
jesus.sanchez-palencia@intel.com, boon.leong.ong@intel.com,
richardcochran@gmail.com, henrik@austad.us,
levipearson@gmail.com, rodney.cummings@ni.com
Subject: Re: [next-queue PATCH v5 4/5] net/sched: Add support for HW offloading for CBS
Date: Wed, 11 Oct 2017 14:40:00 -0700 [thread overview]
Message-ID: <87shepmki7.fsf@intel.com> (raw)
In-Reply-To: <20171011070751.GC2039@nanopsycho>
Jiri Pirko <jiri@resnulli.us> writes:
[...]
>>+static void disable_cbs_offload(struct net_device *dev,
>>+ struct cbs_sched_data *q)
>>+{
>>+ struct tc_cbs_qopt_offload cbs = { };
>>+ const struct net_device_ops *ops;
>>+ int err;
>>+
>>+ if (!q->offload)
>>+ return;
>>+
>>+ ops = dev->netdev_ops;
>>+ if (!ops->ndo_setup_tc)
>>+ return;
>>+
>>+ cbs.queue = q->queue;
>>+ cbs.enable = 0;
>>+
>>+ err = ops->ndo_setup_tc(dev, TC_SETUP_CBS, &cbs);
>>+ if (err < 0)
>>+ pr_warn("Couldn't disable CBS offload for queue %d\n",
>>+ cbs.queue);
>
> Hmm, you have separete helper for disable, yet you have enable spread
> over cbs_change. Please push the enable code into enable_cbs_offload.
> While you are at it, change the names to cbs_ to maintain the qdisc
> prefix in function names: cbs_offload_enable/cbs_offload_disable
>
Sure.
Cheers,
next prev parent reply other threads:[~2017-10-11 21:40 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-10-11 0:43 [next-queue PATCH v5 0/5] TSN: Add qdisc based config interface for CBS Vinicius Costa Gomes
2017-10-11 0:43 ` [next-queue PATCH v5 1/5] net/sched: Check for null dev_queue on create flow Vinicius Costa Gomes
2017-10-11 0:43 ` [next-queue PATCH v5 2/5] mqprio: Implement select_queue class_ops Vinicius Costa Gomes
2017-10-11 0:43 ` [next-queue PATCH v5 3/5] net/sched: Introduce Credit Based Shaper (CBS) qdisc Vinicius Costa Gomes
2017-10-11 6:58 ` Jiri Pirko
2017-10-11 21:38 ` Vinicius Costa Gomes
2017-10-11 0:43 ` [next-queue PATCH v5 4/5] net/sched: Add support for HW offloading for CBS Vinicius Costa Gomes
2017-10-11 7:07 ` Jiri Pirko
2017-10-11 21:40 ` Vinicius Costa Gomes [this message]
2017-10-11 0:44 ` [next-queue PATCH v5 5/5] igb: Add support for CBS offload Vinicius Costa Gomes
2017-10-11 3:23 ` [next-queue PATCH v5 0/5] TSN: Add qdisc based config interface for CBS David Miller
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=87shepmki7.fsf@intel.com \
--to=vinicius.gomes@intel.com \
--cc=andre.guedes@intel.com \
--cc=boon.leong.ong@intel.com \
--cc=henrik@austad.us \
--cc=intel-wired-lan@lists.osuosl.org \
--cc=ivan.briano@intel.com \
--cc=jesus.sanchez-palencia@intel.com \
--cc=jhs@mojatatu.com \
--cc=jiri@resnulli.us \
--cc=levipearson@gmail.com \
--cc=netdev@vger.kernel.org \
--cc=richardcochran@gmail.com \
--cc=rodney.cummings@ni.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;
as well as URLs for NNTP newsgroup(s).