Home
last modified time | relevance | path

Searched refs:ershdr (Results 1 – 4 of 4) sorted by relevance

/linux-6.12.1/include/net/
Derspan.h122 static inline void set_session_id(struct erspan_base_hdr *ershdr, u16 id) in set_session_id() argument
124 ershdr->session_id = id & 0xff; in set_session_id()
125 ershdr->session_id_upper = (id >> 8) & 0x3; in set_session_id()
128 static inline u16 get_session_id(const struct erspan_base_hdr *ershdr) in get_session_id() argument
130 return (ershdr->session_id_upper << 8) + ershdr->session_id; in get_session_id()
133 static inline void set_vlan(struct erspan_base_hdr *ershdr, u16 vlan) in set_vlan() argument
135 ershdr->vlan = vlan & 0xff; in set_vlan()
136 ershdr->vlan_upper = (vlan >> 8) & 0xf; in set_vlan()
139 static inline u16 get_vlan(const struct erspan_base_hdr *ershdr) in get_vlan() argument
141 return (ershdr->vlan_upper << 8) + ershdr->vlan; in get_vlan()
[all …]
/linux-6.12.1/net/ipv4/
Dgre_demux.c133 struct erspan_base_hdr *ershdr; in gre_parse_header() local
135 if (!pskb_may_pull(skb, nhs + hdr_len + sizeof(*ershdr))) in gre_parse_header()
138 ershdr = (struct erspan_base_hdr *)(skb->data + nhs + hdr_len); in gre_parse_header()
139 tpi->key = cpu_to_be32(get_session_id(ershdr)); in gre_parse_header()
Dip_gre.c268 struct erspan_base_hdr *ershdr; in erspan_rcv() local
288 gre_hdr_len + sizeof(*ershdr)))) in erspan_rcv()
291 ershdr = (struct erspan_base_hdr *)(skb->data + gre_hdr_len); in erspan_rcv()
292 ver = ershdr->ver; in erspan_rcv()
336 sizeof(*ershdr)); in erspan_rcv()
/linux-6.12.1/net/ipv6/
Dip6_gre.c525 struct erspan_base_hdr *ershdr; in ip6erspan_rcv() local
531 if (unlikely(!pskb_may_pull(skb, sizeof(*ershdr)))) in ip6erspan_rcv()
535 ershdr = (struct erspan_base_hdr *)skb->data; in ip6erspan_rcv()
536 ver = ershdr->ver; in ip6erspan_rcv()
576 sizeof(*ershdr)); in ip6erspan_rcv()