crypto/dpaa_sec: support authonly and chain with raw API
[dpdk.git] / drivers / net / ice / base / ice_dcb.h
index 4712709..24c8da2 100644 (file)
@@ -1,11 +1,12 @@
 /* SPDX-License-Identifier: BSD-3-Clause
- * Copyright(c) 2001-2019
+ * Copyright(c) 2001-2021 Intel Corporation
  */
 
 #ifndef _ICE_DCB_H_
 #define _ICE_DCB_H_
 
 #include "ice_type.h"
+#include "ice_common.h"
 
 #define ICE_DCBX_OFFLOAD_DIS           0
 #define ICE_DCBX_OFFLOAD_ENABLED       1
 #define ICE_CEE_DCBX_OUI               0x001B21
 #define ICE_CEE_DCBX_TYPE              2
 
+#define ICE_DSCP_OUI                   0xFFFFFF
+#define ICE_DSCP_SUBTYPE_DSCP2UP       0x41
+#define ICE_DSCP_SUBTYPE_ENFORCE       0x42
+#define ICE_DSCP_SUBTYPE_TCBW          0x43
+#define ICE_DSCP_SUBTYPE_PFC           0x44
+#define ICE_DSCP_IPV6_OFFSET           80
+
 #define ICE_CEE_SUBTYPE_CTRL           1
 #define ICE_CEE_SUBTYPE_PG_CFG         2
 #define ICE_CEE_SUBTYPE_PFC_CFG                3
 #define ICE_IEEE_TLV_ID_APP_PRI                6
 #define ICE_TLV_ID_END_OF_LLDPPDU      7
 #define ICE_TLV_ID_START               ICE_IEEE_TLV_ID_ETS_CFG
+#define ICE_TLV_ID_DSCP_UP             3
+#define ICE_TLV_ID_DSCP_ENF            4
+#define ICE_TLV_ID_DSCP_TC_BW          5
+#define ICE_TLV_ID_DSCP_TO_PFC         6
 
 #define ICE_IEEE_ETS_TLV_LEN           25
 #define ICE_IEEE_PFC_TLV_LEN           6
 #define ICE_IEEE_APP_TLV_LEN           11
 
-#pragma pack(1)
-/* IEEE 802.1AB LLDP TLV structure */
-struct ice_lldp_generic_tlv {
-       __be16 typelen;
-       u8 tlvinfo[1];
-};
+#define ICE_DSCP_UP_TLV_LEN            148
+#define ICE_DSCP_ENF_TLV_LEN           132
+#define ICE_DSCP_TC_BW_TLV_LEN         25
+#define ICE_DSCP_PFC_TLV_LEN           6
 
+#pragma pack(1)
 /* IEEE 802.1AB LLDP Organization specific TLV */
 struct ice_lldp_org_tlv {
        __be16 typelen;
        __be32 ouisubtype;
-       u8 tlvinfo[1];
+       u8 tlvinfo[STRUCT_HACK_VAR_LEN];
 };
 #pragma pack()
 
@@ -135,7 +146,7 @@ struct ice_cee_feat_tlv {
 #define ICE_CEE_FEAT_TLV_WILLING_M     0x40
 #define ICE_CEE_FEAT_TLV_ERR_M         0x20
        u8 subtype;
-       u8 tlvinfo[1];
+       u8 tlvinfo[STRUCT_HACK_VAR_LEN];
 };
 
 #pragma pack(1)
@@ -182,12 +193,11 @@ ice_aq_get_lldp_mib(struct ice_hw *hw, u8 bridge_type, u8 mib_type, void *buf,
                    u16 buf_size, u16 *local_len, u16 *remote_len,
                    struct ice_sq_cd *cd);
 enum ice_status
-ice_aq_set_lldp_mib(struct ice_hw *hw, u8 mib_type, void *buf, u16 buf_size,
-                   struct ice_sq_cd *cd);
-enum ice_status
 ice_aq_get_cee_dcb_cfg(struct ice_hw *hw,
                       struct ice_aqc_get_cee_dcb_cfg_resp *buff,
                       struct ice_sq_cd *cd);
+enum ice_status
+ice_aq_set_pfc_mode(struct ice_hw *hw, u8 pfc_mode, struct ice_sq_cd *cd);
 enum ice_status ice_lldp_to_dcb_cfg(u8 *lldpmib, struct ice_dcbx_cfg *dcbcfg);
 u8 ice_get_dcbx_status(struct ice_hw *hw);
 enum ice_status