diff mbox series

[RFC,v2,1/5] seg6: Fix TLV definitions

Message ID 1559933708-13947-2-git-send-email-tom@quantonium.net
State RFC
Delegated to: David Miller
Headers show
Series seg6: Segment routing fixes | expand

Commit Message

Tom Herbert June 7, 2019, 6:55 p.m. UTC
The definitions of TLVs in uapi/linux/seg6.h are out of date and
incomplete. Fix this.

TLV constants are defined for PAD1, PADN, and HMAC (the three defined in
draft-ietf-6man-segment-routing-header-19). The other TLV are unused and
and are marked as obsoleted.

Signed-off-by: Tom Herbert <tom@quantonium.net>
---
 include/uapi/linux/seg6.h | 11 +++++++----
 1 file changed, 7 insertions(+), 4 deletions(-)

Comments

David Lebrun June 8, 2019, 9:50 a.m. UTC | #1
On 07/06/2019 19:55, Tom Herbert wrote:
> -#define SR6_TLV_PADDING		4

 From a uapi perspective, should we rather keep the definition and mark 
it as obsoleted as for the rest of the TLV types ?

Note that I'm fine with both.
Tom Herbert June 8, 2019, 3:03 p.m. UTC | #2
On Sat, Jun 8, 2019 at 2:50 AM David Lebrun <dav.lebrun@gmail.com> wrote:
>
> On 07/06/2019 19:55, Tom Herbert wrote:
> > -#define SR6_TLV_PADDING              4
>
>  From a uapi perspective, should we rather keep the definition and mark
> it as obsoleted as for the rest of the TLV types ?
>
Yes, that is an omission.

> Note that I'm fine with both.
diff mbox series

Patch

diff --git a/include/uapi/linux/seg6.h b/include/uapi/linux/seg6.h
index 286e8d6..3a7d324 100644
--- a/include/uapi/linux/seg6.h
+++ b/include/uapi/linux/seg6.h
@@ -38,10 +38,13 @@  struct ipv6_sr_hdr {
 #define SR6_FLAG1_ALERT		(1 << 4)
 #define SR6_FLAG1_HMAC		(1 << 3)
 
-#define SR6_TLV_INGRESS		1
-#define SR6_TLV_EGRESS		2
-#define SR6_TLV_OPAQUE		3
-#define SR6_TLV_PADDING		4
+
+#define SR6_TLV_INGRESS		1	/* obsoleted */
+#define SR6_TLV_EGRESS		2	/* obsoleted */
+#define SR6_TLV_OPAQUE		3	/* obsoleted */
+
+#define SR6_TLV_PAD1		0
+#define SR6_TLV_PADN		1
 #define SR6_TLV_HMAC		5
 
 #define sr_has_hmac(srh) ((srh)->flags & SR6_FLAG1_HMAC)