summaryrefslogtreecommitdiff
path: root/include/net/gtp.h
diff options
context:
space:
mode:
authorWojciech Drewek <wojciech.drewek@intel.com>2022-03-04 17:40:45 +0100
committerTony Nguyen <anthony.l.nguyen@intel.com>2022-03-11 08:28:27 -0800
commite3acda7ade0a36c5cbebc2b54d30b7f08a4ba29b (patch)
tree5594653411b5cd18f68525d89d3043b56839a312 /include/net/gtp.h
parentd33bd757d362699cfce3c68b53cd12b947d196f4 (diff)
net/sched: Allow flower to match on GTP options
Options are as follows: PDU_TYPE:QFI and they refernce to the fields from the PDU Session Protocol. PDU Session data is conveyed in GTP-U Extension Header. GTP-U Extension Header is described in 3GPP TS 29.281. PDU Session Protocol is described in 3GPP TS 38.415. PDU_TYPE - indicates the type of the PDU Session Information (4 bits) QFI - QoS Flow Identifier (6 bits) # ip link add gtp_dev type gtp role sgsn # tc qdisc add dev gtp_dev ingress # tc filter add dev gtp_dev protocol ip parent ffff: \ flower \ enc_key_id 11 \ gtp_opts 1:8/ff:ff \ action mirred egress redirect dev eth0 Signed-off-by: Wojciech Drewek <wojciech.drewek@intel.com> Signed-off-by: Tony Nguyen <anthony.l.nguyen@intel.com>
Diffstat (limited to 'include/net/gtp.h')
-rw-r--r--include/net/gtp.h5
1 files changed, 5 insertions, 0 deletions
diff --git a/include/net/gtp.h b/include/net/gtp.h
index 0e12c37f2958..23c2aaae8a42 100644
--- a/include/net/gtp.h
+++ b/include/net/gtp.h
@@ -58,6 +58,11 @@ struct gtp1u_packet {
struct gtp_ie ie;
} __packed;
+struct gtp_pdu_session_info { /* According to 3GPP TS 38.415. */
+ u8 pdu_type;
+ u8 qfi;
+};
+
#define GTP1_F_NPDU 0x01
#define GTP1_F_SEQ 0x02
#define GTP1_F_EXTHDR 0x04