lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Date:   Wed, 11 Oct 2017 14:40:00 -0700
From:   Vinicius Costa Gomes <vinicius.gomes@...el.com>
To:     Jiri Pirko <jiri@...nulli.us>
Cc:     netdev@...r.kernel.org, intel-wired-lan@...ts.osuosl.org,
        jhs@...atatu.com, xiyou.wangcong@...il.com, andre.guedes@...el.com,
        ivan.briano@...el.com, jesus.sanchez-palencia@...el.com,
        boon.leong.ong@...el.com, richardcochran@...il.com,
        henrik@...tad.us, levipearson@...il.com, rodney.cummings@...com
Subject: Re: [next-queue PATCH v5 4/5] net/sched: Add support for HW offloading for CBS

Jiri Pirko <jiri@...nulli.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,
--
Vinicius

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ