[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <aa9e0c4b-5678-cec8-48e2-352b3bd3ba9a@ucloud.cn>
Date: Sat, 27 Jul 2019 16:02:59 +0800
From: wenxu <wenxu@...oud.cn>
To: Jakub Kicinski <jakub.kicinski@...ronome.com>
Cc: pablo@...filter.org, fw@...len.de, netfilter-devel@...r.kernel.org,
netdev@...r.kernel.org
Subject: Re: [PATCH net-next v3 2/3] flow_offload: support get tcf block
immediately
在 2019/7/27 8:52, Jakub Kicinski 写道:
> On Fri, 26 Jul 2019 21:34:06 +0800, wenxu@...oud.cn wrote:
>> From: wenxu <wenxu@...oud.cn>
>>
>> Because the new flow-indr-block can't get the tcf_block
>> directly.
>> It provide a callback to find the tcf block immediately
>> when the device register and contain a ingress block.
>>
>> Signed-off-by: wenxu <wenxu@...oud.cn>
> Please CC people who gave you feedback on your subsequent submissions.
>
>> diff --git a/include/net/flow_offload.h b/include/net/flow_offload.h
>> index 66f89bc..3b2e848 100644
>> --- a/include/net/flow_offload.h
>> +++ b/include/net/flow_offload.h
>> @@ -391,6 +391,10 @@ struct flow_indr_block_dev {
>> struct flow_block *flow_block;
>> };
>>
>> +typedef void flow_indr_get_default_block_t(struct flow_indr_block_dev *indr_dev);
>> +
>> +void flow_indr_set_default_block_cb(flow_indr_get_default_block_t *cb);
>> +
>> struct flow_indr_block_dev *flow_indr_block_dev_lookup(struct net_device *dev);
>>
>> int __flow_indr_block_cb_register(struct net_device *dev, void *cb_priv,
>> diff --git a/net/core/flow_offload.c b/net/core/flow_offload.c
>> index 9f1ae67..db8469d 100644
>> --- a/net/core/flow_offload.c
>> +++ b/net/core/flow_offload.c
>> @@ -298,6 +298,14 @@ struct flow_indr_block_dev *
>> }
>> EXPORT_SYMBOL(flow_indr_block_dev_lookup);
>>
>> +static flow_indr_get_default_block_t *flow_indr_get_default_block;
> This static variable which can only be set to the TC's callback really
> is not a great API design :/
So any advise? just call the function in tc system with #ifdef NET_CLSXXX?
>
Powered by blists - more mailing lists