History

tc: introduce Flower classifier

This patch introduces a flow-based filter. So far, the very essential packet fields are supported. This patch is only the first step. There is a lot of potential performance improvements possible to implement. Also a lot of features are missing now. They will be addressed in follow-up patches.

Jiri Pirko committed 11 years ago

Commit 77b99001 parent 59346af4 files · +729 −0Browse files

Showing the changes to include/uapi (1 of 4 files). Show all

Unified · Split

include/uapi/linux/pkt_cls.h+30−0
@@ -409,6 +409,36 @@ enum { · 408 unmodified lines
409409
410410 #define TCA_BPF_MAX (__TCA_BPF_MAX - 1)
411411
412+/* Flower classifier */
413+
414+enum {
415+ TCA_FLOWER_UNSPEC,
416+ TCA_FLOWER_CLASSID,
417+ TCA_FLOWER_INDEV,
418+ TCA_FLOWER_ACT,
419+ TCA_FLOWER_KEY_ETH_DST, /* ETH_ALEN */
420+ TCA_FLOWER_KEY_ETH_DST_MASK, /* ETH_ALEN */
421+ TCA_FLOWER_KEY_ETH_SRC, /* ETH_ALEN */
422+ TCA_FLOWER_KEY_ETH_SRC_MASK, /* ETH_ALEN */
423+ TCA_FLOWER_KEY_ETH_TYPE, /* be16 */
424+ TCA_FLOWER_KEY_IP_PROTO, /* u8 */
425+ TCA_FLOWER_KEY_IPV4_SRC, /* be32 */
426+ TCA_FLOWER_KEY_IPV4_SRC_MASK, /* be32 */
427+ TCA_FLOWER_KEY_IPV4_DST, /* be32 */
428+ TCA_FLOWER_KEY_IPV4_DST_MASK, /* be32 */
429+ TCA_FLOWER_KEY_IPV6_SRC, /* struct in6_addr */
430+ TCA_FLOWER_KEY_IPV6_SRC_MASK, /* struct in6_addr */
431+ TCA_FLOWER_KEY_IPV6_DST, /* struct in6_addr */
432+ TCA_FLOWER_KEY_IPV6_DST_MASK, /* struct in6_addr */
433+ TCA_FLOWER_KEY_TCP_SRC, /* be16 */
434+ TCA_FLOWER_KEY_TCP_DST, /* be16 */
435+ TCA_FLOWER_KEY_UDP_SRC, /* be16 */
436+ TCA_FLOWER_KEY_UDP_DST, /* be16 */
437+ __TCA_FLOWER_MAX,
438+};
439+
440+#define TCA_FLOWER_MAX (__TCA_FLOWER_MAX - 1)
441+
412442 /* Extended Matches */
413443
414444 struct tcf_ematch_tree_hdr {