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

Subsystems: networking [general], tc subsystem, the rest

STALE1752d REVIEWED: 2 (2M)

1 review trailer (1 from subsystem maintainers).

5 messages, 3 authors, 2021-12-15 · open the first message on its own page

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

From: Simon Horman <hidden>
Date: 2021-12-13 14:47:15

From: Baowen Zheng <redacted>

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 <redacted>
Signed-off-by: Simon Horman <redacted>
Acked-by: Jamal Hadi Salim <jhs@mojatatu.com>
---
 net/sched/cls_api.c | 1 +
 1 file changed, 1 insertion(+)
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)) {
-- 
2.20.1

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

From: patchwork-bot+netdevbpf@kernel.org
Date: 2021-12-14 12:40:17

Hello:

This patch was applied to netdev/net.git (master)
by David S. Miller [off-list ref]:

On Mon, 13 Dec 2021 15:46:04 +0100 you wrote:
From: Baowen Zheng <redacted>

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!
-- 
Deet-doot-dot, I am a bot.
https://korg.docs.kernel.org/patchwork/pwbot.html

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

From: Simon Horman <hidden>
Date: 2021-12-14 14:34:39

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 [off-list ref]:

On Mon, 13 Dec 2021 15:46:04 +0100 you wrote:
quoted
From: Baowen Zheng <redacted>

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/

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

From: Jakub Kicinski <kuba@kernel.org>
Date: 2021-12-14 16:33:58

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.

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

From: Simon Horman <hidden>
Date: 2021-12-15 08:03:32

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:
quoted
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.
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help