diff mbox series

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

Message ID 20221109195439.142438-1-simon.horman@corigine.com
State Accepted
Commit bb9fedb79af8df5f14922ae588866314a0e31bf5
Headers show
Series [ovs-dev,v4] netdev-offload-dpdk: Enhance the support of tunnel pop action | 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 Nov. 9, 2022, 7:54 p.m. UTC
From: Chaoyong He <chaoyong.he@corigine.com>

Populate the 'is_ipv6' field of 'struct rte_flow_tunnel', which can
be used in the implementation of tunnel pop action for DPDK PMD.

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(-)

v4
* Reworked changelog
* Dropped other patches from patchset

v3
* Add fixes tag

v2
* No change

Comments

0-day Robot Nov. 9, 2022, 8:19 p.m. UTC | #1
References:  <20221109195439.142438-1-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: 47, 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
Eli Britstein Nov. 10, 2022, 10:03 a.m. UTC | #2
Acked-by: Eli Britstein <elibr@nvidia.com>

>-----Original Message-----
>From: Simon Horman <simon.horman@corigine.com>
>Sent: Wednesday, 9 November 2022 21:55
>To: dev@openvswitch.org
>Cc: Eelco Chaudron <echaudro@redhat.com>; Ilya Maximets
><i.maximets@ovn.org>; Eli Britstein <elibr@nvidia.com>; Chaoyong He
><chaoyong.he@corigine.com>; oss-drivers@corigine.com; Louis Peens
><louis.peens@corigine.com>; Simon Horman <simon.horman@corigine.com>
>Subject: [PATCH v4] netdev-offload-dpdk: Enhance the support of tunnel pop
>action
>
>External email: Use caution opening links or attachments
>
>
>From: Chaoyong He <chaoyong.he@corigine.com>
>
>Populate the 'is_ipv6' field of 'struct rte_flow_tunnel', which can be used in
>the implementation of tunnel pop action for DPDK PMD.
>
>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(-)
>
>v4
>* Reworked changelog
>* Dropped other patches from patchset
>
>v3
>* Add fixes tag
>
>v2
>* No change
>
>diff --git a/lib/netdev-offload-dpdk.c b/lib/netdev-offload-dpdk.c index
>80a64a6cc06a..38f00fd309e6 100644
>--- a/lib/netdev-offload-dpdk.c
>+++ b/lib/netdev-offload-dpdk.c
>@@ -1099,12 +1099,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; ",
>--
>2.30.2
Simon Horman Nov. 10, 2022, 4:06 p.m. UTC | #3
On Thu, Nov 10, 2022 at 10:03:11AM +0000, Eli Britstein wrote:
> [Some people who received this message don't often get email from elibr@nvidia.com. Learn why this is important at https://aka.ms/LearnAboutSenderIdentification ]
> 
> Acked-by: Eli Britstein <elibr@nvidia.com>

Thanks, applied:

* bb9fedb79af8 ("netdev-offload-dpdk: Enhance the support of tunnel pop action")
  https://github.com/openvswitch/ovs/commit/bb9fedb79af8

Backport to branch-3.0:

* c9c602b6f332 ("netdev-offload-dpdk: Enhance the support of tunnel pop action")
  https://github.com/openvswitch/ovs/commit/c9c602b6f332

Backport to branch-2.17:

* ee0e1d0a5181 ("netdev-offload-dpdk: Enhance the support of tunnel pop action")
  https://github.com/openvswitch/ovs/commit/ee0e1d0a5181

Backport to branch-2.16:

* 5488747abb71 ("netdev-offload-dpdk: Enhance the support of tunnel pop action")
  https://github.com/openvswitch/ovs/commit/5488747abb71
diff mbox series

Patch

diff --git a/lib/netdev-offload-dpdk.c b/lib/netdev-offload-dpdk.c
index 80a64a6cc06a..38f00fd309e6 100644
--- a/lib/netdev-offload-dpdk.c
+++ b/lib/netdev-offload-dpdk.c
@@ -1099,12 +1099,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; ",