net/cxgbe: add API to program hardware layer 2 table
[dpdk.git] / drivers / net / cxgbe / base / t4fw_interface.h
index 19bcfc1..1c08637 100644 (file)
@@ -55,6 +55,7 @@ enum fw_memtype {
 
 enum fw_wr_opcodes {
        FW_FILTER_WR            = 0x02,
+       FW_ULPTX_WR             = 0x04,
        FW_TP_WR                = 0x05,
        FW_ETH_TX_PKT_WR        = 0x08,
        FW_ETH_TX_PKTS_WR       = 0x09,
@@ -78,6 +79,11 @@ struct fw_wr_hdr {
 #define V_FW_WR_OP(x)          ((x) << S_FW_WR_OP)
 #define G_FW_WR_OP(x)          (((x) >> S_FW_WR_OP) & M_FW_WR_OP)
 
+/* atomic flag (hi) - firmware encapsulates CPLs in CPL_BARRIER
+ */
+#define S_FW_WR_ATOMIC         23
+#define V_FW_WR_ATOMIC(x)      ((x) << S_FW_WR_ATOMIC)
+
 /* work request immediate data length (hi)
  */
 #define S_FW_WR_IMMDLEN        0
@@ -659,6 +665,8 @@ enum fw_params_param_pfvf {
        FW_PARAMS_PARAM_PFVF_CLIP_END = 0x04,
        FW_PARAMS_PARAM_PFVF_FILTER_START = 0x05,
        FW_PARAMS_PARAM_PFVF_FILTER_END = 0x06,
+       FW_PARAMS_PARAM_PFVF_L2T_START = 0x13,
+       FW_PARAMS_PARAM_PFVF_L2T_END = 0x14,
        FW_PARAMS_PARAM_PFVF_CPLFW4MSG_ENCAP = 0x31,
        FW_PARAMS_PARAM_PFVF_PORT_CAPS32 = 0x3A
 };
@@ -738,6 +746,12 @@ struct fw_pfvf_cmd {
        __be32 r4;
 };
 
+#define S_FW_PFVF_CMD_PFN              8
+#define V_FW_PFVF_CMD_PFN(x)           ((x) << S_FW_PFVF_CMD_PFN)
+
+#define S_FW_PFVF_CMD_VFN              0
+#define V_FW_PFVF_CMD_VFN(x)           ((x) << S_FW_PFVF_CMD_VFN)
+
 #define S_FW_PFVF_CMD_NIQFLINT          20
 #define M_FW_PFVF_CMD_NIQFLINT          0xfff
 #define G_FW_PFVF_CMD_NIQFLINT(x)       \
@@ -797,6 +811,11 @@ enum fw_iq_type {
        FW_IQ_TYPE_FL_INT_CAP,
 };
 
+enum fw_iq_iqtype {
+       FW_IQ_IQTYPE_NIC = 1,
+       FW_IQ_IQTYPE_OFLD,
+};
+
 struct fw_iq_cmd {
        __be32 op_to_vfn;
        __be32 alloc_to_len16;
@@ -930,6 +949,9 @@ struct fw_iq_cmd {
        (((x) >> S_FW_IQ_CMD_IQFLINTCONGEN) & M_FW_IQ_CMD_IQFLINTCONGEN)
 #define F_FW_IQ_CMD_IQFLINTCONGEN      V_FW_IQ_CMD_IQFLINTCONGEN(1U)
 
+#define S_FW_IQ_CMD_IQTYPE     24
+#define V_FW_IQ_CMD_IQTYPE(x)  ((x) << S_FW_IQ_CMD_IQTYPE)
+
 #define S_FW_IQ_CMD_FL0CNGCHMAP                20
 #define M_FW_IQ_CMD_FL0CNGCHMAP                0xf
 #define V_FW_IQ_CMD_FL0CNGCHMAP(x)     ((x) << S_FW_IQ_CMD_FL0CNGCHMAP)