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>
This commit is contained in:
parent
d33bd757d3
commit
e3acda7ade
4 changed files with 139 additions and 1 deletions
|
|
@ -176,8 +176,10 @@ enum {
|
|||
#define TUNNEL_VXLAN_OPT __cpu_to_be16(0x1000)
|
||||
#define TUNNEL_NOCACHE __cpu_to_be16(0x2000)
|
||||
#define TUNNEL_ERSPAN_OPT __cpu_to_be16(0x4000)
|
||||
#define TUNNEL_GTP_OPT __cpu_to_be16(0x8000)
|
||||
|
||||
#define TUNNEL_OPTIONS_PRESENT \
|
||||
(TUNNEL_GENEVE_OPT | TUNNEL_VXLAN_OPT | TUNNEL_ERSPAN_OPT)
|
||||
(TUNNEL_GENEVE_OPT | TUNNEL_VXLAN_OPT | TUNNEL_ERSPAN_OPT | \
|
||||
TUNNEL_GTP_OPT)
|
||||
|
||||
#endif /* _UAPI_IF_TUNNEL_H_ */
|
||||
|
|
|
|||
|
|
@ -616,6 +616,10 @@ enum {
|
|||
* TCA_FLOWER_KEY_ENC_OPT_ERSPAN_
|
||||
* attributes
|
||||
*/
|
||||
TCA_FLOWER_KEY_ENC_OPTS_GTP, /* Nested
|
||||
* TCA_FLOWER_KEY_ENC_OPT_GTP_
|
||||
* attributes
|
||||
*/
|
||||
__TCA_FLOWER_KEY_ENC_OPTS_MAX,
|
||||
};
|
||||
|
||||
|
|
@ -654,6 +658,17 @@ enum {
|
|||
#define TCA_FLOWER_KEY_ENC_OPT_ERSPAN_MAX \
|
||||
(__TCA_FLOWER_KEY_ENC_OPT_ERSPAN_MAX - 1)
|
||||
|
||||
enum {
|
||||
TCA_FLOWER_KEY_ENC_OPT_GTP_UNSPEC,
|
||||
TCA_FLOWER_KEY_ENC_OPT_GTP_PDU_TYPE, /* u8 */
|
||||
TCA_FLOWER_KEY_ENC_OPT_GTP_QFI, /* u8 */
|
||||
|
||||
__TCA_FLOWER_KEY_ENC_OPT_GTP_MAX,
|
||||
};
|
||||
|
||||
#define TCA_FLOWER_KEY_ENC_OPT_GTP_MAX \
|
||||
(__TCA_FLOWER_KEY_ENC_OPT_GTP_MAX - 1)
|
||||
|
||||
enum {
|
||||
TCA_FLOWER_KEY_MPLS_OPTS_UNSPEC,
|
||||
TCA_FLOWER_KEY_MPLS_OPTS_LSE,
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue