diff mbox series

[ovs-dev,v3,3/3] netdev-offload-dpdk: Enhance the support of tunnel pop action

Message ID 20221007103923.228716-4-simon.horman@corigine.com
State Changes Requested
Headers show
Series add functions about rte_flow to ovs-dpdk | expand

Checks

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

Commit Message

Simon Horman Oct. 7, 2022, 10:39 a.m. UTC
From: Chaoyong He <chaoyong.he@corigine.com>

We should try our best to fill all the fields of 'struct rte_flow_tunnel',
rather than just give PMD what it need for now.

The number and logic of PMD are increase everyday, and they can use any
field in the API I think.

For nfp PMD, to implement the offload of tunnel pop action, use the
value of 'is_ipv6' field of 'struct rte_flow_tunnel' is natural and simple.
Of course it can scan and parse the pattern array to get this information,
but that will increase complex logic.

Fixes: be56e063d028 ("netdev-offload-dpdk: Support tunnel pop action.")
Signed-off-by: Chaoyong He <chaoyong.he@corigine.com>
Reviewed-by: Louis Peens <louis.peens@corigine.com>
Signed-off-by: Simon Horman <simon.horman@corigine.com>
---
 lib/netdev-offload-dpdk.c | 14 ++++++++++----
 1 file changed, 10 insertions(+), 4 deletions(-)

Comments

0-day Robot Oct. 7, 2022, 11:04 a.m. UTC | #1
References:  <20221007103923.228716-4-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>
Lines checked: 55, Warnings: 1, 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 2819ebd1aa69..7c8d2e536f6d 100644
--- a/lib/netdev-offload-dpdk.c
+++ b/lib/netdev-offload-dpdk.c
@@ -1108,12 +1108,18 @@  vport_to_rte_tunnel(struct netdev *vport,
     const struct netdev_tunnel_config *tnl_cfg;
 
     memset(tunnel, 0, sizeof *tunnel);
+
+    tnl_cfg = netdev_get_tunnel_config(vport);
+    if (!tnl_cfg) {
+        return -1;
+    }
+
+    if (!IN6_IS_ADDR_V4MAPPED(&tnl_cfg->ipv6_dst)) {
+        tunnel->is_ipv6 = true;
+    }
+
     if (!strcmp(netdev_get_type(vport), "vxlan")) {
         tunnel->type = RTE_FLOW_ITEM_TYPE_VXLAN;
-        tnl_cfg = netdev_get_tunnel_config(vport);
-        if (!tnl_cfg) {
-            return -1;
-        }
         tunnel->tp_dst = tnl_cfg->dst_port;
         if (!VLOG_DROP_DBG(&rl)) {
             ds_put_format(s_tnl, "flow tunnel create %d type vxlan; ",