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
Showing the changes to include/uapi (2 of 4 files). Show all
Unified · Split
| @@ -176,8 +176,10 @@ enum { · 175 unmodified lines | ||
| 176 | 176 | #define TUNNEL_VXLAN_OPT __cpu_to_be16(0x1000) |
| 177 | 177 | #define TUNNEL_NOCACHE __cpu_to_be16(0x2000) |
| 178 | 178 | #define TUNNEL_ERSPAN_OPT __cpu_to_be16(0x4000) |
| 179 | +#define TUNNEL_GTP_OPT __cpu_to_be16(0x8000) | |
| 179 | 180 | |
| 180 | 181 | #define TUNNEL_OPTIONS_PRESENT \ |
| 181 | − (TUNNEL_GENEVE_OPT | TUNNEL_VXLAN_OPT | TUNNEL_ERSPAN_OPT) | |
| 182 | + (TUNNEL_GENEVE_OPT | TUNNEL_VXLAN_OPT | TUNNEL_ERSPAN_OPT | \ | |
| 183 | + TUNNEL_GTP_OPT) | |
| 182 | 184 | |
| 183 | 185 | #endif /* _UAPI_IF_TUNNEL_H_ */ |
| @@ -616,6 +616,10 @@ enum { · 615 unmodified lines | ||
| 616 | 616 | * TCA_FLOWER_KEY_ENC_OPT_ERSPAN_ |
| 617 | 617 | * attributes |
| 618 | 618 | */ |
| 619 | + TCA_FLOWER_KEY_ENC_OPTS_GTP, /* Nested | |
| 620 | + * TCA_FLOWER_KEY_ENC_OPT_GTP_ | |
| 621 | + * attributes | |
| 622 | + */ | |
| 619 | 623 | __TCA_FLOWER_KEY_ENC_OPTS_MAX, |
| 620 | 624 | }; |
| 621 | 625 | |
| @@ -654,6 +658,17 @@ enum { · 32 unmodified lines | ||
| 654 | 658 | #define TCA_FLOWER_KEY_ENC_OPT_ERSPAN_MAX \ |
| 655 | 659 | (__TCA_FLOWER_KEY_ENC_OPT_ERSPAN_MAX - 1) |
| 656 | 660 | |
| 661 | +enum { | |
| 662 | + TCA_FLOWER_KEY_ENC_OPT_GTP_UNSPEC, | |
| 663 | + TCA_FLOWER_KEY_ENC_OPT_GTP_PDU_TYPE, /* u8 */ | |
| 664 | + TCA_FLOWER_KEY_ENC_OPT_GTP_QFI, /* u8 */ | |
| 665 | + | |
| 666 | + __TCA_FLOWER_KEY_ENC_OPT_GTP_MAX, | |
| 667 | +}; | |
| 668 | + | |
| 669 | +#define TCA_FLOWER_KEY_ENC_OPT_GTP_MAX \ | |
| 670 | + (__TCA_FLOWER_KEY_ENC_OPT_GTP_MAX - 1) | |
| 671 | + | |
| 657 | 672 | enum { |
| 658 | 673 | TCA_FLOWER_KEY_MPLS_OPTS_UNSPEC, |
| 659 | 674 | TCA_FLOWER_KEY_MPLS_OPTS_LSE, |