From: Jakub Kicinski <hidden> Date: 2016-06-06 15:19:07
Hi!
This set fixes two small issues with error codes I noticed
in cls_u32. Second patch could be viewed as user space API
change but that portion of API is not part of any release,
yet.
Compile tested only.
Jakub Kicinski (2):
net: cls_u32: fix error code for invalid flags
net: cls_u32: be more strict about skip-sw flag
net/sched/cls_u32.c | 23 ++++++++++++-----------
1 file changed, 12 insertions(+), 11 deletions(-)
--
1.9.1
From: Jakub Kicinski <hidden> Date: 2016-06-06 15:19:08
'err' variable is not set in this test, we would return whatever
previous test set 'err' to.
Signed-off-by: Jakub Kicinski <redacted>
---
net/sched/cls_u32.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
From: Jakub Kicinski <hidden> Date: 2016-06-06 15:19:09
Return an error if user requested skip-sw and the underlaying
hardware cannot handle tc offloads (or offloads are disabled).
Signed-off-by: Jakub Kicinski <redacted>
---
net/sched/cls_u32.c | 21 +++++++++++----------
1 file changed, 11 insertions(+), 10 deletions(-)
Return an error if user requested skip-sw and the underlaying
hardware cannot handle tc offloads (or offloads are disabled).
Signed-off-by: Jakub Kicinski <redacted>
looks good. I think we need similar checks in u32_replace_hw_knode() too.
From: Jakub Kicinski <hidden> Date: 2016-06-07 10:47:09
Hi!
This set fixes two small issues with error codes I noticed
in cls_u32. Second patch could be viewed as user space API
change but that portion of API is not part of any release,
yet.
Compile tested only.
Jakub Kicinski (2):
net: cls_u32: fix error code for invalid flags
net: cls_u32: be more strict about skip-sw flag
net/sched/cls_u32.c | 60 +++++++++++++++++++++++++++--------------------------
1 file changed, 31 insertions(+), 29 deletions(-)
--
1.9.1
From: Jakub Kicinski <hidden> Date: 2016-06-07 10:47:10
'err' variable is not set in this test, we would return whatever
previous test set 'err' to.
Signed-off-by: Jakub Kicinski <redacted>
Reviewed-by: Dinan Gunawardena <redacted>
Reviewed-by: Simon Horman <redacted>
Acked-by: Sridhar Samudrala <sridhar.samudrala@intel.com>
---
net/sched/cls_u32.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
From: John Fastabend <john.fastabend@gmail.com> Date: 2016-06-07 15:46:29
On 16-06-06 08:16 AM, Jakub Kicinski wrote:
quoted hunk
'err' variable is not set in this test, we would return whatever
previous test set 'err' to.
Signed-off-by: Jakub Kicinski <redacted>
---
net/sched/cls_u32.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
From: John Fastabend <john.fastabend@gmail.com> Date: 2016-06-07 15:47:50
On 16-06-07 03:46 AM, Jakub Kicinski wrote:
quoted hunk
'err' variable is not set in this test, we would return whatever
previous test set 'err' to.
Signed-off-by: Jakub Kicinski <redacted>
Reviewed-by: Dinan Gunawardena <redacted>
Reviewed-by: Simon Horman <redacted>
Acked-by: Sridhar Samudrala <sridhar.samudrala@intel.com>
---
net/sched/cls_u32.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
@@ -457,20 +457,21 @@ static int u32_replace_hw_hnode(struct tcf_proto *tp,structtc_to_netdevoffload;interr;+if(!tc_should_offload(dev,flags))+returntc_skip_sw(flags)?-EINVAL:0;+offload.type=TC_SETUP_CLSU32;offload.cls_u32=&u32_offload;-if(tc_should_offload(dev,flags)){-offload.cls_u32->command=TC_CLSU32_NEW_HNODE;-offload.cls_u32->hnode.divisor=h->divisor;-offload.cls_u32->hnode.handle=h->handle;-offload.cls_u32->hnode.prio=h->prio;+offload.cls_u32->command=TC_CLSU32_NEW_HNODE;+offload.cls_u32->hnode.divisor=h->divisor;+offload.cls_u32->hnode.handle=h->handle;+offload.cls_u32->hnode.prio=h->prio;-err=dev->netdev_ops->ndo_setup_tc(dev,tp->q->handle,-tp->protocol,&offload);-if(tc_skip_sw(flags))-returnerr;-}+err=dev->netdev_ops->ndo_setup_tc(dev,tp->q->handle,+tp->protocol,&offload);+if(tc_skip_sw(flags))+returnerr;return0;}
Looks like we also need to catch the error at u32_replace_hw_hnode call
sites?
u32_replace_hw_hnode(tp, ht, flags);
return 0;
}
should be
return replace_hw_hnode(tp, ht,flags)
Thanks,
John
@@ -457,20 +457,21 @@ static int u32_replace_hw_hnode(struct tcf_proto *tp,structtc_to_netdevoffload;interr;+if(!tc_should_offload(dev,flags))+returntc_skip_sw(flags)?-EINVAL:0;+offload.type=TC_SETUP_CLSU32;offload.cls_u32=&u32_offload;-if(tc_should_offload(dev,flags)){-offload.cls_u32->command=TC_CLSU32_NEW_HNODE;-offload.cls_u32->hnode.divisor=h->divisor;-offload.cls_u32->hnode.handle=h->handle;-offload.cls_u32->hnode.prio=h->prio;+offload.cls_u32->command=TC_CLSU32_NEW_HNODE;+offload.cls_u32->hnode.divisor=h->divisor;+offload.cls_u32->hnode.handle=h->handle;+offload.cls_u32->hnode.prio=h->prio;-err=dev->netdev_ops->ndo_setup_tc(dev,tp->q->handle,-tp->protocol,&offload);-if(tc_skip_sw(flags))-returnerr;-}+err=dev->netdev_ops->ndo_setup_tc(dev,tp->q->handle,+tp->protocol,&offload);+if(tc_skip_sw(flags))+returnerr;return0;}
Looks like we also need to catch the error at u32_replace_hw_hnode call
sites?
u32_replace_hw_hnode(tp, ht, flags);
return 0;
}
should be
return replace_hw_hnode(tp, ht,flags)
Indeed. I'll add a third patch to the series, seems like a separate bug.
From: Jakub Kicinski <hidden> Date: 2016-06-07 22:17:13
Hi!
This set fixes three small issues with error codes I noticed
in cls_u32. Second patch could be viewed as user space API
change but that portion of API is not part of any release,
yet.
Very lightly tested.
Jakub Kicinski (3):
net: cls_u32: fix error code for invalid flags
net: cls_u32: be more strict about skip-sw flag
net: cls_u32: catch all hardware offload errors
net/sched/cls_u32.c | 68 ++++++++++++++++++++++++++++++-----------------------
1 file changed, 38 insertions(+), 30 deletions(-)
--
1.9.1
From: Jakub Kicinski <hidden> Date: 2016-06-07 22:17:14
'err' variable is not set in this test, we would return whatever
previous test set 'err' to.
Signed-off-by: Jakub Kicinski <redacted>
Reviewed-by: Dinan Gunawardena <redacted>
Reviewed-by: Simon Horman <redacted>
Acked-by: Sridhar Samudrala <sridhar.samudrala@intel.com>
Acked-by: John Fastabend <redacted>
---
net/sched/cls_u32.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
Return an error if user requested skip-sw and the underlaying
hardware cannot handle tc offloads (or offloads are disabled).
Signed-off-by: Jakub Kicinski <redacted>
Reviewed-by: Dinan Gunawardena <redacted>
Reviewed-by: Simon Horman <redacted>
---
v2:
- handle both knode and hnodes
---
Errors reported by u32_replace_hw_hnode() were not propagated.
Signed-off-by: Jakub Kicinski <redacted>
Reviewed-by: Dinan Gunawardena <redacted>
---
v3:
- new patch
From: David Miller <davem@davemloft.net> Date: 2016-06-07 23:27:32
From: Jakub Kicinski <redacted>
Date: Mon, 6 Jun 2016 16:16:46 +0100
This set fixes two small issues with error codes I noticed
in cls_u32. Second patch could be viewed as user space API
change but that portion of API is not part of any release,
yet.
Compile tested only.
From: Jakub Kicinski <hidden> Date: 2016-06-08 10:18:35
On Tue, 07 Jun 2016 16:27:31 -0700 (PDT), David Miller wrote:
From: Jakub Kicinski <redacted>
Date: Mon, 6 Jun 2016 16:16:46 +0100
quoted
This set fixes two small issues with error codes I noticed
in cls_u32. Second patch could be viewed as user space API
change but that portion of API is not part of any release,
yet.
Compile tested only.
Applied, thanks.
I think you applied v1 instead of v3 (which is still in patchwork) :S
Should I post an incremental patch to bring the code to v3 state?
From: David Miller <davem@davemloft.net> Date: 2016-06-08 18:09:39
From: Jakub Kicinski <redacted>
Date: Wed, 8 Jun 2016 11:18:30 +0100
On Tue, 07 Jun 2016 16:27:31 -0700 (PDT), David Miller wrote:
quoted
From: Jakub Kicinski <redacted>
Date: Mon, 6 Jun 2016 16:16:46 +0100
quoted
This set fixes two small issues with error codes I noticed
in cls_u32. Second patch could be viewed as user space API
change but that portion of API is not part of any release,
yet.
Compile tested only.
Applied, thanks.
I think you applied v1 instead of v3 (which is still in patchwork) :S
Should I post an incremental patch to bring the code to v3 state?
From: Jakub Kicinski <hidden> Date: 2016-06-08 19:19:01
On Wed, 08 Jun 2016 11:09:36 -0700 (PDT), David Miller wrote:
From: Jakub Kicinski <redacted>
Date: Wed, 8 Jun 2016 11:18:30 +0100
quoted
On Tue, 07 Jun 2016 16:27:31 -0700 (PDT), David Miller wrote:
quoted
From: Jakub Kicinski <redacted>
Date: Mon, 6 Jun 2016 16:16:46 +0100
quoted
This set fixes two small issues with error codes I noticed
in cls_u32. Second patch could be viewed as user space API
change but that portion of API is not part of any release,
yet.
Compile tested only.
Applied, thanks.
I think you applied v1 instead of v3 (which is still in patchwork) :S
Should I post an incremental patch to bring the code to v3 state?