diff mbox series

[net] flow_offload: return EOPNOTSUPP for the unsupported mpls action type

Message ID 20211213144604.23888-1-simon.horman@corigine.com (mailing list archive)
State Accepted
Commit 166b6a46b78bf8b9559a6620c3032f9fe492e082
Delegated to: Netdev Maintainers
Headers show
Series [net] flow_offload: return EOPNOTSUPP for the unsupported mpls action type | expand

Checks

Context Check Description
netdev/tree_selection success Clearly marked for net
netdev/fixes_present success Fixes tag present in non-next series
netdev/subject_prefix success Link
netdev/cover_letter success Single patches do not need cover letters
netdev/patch_count success Link
netdev/header_inline success No static functions without inline keyword in header files
netdev/build_32bit success Errors and warnings before: 9 this patch: 9
netdev/cc_maintainers fail 1 blamed authors not CCed: vladbu@mellanox.com; 1 maintainers not CCed: vladbu@mellanox.com
netdev/build_clang success Errors and warnings before: 20 this patch: 20
netdev/module_param success Was 0 now: 0
netdev/verify_signedoff success Signed-off-by tag matches author and committer
netdev/verify_fixes success Fixes tag looks correct
netdev/build_allmodconfig_warn success Errors and warnings before: 11 this patch: 11
netdev/checkpatch success total: 0 errors, 0 warnings, 0 checks, 7 lines checked
netdev/kdoc success Errors and warnings before: 0 this patch: 0
netdev/source_inline success Was 0 now: 0

Commit Message

Simon Horman Dec. 13, 2021, 2:46 p.m. UTC
From: Baowen Zheng <baowen.zheng@corigine.com>

We need to return EOPNOTSUPP for the unsupported mpls action type when
setup the flow action.

In the original implement, we will return 0 for the unsupported mpls
action type, actually we do not setup it and the following actions
to the flow action entry.

Fixes: 9838b20a7fb2 ("net: sched: take rtnl lock in tc_setup_flow_action()")
Signed-off-by: Baowen Zheng <baowen.zheng@corigine.com>
Signed-off-by: Simon Horman <simon.horman@corigine.com>
Acked-by: Jamal Hadi Salim <jhs@mojatatu.com>
---
 net/sched/cls_api.c | 1 +
 1 file changed, 1 insertion(+)

Comments

patchwork-bot+netdevbpf@kernel.org Dec. 14, 2021, 12:40 p.m. UTC | #1
Hello:

This patch was applied to netdev/net.git (master)
by David S. Miller <davem@davemloft.net>:

On Mon, 13 Dec 2021 15:46:04 +0100 you wrote:
> From: Baowen Zheng <baowen.zheng@corigine.com>
> 
> We need to return EOPNOTSUPP for the unsupported mpls action type when
> setup the flow action.
> 
> In the original implement, we will return 0 for the unsupported mpls
> action type, actually we do not setup it and the following actions
> to the flow action entry.
> 
> [...]

Here is the summary with links:
  - [net] flow_offload: return EOPNOTSUPP for the unsupported mpls action type
    https://git.kernel.org/netdev/net/c/166b6a46b78b

You are awesome, thank you!
Simon Horman Dec. 14, 2021, 2:34 p.m. UTC | #2
On Tue, Dec 14, 2021 at 12:40:10PM +0000, patchwork-bot+netdevbpf@kernel.org wrote:
> Hello:
> 
> This patch was applied to netdev/net.git (master)
> by David S. Miller <davem@davemloft.net>:
> 
> On Mon, 13 Dec 2021 15:46:04 +0100 you wrote:
> > From: Baowen Zheng <baowen.zheng@corigine.com>
> > 
> > We need to return EOPNOTSUPP for the unsupported mpls action type when
> > setup the flow action.
> > 
> > In the original implement, we will return 0 for the unsupported mpls
> > action type, actually we do not setup it and the following actions
> > to the flow action entry.
> > 
> > [...]
> 
> Here is the summary with links:
>   - [net] flow_offload: return EOPNOTSUPP for the unsupported mpls action type
>     https://git.kernel.org/netdev/net/c/166b6a46b78b

Thanks!

Could I ask for a merge of net into net-next?

The patch above will be a dependency for v7 of our metering offload
patchset.

Ref: 
- [PATCH v6 net-next 00/12] allow user to offload tc action to net device
  https://lore.kernel.org/netdev/20211209092806.12336-1-simon.horman@corigine.com/
Jakub Kicinski Dec. 14, 2021, 4:33 p.m. UTC | #3
On Tue, 14 Dec 2021 15:34:29 +0100 Simon Horman wrote:
> Could I ask for a merge of net into net-next?
> 
> The patch above will be a dependency for v7 of our metering offload
> patchset.
> 
> Ref: 
> - [PATCH v6 net-next 00/12] allow user to offload tc action to net device
>   https://lore.kernel.org/netdev/20211209092806.12336-1-simon.horman@corigine.com/

Can it wait until Thu? We send PRs and merge every Thu these days.
Simon Horman Dec. 15, 2021, 8:03 a.m. UTC | #4
On Tue, Dec 14, 2021 at 08:33:55AM -0800, Jakub Kicinski wrote:
> On Tue, 14 Dec 2021 15:34:29 +0100 Simon Horman wrote:
> > Could I ask for a merge of net into net-next?
> > 
> > The patch above will be a dependency for v7 of our metering offload
> > patchset.
> > 
> > Ref: 
> > - [PATCH v6 net-next 00/12] allow user to offload tc action to net device
> >   https://lore.kernel.org/netdev/20211209092806.12336-1-simon.horman@corigine.com/
> 
> Can it wait until Thu? We send PRs and merge every Thu these days.

Sure, no problem.
diff mbox series

Patch

diff --git a/net/sched/cls_api.c b/net/sched/cls_api.c
index 2ef8f5a6205a..e54f0a42270c 100644
--- a/net/sched/cls_api.c
+++ b/net/sched/cls_api.c
@@ -3687,6 +3687,7 @@  int tc_setup_flow_action(struct flow_action *flow_action,
 				entry->mpls_mangle.ttl = tcf_mpls_ttl(act);
 				break;
 			default:
+				err = -EOPNOTSUPP;
 				goto err_out_locked;
 			}
 		} else if (is_tcf_skbedit_ptype(act)) {