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] [thread-next>] [day] [month] [year] [list]
Message-ID: <56AF24AE.8030101@gmail.com>
Date:	Mon, 01 Feb 2016 01:26:06 -0800
From:	John Fastabend <john.fastabend@...il.com>
To:	Amir Vadai <amir@...ai.me>,
	"David S. Miller" <davem@...emloft.net>, netdev@...r.kernel.org,
	John Fastabend <john.r.fastabend@...el.com>
CC:	Or Gerlitz <ogerlitz@...lanox.com>,
	Hadar Har-Zion <hadarh@...lanox.com>,
	Jiri Pirko <jiri@...lanox.com>,
	Jamal Hadi Salim <jhs@...atatu.com>,
	Scott Feldman <sfeldma@...il.com>
Subject: Re: [RFC net-next 2/9] net/switchdev: Introduce hardware offload
 support

On 16-02-01 12:34 AM, Amir Vadai wrote:
> Extend the switchdev API with new operations: switchdev_port_flow_add()
> and switchdev_port_flow_del().
> It allows the user to add/del a hardware offloaded flow classification
> and actions.
> For every new flow object a cookie is supplied. This cookie will be
> used later on to identify the flow when removed.
> 
> In order to make the API as flexible as possible, flow_dissector is
> being used to describe the flow classifier.
> 
> Every new flow object is consists of a flow_dissector+key+mask to
> describe the classifier and a switchdev_obj_port_flow_act to describe
> the actions and their attributes.
> 
> object is passed to the lower layer driver to be pushed into the
> hardware.
> 
> Signed-off-by: Amir Vadai <amir@...ai.me>
> ---

+Scott

[...]

> +struct switchdev_obj_port_flow {
> +	struct switchdev_obj obj;
> +
> +	unsigned long cookie;
> +	struct flow_dissector *dissector; /* Dissector for mask and keys */
> +	void *mask; /* Flow keys mask */
> +	void *key;  /* Flow keys */

The heavy use of void* here and below seems questionable to me. If your
going to consume flow keys/mask define them.

> +	struct switchdev_obj_port_flow_act *actions;
> +};

[...]

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ