diff mbox series

[ovs-dev,V2,1/1] netdev-tc-offloads: Support IPv6 hlimit rewrite

Message ID 20181226073622.24743-1-elibr@mellanox.com
State Accepted
Headers show
Series [ovs-dev,V2,1/1] netdev-tc-offloads: Support IPv6 hlimit rewrite | expand

Commit Message

Eli Britstein Dec. 26, 2018, 7:36 a.m. UTC
Add support for IPv6 hlimit field.

Signed-off-by: Eli Britstein <elibr@mellanox.com>
Reviewed-by: Paul Blakey <paulb@mellanox.com>
---
 lib/netdev-tc-offloads.c | 4 ++++
 lib/tc.c                 | 5 +++++
 lib/tc.h                 | 1 +
 3 files changed, 10 insertions(+)

Comments

Simon Horman Dec. 29, 2018, 12:19 a.m. UTC | #1
On Wed, Dec 26, 2018 at 09:36:22AM +0200, Eli Britstein wrote:
> Add support for IPv6 hlimit field.
> 
> Signed-off-by: Eli Britstein <elibr@mellanox.com>
> Reviewed-by: Paul Blakey <paulb@mellanox.com>

Thanks,

this patch looks good to me. I am verifying that it passes
travic-ci and plan to apply this patch if that passes.

https://travis-ci.org/horms2/ovs/builds/473190223
Simon Horman Dec. 29, 2018, 11:29 p.m. UTC | #2
On Sat, Dec 29, 2018 at 09:19:23AM +0900, Simon Horman wrote:
> On Wed, Dec 26, 2018 at 09:36:22AM +0200, Eli Britstein wrote:
> > Add support for IPv6 hlimit field.
> > 
> > Signed-off-by: Eli Britstein <elibr@mellanox.com>
> > Reviewed-by: Paul Blakey <paulb@mellanox.com>
> 
> Thanks,
> 
> this patch looks good to me. I am verifying that it passes
> travic-ci and plan to apply this patch if that passes.
> 
> https://travis-ci.org/horms2/ovs/builds/473190223

Thanks again, I have applied this patch to master.
diff mbox series

Patch

diff --git a/lib/netdev-tc-offloads.c b/lib/netdev-tc-offloads.c
index 606a4f4db..772b99b31 100644
--- a/lib/netdev-tc-offloads.c
+++ b/lib/netdev-tc-offloads.c
@@ -76,6 +76,10 @@  static struct netlink_field set_flower_map[][3] = {
           offsetof(struct tc_flower_key, ipv6.ipv6_dst),
           MEMBER_SIZEOF(struct tc_flower_key, ipv6.ipv6_dst)
         },
+        { offsetof(struct ovs_key_ipv6, ipv6_hlimit),
+          offsetof(struct tc_flower_key, ipv6.rewrite_hlimit),
+          MEMBER_SIZEOF(struct tc_flower_key, ipv6.rewrite_hlimit)
+        },
     },
     [OVS_KEY_ATTR_ETHERNET] = {
         { offsetof(struct ovs_key_ethernet, eth_src),
diff --git a/lib/tc.c b/lib/tc.c
index 47127ca2c..adba3cd28 100644
--- a/lib/tc.c
+++ b/lib/tc.c
@@ -91,6 +91,11 @@  static struct flower_key_to_pedit flower_pedit_map[] = {
         8,
         offsetof(struct tc_flower_key, ipv4.rewrite_ttl),
         MEMBER_SIZEOF(struct tc_flower_key, ipv4.rewrite_ttl)
+    }, {
+        TCA_PEDIT_KEY_EX_HDR_TYPE_IP6,
+        7,
+        offsetof(struct tc_flower_key, ipv6.rewrite_hlimit),
+        MEMBER_SIZEOF(struct tc_flower_key, ipv6.rewrite_hlimit)
     }, {
         TCA_PEDIT_KEY_EX_HDR_TYPE_IP6,
         8,
diff --git a/lib/tc.h b/lib/tc.h
index fe64fa887..7196a32d7 100644
--- a/lib/tc.h
+++ b/lib/tc.h
@@ -107,6 +107,7 @@  struct tc_flower_key {
     struct {
         struct in6_addr ipv6_src;
         struct in6_addr ipv6_dst;
+        uint8_t rewrite_hlimit;
     } ipv6;
 
     struct {