[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20161215145931.GA1807@nanopsycho.orion>
Date: Thu, 15 Dec 2016 15:59:31 +0100
From: Jiri Pirko <jiri@...nulli.us>
To: Simon Horman <simon.horman@...ronome.com>
Cc: Paul Blakey <paulb@...lanox.com>,
"David S. Miller" <davem@...emloft.net>, netdev@...r.kernel.org,
Jiri Pirko <jiri@...lanox.com>,
Or Gerlitz <ogerlitz@...lanox.com>,
Roi Dayan <roid@...lanox.com>,
Shahar Klein <shahark@...lanox.com>,
Hadar Hen Zion <hadarh@...lanox.com>
Subject: Re: [PATCH net 2/2] net/sched: cls_flower: Use masked key when
calling HW offloads
Thu, Dec 15, 2016 at 02:50:44PM CET, simon.horman@...ronome.com wrote:
>Hi Paul,
>
>On Wed, Dec 14, 2016 at 07:00:58PM +0200, Paul Blakey wrote:
>> Zero bits on the mask signify a "don't care" on the corresponding bits
>> in key. Some HWs require those bits on the key to be zero. Since these
>> bits are masked anyway, it's okay to provide the masked key to all
>> drivers.
>>
>> Fixes: 5b33f48842fa ('net/flower: Introduce hardware offload support')
>> Signed-off-by: Paul Blakey <paulb@...lanox.com>
>> Reviewed-by: Roi Dayan <roid@...lanox.com>
>> Acked-by: Jiri Pirko <jiri@...lanox.com>
>
>While I don't have a specific use case in mind that this change would break
>it seems to me that it would be better to handle hardware requirements
>at the driver level.
Even though, makes no sense to pass unmasked key down. Is is only
confusing. This patch fixes it.
>
>> ---
>> net/sched/cls_flower.c | 2 +-
>> 1 file changed, 1 insertion(+), 1 deletion(-)
>>
>> diff --git a/net/sched/cls_flower.c b/net/sched/cls_flower.c
>> index 9758f5a..35ac28d 100644
>> --- a/net/sched/cls_flower.c
>> +++ b/net/sched/cls_flower.c
>> @@ -252,7 +252,7 @@ static int fl_hw_replace_filter(struct tcf_proto *tp,
>> offload.cookie = (unsigned long)f;
>> offload.dissector = dissector;
>> offload.mask = mask;
>> - offload.key = &f->key;
>> + offload.key = &f->mkey;
>> offload.exts = &f->exts;
>>
>> tc->type = TC_SETUP_CLSFLOWER;
>> --
>> 1.8.3.1
>>
Powered by blists - more mailing lists