i40e/base: fix coding style
[dpdk.git] / drivers / net / i40e / base / i40e_dcb.h
index 841cfc3..3b709ef 100644 (file)
@@ -54,6 +54,15 @@ POSSIBILITY OF SUCH DAMAGE.
 #define I40E_IEEE_SUBTYPE_PFC_CFG      11
 #define I40E_IEEE_SUBTYPE_APP_PRI      12
 
+#define I40E_CEE_DCBX_OUI              0x001b21
+#define I40E_CEE_DCBX_TYPE             2
+
+#define I40E_CEE_SUBTYPE_CTRL          1
+#define I40E_CEE_SUBTYPE_PG_CFG                2
+#define I40E_CEE_SUBTYPE_PFC_CFG       3
+#define I40E_CEE_SUBTYPE_APP_PRI       4
+
+#define I40E_CEE_MAX_FEAT_TYPE         3
 #define I40E_LLDP_ADMINSTATUS_DISABLED         0
 #define I40E_LLDP_ADMINSTATUS_ENABLED_RX       1
 #define I40E_LLDP_ADMINSTATUS_ENABLED_TX       2
@@ -136,6 +145,36 @@ struct i40e_lldp_org_tlv {
        __be32 ouisubtype;
        u8 tlvinfo[1];
 };
+
+struct i40e_cee_tlv_hdr {
+       __be16 typelen;
+       u8 operver;
+       u8 maxver;
+};
+
+struct i40e_cee_ctrl_tlv {
+       struct i40e_cee_tlv_hdr hdr;
+       __be32 seqno;
+       __be32 ackno;
+};
+
+struct i40e_cee_feat_tlv {
+       struct i40e_cee_tlv_hdr hdr;
+       u8 en_will_err; /* Bits: |En|Will|Err|Reserved(5)| */
+#define I40E_CEE_FEAT_TLV_ENABLE_MASK  0x80
+#define I40E_CEE_FEAT_TLV_WILLING_MASK 0x40
+#define I40E_CEE_FEAT_TLV_ERR_MASK     0x20
+       u8 subtype;
+       u8 tlvinfo[1];
+};
+
+struct i40e_cee_app_prio {
+       __be16 protocol;
+       u8 upper_oui_sel; /* Bits: |Upper OUI(6)|Selector(2)| */
+#define I40E_CEE_APP_SELECTOR_MASK     0x03
+       __be16 lower_oui;
+       u8 prio_map;
+};
 #pragma pack()
 
 /*
@@ -177,5 +216,8 @@ enum i40e_status_code i40e_aq_get_dcb_config(struct i40e_hw *hw, u8 mib_type,
                                             struct i40e_dcbx_config *dcbcfg);
 enum i40e_status_code i40e_get_dcb_config(struct i40e_hw *hw);
 enum i40e_status_code i40e_init_dcb(struct i40e_hw *hw);
+enum i40e_status_code i40e_set_dcb_config(struct i40e_hw *hw);
+enum i40e_status_code i40e_dcb_config_to_lldp(u8 *lldpmib, u16 *miblen,
+                                             struct i40e_dcbx_config *dcbcfg);
 
 #endif /* _I40E_DCB_H_ */