Skip to content

Commit

Permalink
ipv6: sr: update the struct ipv6_sr_hdr
Browse files Browse the repository at this point in the history
The IPv6 Segment Routing Header (SRH) format has been updated (revision 6
of the SRH ietf draft). The update includes the following SRH fields:

(1) The "First Segment" field changed to be "Last Entry" which contains
the index, in the Segment List, of the last element of the Segment List.

(2) The 16 bit "reserved" field now is used as a "tag" which tags a packet
as part of a class or group of packets, e.g.,packets sharing the same
set of properties.

This patch updates the struct ipv6_sr_hdr, so it complies with the updated
SRH draft. The 16 bit "reserved" field is changed to be "tag", In addition
a comment is added to the "first_segment" field, showing that it represents
the "Last Entry" field of the SRH.

Signed-off-by: Ahmed Abdelsalam <amsalam20@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
  • Loading branch information
Ahmed Abdelsalam authored and David S. Miller committed Nov 16, 2017
1 parent aefd80e commit 6ab6a0d
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions include/uapi/linux/seg6.h
Original file line number Diff line number Diff line change
Expand Up @@ -26,9 +26,9 @@ struct ipv6_sr_hdr {
__u8 hdrlen;
__u8 type;
__u8 segments_left;
__u8 first_segment;
__u8 first_segment; /* Represents the last_entry field of SRH */
__u8 flags;
__u16 reserved;
__u16 tag;

struct in6_addr segments[0];
};
Expand Down

0 comments on commit 6ab6a0d

Please sign in to comment.