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: <20180625220050.0ff6d44c@cakuba.netronome.com>
Date:   Mon, 25 Jun 2018 22:00:50 -0700
From:   Jakub Kicinski <jakub.kicinski@...ronome.com>
To:     Jiri Pirko <jiri@...nulli.us>
Cc:     netdev@...r.kernel.org, davem@...emloft.net, jhs@...atatu.com,
        xiyou.wangcong@...il.com, simon.horman@...ronome.com,
        john.hurley@...ronome.com, dsahern@...il.com, mlxsw@...lanox.com
Subject: Re: [patch net-next 6/9] net: sched: cls_flower: propagate chain
 teplate creation and destruction to drivers

On Mon, 25 Jun 2018 23:01:45 +0200, Jiri Pirko wrote:
> From: Jiri Pirko <jiri@...lanox.com>
> 
> Introduce a couple of flower offload commands in order to propagate
> template creation/destruction events down to device drivers.
> Drivers may use this information to prepare HW in an optimal way
> for future filter insertions.
> 
> Signed-off-by: Jiri Pirko <jiri@...lanox.com>

> diff --git a/net/sched/cls_flower.c b/net/sched/cls_flower.c
> index d64d43843a3a..276ba25a09c3 100644
> --- a/net/sched/cls_flower.c
> +++ b/net/sched/cls_flower.c
> @@ -1120,6 +1120,43 @@ static void fl_walk(struct tcf_proto *tp, struct tcf_walker *arg)
>  	}
>  }
>  
> +static void fl_hw_create_tmplt(struct tcf_chain *chain,
> +			       struct fl_flow_tmplt *tmplt,
> +			       struct netlink_ext_ack *extack)
> +{
> +	struct tc_cls_flower_offload cls_flower = {};
> +	struct tcf_block *block = chain->block;
> +	struct tcf_exts dummy_exts = { 0, };
> +
> +	cls_flower.common.chain_index = chain->index;

Did you skip extack on purpose?

> +	cls_flower.command = TC_CLSFLOWER_TMPLT_CREATE;
> +	cls_flower.cookie = (unsigned long) tmplt;
> +	cls_flower.dissector = &tmplt->dissector;
> +	cls_flower.mask = &tmplt->mask;
> +	cls_flower.key = &tmplt->dummy_key;
> +	cls_flower.exts = &dummy_exts;
> +
> +	/* We don't care if driver (any of them) fails to handle this
> +	 * call. It serves just as a hint for it.
> +	 */
> +	tc_setup_cb_call(block, NULL, TC_SETUP_CLSFLOWER,
> +			 &cls_flower, false);
> +}

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ