All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH net-next-internal] net: sched: cls_flower: set correct offload data in fl_reoffload
@ 2018-08-06  8:27 Vlad Buslov
  2018-08-07 19:36 ` David Miller
  0 siblings, 1 reply; 2+ messages in thread
From: Vlad Buslov @ 2018-08-06  8:27 UTC (permalink / raw)
  To: netdev; +Cc: davem, jhs, xiyou.wangcong, jiri, Vlad Buslov

fl_reoffload implementation sets following members of struct
tc_cls_flower_offload incorrectly:
 - masked key instead of mask
 - key instead of masked key

Fix fl_reoffload to provide correct data to offload callback.

Fixes: 31533cba4327 ("net: sched: cls_flower: implement offload tcf_proto_op")
Signed-off-by: Vlad Buslov <vladbu@mellanox.com>
Acked-by: Jiri Pirko <jiri@mellanox.com>
---
 net/sched/cls_flower.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/net/sched/cls_flower.c b/net/sched/cls_flower.c
index e8bd08ba998a..cbf165c33656 100644
--- a/net/sched/cls_flower.c
+++ b/net/sched/cls_flower.c
@@ -1174,8 +1174,8 @@ static int fl_reoffload(struct tcf_proto *tp, bool add, tc_setup_cb_t *cb,
 				TC_CLSFLOWER_REPLACE : TC_CLSFLOWER_DESTROY;
 			cls_flower.cookie = (unsigned long)f;
 			cls_flower.dissector = &mask->dissector;
-			cls_flower.mask = &f->mkey;
-			cls_flower.key = &f->key;
+			cls_flower.mask = &mask->key;
+			cls_flower.key = &f->mkey;
 			cls_flower.exts = &f->exts;
 			cls_flower.classid = f->res.classid;
 
-- 
2.7.5

^ permalink raw reply related	[flat|nested] 2+ messages in thread

* Re: [PATCH net-next-internal] net: sched: cls_flower: set correct offload data in fl_reoffload
  2018-08-06  8:27 [PATCH net-next-internal] net: sched: cls_flower: set correct offload data in fl_reoffload Vlad Buslov
@ 2018-08-07 19:36 ` David Miller
  0 siblings, 0 replies; 2+ messages in thread
From: David Miller @ 2018-08-07 19:36 UTC (permalink / raw)
  To: vladbu; +Cc: netdev, jhs, xiyou.wangcong, jiri

From: Vlad Buslov <vladbu@mellanox.com>
Date: Mon,  6 Aug 2018 11:27:10 +0300

> fl_reoffload implementation sets following members of struct
> tc_cls_flower_offload incorrectly:
>  - masked key instead of mask
>  - key instead of masked key
> 
> Fix fl_reoffload to provide correct data to offload callback.
> 
> Fixes: 31533cba4327 ("net: sched: cls_flower: implement offload tcf_proto_op")
> Signed-off-by: Vlad Buslov <vladbu@mellanox.com>
> Acked-by: Jiri Pirko <jiri@mellanox.com>

Applied.

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2018-08-07 21:52 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-08-06  8:27 [PATCH net-next-internal] net: sched: cls_flower: set correct offload data in fl_reoffload Vlad Buslov
2018-08-07 19:36 ` David Miller

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.