Lines Matching full:nsh

21  * going forward with future NSH specification updates.  It MUST be set
22 * to 0x0 by the sender, in this first revision of NSH. Given the
53 * involved in forwarding an NSH packet MUST decrement the TTL value by
54 * 1 prior to NSH forwarding lookup. Decrementing by 1 from an incoming
61 * other NSH supporting elements. Elements which do not understand the
65 * Length: The total length, in 4-byte words, of NSH including the Base
69 * 0x2. The length of the NSH header MUST be an integer multiple of 4
73 * MD Type: Indicates the format of NSH beyond the mandatory Base Header
94 * NSH does not alter the inner payload, and the semantics on the inner
95 * protocol remain unchanged due to NSH service function chaining.
103 * 0x4: NSH
127 * NSH. The initial Classifier MUST send the packet to the first SFF in
190 * [0] https://datatracker.ietf.org/doc/draft-ietf-sfc-nsh/
194 * struct nsh_md1_ctx - Keeps track of NSH context data
195 * @context: NSH Contexts.
219 /* Masking NSH header fields. */
243 /* NSH Base Header Length */
246 /* NSH MD Type 1 header Length. */
249 /* NSH header maximum Length. */
252 /* NSH context headers maximum Length. */
260 static inline u16 nsh_hdr_len(const struct nshhdr *nsh) in nsh_hdr_len() argument
262 return ((ntohs(nsh->ver_flags_ttl_len) & NSH_LEN_MASK) in nsh_hdr_len()
266 static inline u8 nsh_get_ver(const struct nshhdr *nsh) in nsh_get_ver() argument
268 return (ntohs(nsh->ver_flags_ttl_len) & NSH_VER_MASK) in nsh_get_ver()
272 static inline u8 nsh_get_flags(const struct nshhdr *nsh) in nsh_get_flags() argument
274 return (ntohs(nsh->ver_flags_ttl_len) & NSH_FLAGS_MASK) in nsh_get_flags()
278 static inline u8 nsh_get_ttl(const struct nshhdr *nsh) in nsh_get_ttl() argument
280 return (ntohs(nsh->ver_flags_ttl_len) & NSH_TTL_MASK) in nsh_get_ttl()
284 static inline void __nsh_set_xflag(struct nshhdr *nsh, u16 xflag, u16 xmask) in __nsh_set_xflag() argument
286 nsh->ver_flags_ttl_len in __nsh_set_xflag()
287 = (nsh->ver_flags_ttl_len & ~htons(xmask)) | htons(xflag); in __nsh_set_xflag()
290 static inline void nsh_set_flags_and_ttl(struct nshhdr *nsh, u8 flags, u8 ttl) in nsh_set_flags_and_ttl() argument
292 __nsh_set_xflag(nsh, ((flags << NSH_FLAGS_SHIFT) & NSH_FLAGS_MASK) | in nsh_set_flags_and_ttl()
297 static inline void nsh_set_flags_ttl_len(struct nshhdr *nsh, u8 flags, in nsh_set_flags_ttl_len() argument
301 __nsh_set_xflag(nsh, ((flags << NSH_FLAGS_SHIFT) & NSH_FLAGS_MASK) | in nsh_set_flags_ttl_len()