diff mbox series

[ovs-dev,3/5] netdev-offload-dpdk: Add support of IPv6 tunnel

Message ID 20220816125009.508053-4-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 support of IPv6 tunnel.

Signed-off-by: Chaoyong He <chaoyong.he@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 Aug. 16, 2022, 1:07 p.m. UTC | #1
References:  <20220816125009.508053-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: 44, 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 Aug. 19, 2022, 12:10 p.m. UTC | #2
On 8/16/2022 3:50 PM, Simon Horman wrote:
> From: Chaoyong He <chaoyong.he@corigine.com>
>
> Add support of IPv6 tunnel.
IPv6 tunnel is already supported. The missing setting of is_ipv6 field 
affects only if using a dpdk PMD that would return restore info flags 
with RTE_FLOW_RESTORE_INFO_TUNNEL on, but 
RTE_FLOW_RESTORE_INFO_ENCAPSULATED off (AFAIK there isn't such PMD).

Please have a more descriptive/correct commit message.


Also:

Fixes: be56e063d028 ("netdev-offload-dpdk: Support tunnel pop action.")
>
> Signed-off-by: Chaoyong He <chaoyong.he@corigine.com>
> Signed-off-by: Simon Horman <simon.horman@corigine.com>
> ---
>   lib/netdev-offload-dpdk.c | 14 ++++++++++----
>   1 file changed, 10 insertions(+), 4 deletions(-)
>
> diff --git a/lib/netdev-offload-dpdk.c b/lib/netdev-offload-dpdk.c
> index 28017091f680..d1c5f978da88 100644
> --- a/lib/netdev-offload-dpdk.c
> +++ b/lib/netdev-offload-dpdk.c
> @@ -1107,12 +1107,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; ",
diff mbox series

Patch

diff --git a/lib/netdev-offload-dpdk.c b/lib/netdev-offload-dpdk.c
index 28017091f680..d1c5f978da88 100644
--- a/lib/netdev-offload-dpdk.c
+++ b/lib/netdev-offload-dpdk.c
@@ -1107,12 +1107,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; ",