diff mbox series

[ovs-dev,2/5] netdev-offload-dpdk: Support offload of set IPv6 DSCP action

Message ID 20220816125009.508053-3-simon.horman@corigine.com
State Superseded
Headers show
Series netdev-offload-dpdk: update rte_flow phases 1 and 2 | expand

Checks

Context Check Description
ovsrobot/apply-robot warning apply and check: warning
ovsrobot/github-robot-_Build_and_Test success github build: passed

Commit Message

Simon Horman Aug. 16, 2022, 12:50 p.m. UTC
From: Chaoyong He <chaoyong.he@corigine.com>

Add the support of offload of set IPv6 DSCP action.

Signed-off-by: Chaoyong He <chaoyong.he@corigine.com>
Signed-off-by: Simon Horman <simon.horman@corigine.com>
---
 lib/netdev-offload-dpdk.c | 9 +++++++--
 1 file changed, 7 insertions(+), 2 deletions(-)

Comments

0-day Robot Aug. 16, 2022, 1:05 p.m. UTC | #1
References:  <20220816125009.508053-3-simon.horman@corigine.com>
 

Bleep bloop.  Greetings Simon Horman, I am a robot and I have tried out your patch.
Thanks for your contribution.

I encountered some error that I wasn't expecting.  See the details below.


checkpatch:
WARNING: Unexpected sign-offs from developers who are not authors or co-authors or committers: Simon Horman <simon.horman@corigine.com>
WARNING: Line is 81 characters long (recommended limit is 79)
#51 FILE: lib/netdev-offload-dpdk.c:1934:
            add_set_flow_action(ipv6_tclass, RTE_FLOW_ACTION_TYPE_SET_IPV6_DSCP);

Lines checked: 58, Warnings: 2, Errors: 0


Please check this out.  If you feel there has been an error, please email aconole@redhat.com

Thanks,
0-day Robot
diff mbox series

Patch

diff --git a/lib/netdev-offload-dpdk.c b/lib/netdev-offload-dpdk.c
index 732ce6021722..28017091f680 100644
--- a/lib/netdev-offload-dpdk.c
+++ b/lib/netdev-offload-dpdk.c
@@ -770,7 +770,8 @@  dump_flow_action(struct ds *s, struct ds *s_extra,
                           IP_ARGS(set_ipv4->ipv4_addr));
         }
         ds_put_cstr(s, "/ ");
-    } else if (actions->type == RTE_FLOW_ACTION_TYPE_SET_IPV4_DSCP) {
+    } else if (actions->type == RTE_FLOW_ACTION_TYPE_SET_IPV4_DSCP ||
+               actions->type == RTE_FLOW_ACTION_TYPE_SET_IPV6_DSCP) {
         const struct rte_flow_action_set_dscp *set_dscp = actions->conf;
 
         ds_put_cstr(s, "set_dscp ");
@@ -1866,6 +1867,8 @@  BUILD_ASSERT_DECL(sizeof(struct rte_flow_action_set_ipv6) ==
                   MEMBER_SIZEOF(struct ovs_key_ipv6, ipv6_src));
 BUILD_ASSERT_DECL(sizeof(struct rte_flow_action_set_ipv6) ==
                   MEMBER_SIZEOF(struct ovs_key_ipv6, ipv6_dst));
+BUILD_ASSERT_DECL(sizeof(struct rte_flow_action_set_dscp) ==
+                  MEMBER_SIZEOF(struct ovs_key_ipv6, ipv6_tclass));
 BUILD_ASSERT_DECL(sizeof(struct rte_flow_action_set_ttl) ==
                   MEMBER_SIZEOF(struct ovs_key_ipv6, ipv6_hlimit));
 BUILD_ASSERT_DECL(sizeof(struct rte_flow_action_set_tp) ==
@@ -1888,7 +1891,8 @@  parse_set_actions(struct flow_actions *actions,
     bool dscp_flag = false;
 
 #define add_set_flow_action(field, type)                                      \
-    if (type == RTE_FLOW_ACTION_TYPE_SET_IPV4_DSCP)                           \
+    if ((type == RTE_FLOW_ACTION_TYPE_SET_IPV4_DSCP) ||                       \
+            (type == RTE_FLOW_ACTION_TYPE_SET_IPV6_DSCP))                     \
         dscp_flag = true;                                                     \
     if (add_set_flow_action__(actions, &key->field,                           \
                               mask ? CONST_CAST(void *, &mask->field) : NULL, \
@@ -1927,6 +1931,7 @@  parse_set_actions(struct flow_actions *actions,
 
             add_set_flow_action(ipv6_src, RTE_FLOW_ACTION_TYPE_SET_IPV6_SRC);
             add_set_flow_action(ipv6_dst, RTE_FLOW_ACTION_TYPE_SET_IPV6_DST);
+            add_set_flow_action(ipv6_tclass, RTE_FLOW_ACTION_TYPE_SET_IPV6_DSCP);
             add_set_flow_action(ipv6_hlimit, RTE_FLOW_ACTION_TYPE_SET_TTL);
 
             if (mask && !is_all_zeros(mask, sizeof *mask)) {