[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20180626064012.GP2161@nanopsycho>
Date: Tue, 26 Jun 2018 08:40:12 +0200
From: Jiri Pirko <jiri@...nulli.us>
To: Jakub Kicinski <jakub.kicinski@...ronome.com>
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
Tue, Jun 26, 2018 at 07:00:50AM CEST, jakub.kicinski@...ronome.com wrote:
>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?
Oh, the extack is leftover. I will remove it in v2.
>
>> + 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