Thread (42 messages) 42 messages, 6 authors, 2021-12-17

[PATCH v6 net-next 04/12] flow_offload: return EOPNOTSUPP for the unsupported mpls action type

flat view
STALE1778d SUPERSEDED

From: Simon Horman <hidden>
Date: 2021-12-09 09:28:43
Subsystem: networking [general], tc subsystem, the rest · Maintainers: "David S. Miller", Eric Dumazet, Jakub Kicinski, Paolo Abeni, Jamal Hadi Salim, Jiri Pirko, Linus Torvalds

Status: Superseded by v8 (posted 2021-12-17). [go to v8]

Revision v6 (7 revisions archived).

Revisions (7)
  1. v2
  2. v3 [diff against previous]
  3. v4 [diff against previous]
  4. v5 [diff against previous]
  5. v6 current [diff against previous]
  6. v7 [diff against previous]
  7. v8 [diff against previous]
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.

Signed-off-by: Baowen Zheng <redacted>
Signed-off-by: Simon Horman <redacted>
---
 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 d9d6ff0bf361..7a680cae0bae 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
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help