nfp: flower: add support to offload QinQ match
[linux-2.6-microblaze.git] / drivers / net / ethernet / netronome / nfp / flower / cmsg.h
index bf51628..a2926b1 100644 (file)
@@ -24,6 +24,7 @@
 #define NFP_FLOWER_LAYER_VXLAN         BIT(7)
 
 #define NFP_FLOWER_LAYER2_GRE          BIT(0)
+#define NFP_FLOWER_LAYER2_QINQ         BIT(4)
 #define NFP_FLOWER_LAYER2_GENEVE       BIT(5)
 #define NFP_FLOWER_LAYER2_GENEVE_OP    BIT(6)
 #define NFP_FLOWER_LAYER2_TUN_IPV6     BIT(7)
@@ -319,6 +320,22 @@ struct nfp_flower_mac_mpls {
        __be32 mpls_lse;
 };
 
+/* VLAN details (2W/8B)
+ *    3                   2                   1
+ *  1 0 9 8 7 6 5 4 3 2 1 0 9 8 7 6 5 4 3 2 1 0 9 8 7 6 5 4 3 2 1 0
+ * +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
+ * |           outer_tpid          |           outer_tci           |
+ * +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
+ * |           inner_tpid          |           inner_tci           |
+ * +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
+ */
+struct nfp_flower_vlan {
+       __be16 outer_tpid;
+       __be16 outer_tci;
+       __be16 inner_tpid;
+       __be16 inner_tci;
+};
+
 /* L4 ports (for UDP, TCP, SCTP) (1W/4B)
  *    3                   2                   1
  *  1 0 9 8 7 6 5 4 3 2 1 0 9 8 7 6 5 4 3 2 1 0 9 8 7 6 5 4 3 2 1 0