net/ice/base: refactor VSI node scheduler
[dpdk.git] / drivers / net / ice / base / ice_adminq_cmd.h
index 4c5cf54..9aaf8ee 100644 (file)
@@ -38,6 +38,17 @@ struct ice_aqc_get_ver {
 };
 
 
+/* Send driver version (indirect 0x0002) */
+struct ice_aqc_driver_ver {
+       u8 major_ver;
+       u8 minor_ver;
+       u8 build_ver;
+       u8 subbuild_ver;
+       u8 reserved[4];
+       __le32 addr_high;
+       __le32 addr_low;
+};
+
 
 /* Queue Shutdown (direct 0x0003) */
 struct ice_aqc_q_shutdown {
@@ -99,12 +110,14 @@ struct ice_aqc_list_caps {
 struct ice_aqc_list_caps_elem {
        __le16 cap;
 #define ICE_AQC_CAPS_VALID_FUNCTIONS                   0x0005
+#define ICE_AQC_MAX_VALID_FUNCTIONS                    0x8
 #define ICE_AQC_CAPS_VSI                               0x0017
 #define ICE_AQC_CAPS_DCB                               0x0018
 #define ICE_AQC_CAPS_RSS                               0x0040
 #define ICE_AQC_CAPS_RXQS                              0x0041
 #define ICE_AQC_CAPS_TXQS                              0x0042
 #define ICE_AQC_CAPS_MSIX                              0x0043
+#define ICE_AQC_CAPS_FD                                        0x0045
 #define ICE_AQC_CAPS_MAX_MTU                           0x0047
 
        u8 major_ver;
@@ -131,11 +144,9 @@ struct ice_aqc_manage_mac_read {
 #define ICE_AQC_MAN_MAC_WOL_ADDR_VALID         BIT(7)
 #define ICE_AQC_MAN_MAC_READ_S                 4
 #define ICE_AQC_MAN_MAC_READ_M                 (0xF << ICE_AQC_MAN_MAC_READ_S)
-       u8 lport_num;
-       u8 lport_num_valid;
-#define ICE_AQC_MAN_MAC_PORT_NUM_IS_VALID      BIT(0)
+       u8 rsvd[2];
        u8 num_addr; /* Used in response */
-       u8 reserved[3];
+       u8 rsvd1[3];
        __le32 addr_high;
        __le32 addr_low;
 };
@@ -153,7 +164,7 @@ struct ice_aqc_manage_mac_read_resp {
 
 /* Manage MAC address, write command - direct (0x0108) */
 struct ice_aqc_manage_mac_write {
-       u8 port_num;
+       u8 rsvd;
        u8 flags;
 #define ICE_AQC_MAN_MAC_WR_MC_MAG_EN           BIT(0)
 #define ICE_AQC_MAN_MAC_WR_WOL_LAA_PFR_KEEP    BIT(1)
@@ -469,8 +480,8 @@ struct ice_aqc_vsi_props {
 #define ICE_AQ_VSI_VLAN_MODE_TAGGED    0x2
 #define ICE_AQ_VSI_VLAN_MODE_ALL       0x3
 #define ICE_AQ_VSI_PVLAN_INSERT_PVID   BIT(2)
-#define ICE_AQ_VSI_VLAN_EMOD_S 3
-#define ICE_AQ_VSI_VLAN_EMOD_M (0x3 << ICE_AQ_VSI_VLAN_EMOD_S)
+#define ICE_AQ_VSI_VLAN_EMOD_S         3
+#define ICE_AQ_VSI_VLAN_EMOD_M         (0x3 << ICE_AQ_VSI_VLAN_EMOD_S)
 #define ICE_AQ_VSI_VLAN_EMOD_STR_BOTH  (0x0 << ICE_AQ_VSI_VLAN_EMOD_S)
 #define ICE_AQ_VSI_VLAN_EMOD_STR_UP    (0x1 << ICE_AQ_VSI_VLAN_EMOD_S)
 #define ICE_AQ_VSI_VLAN_EMOD_STR       (0x2 << ICE_AQ_VSI_VLAN_EMOD_S)
@@ -684,6 +695,73 @@ struct ice_aqc_storm_cfg {
 
 #define ICE_MAX_NUM_RECIPES 64
 
+/* Add/Get Recipe (indirect 0x0290/0x0292)*/
+struct ice_aqc_add_get_recipe {
+       __le16 num_sub_recipes; /* Input in Add cmd, Output in Get cmd */
+       __le16 return_index;    /* Input, used for Get cmd only */
+       u8 reserved[4];
+       __le32 addr_high;
+       __le32 addr_low;
+};
+
+struct ice_aqc_recipe_content {
+       u8 rid;
+#define ICE_AQ_RECIPE_ID_S             0
+#define ICE_AQ_RECIPE_ID_M             (0x3F << ICE_AQ_RECIPE_ID_S)
+#define ICE_AQ_RECIPE_ID_IS_ROOT       BIT(7)
+#define ICE_AQ_SW_ID_LKUP_IDX          0
+       u8 lkup_indx[5];
+#define ICE_AQ_RECIPE_LKUP_DATA_S      0
+#define ICE_AQ_RECIPE_LKUP_DATA_M      (0x3F << ICE_AQ_RECIPE_LKUP_DATA_S)
+#define ICE_AQ_RECIPE_LKUP_IGNORE      BIT(7)
+#define ICE_AQ_SW_ID_LKUP_MASK         0x00FF
+       __le16 mask[5];
+       u8 result_indx;
+#define ICE_AQ_RECIPE_RESULT_DATA_S    0
+#define ICE_AQ_RECIPE_RESULT_DATA_M    (0x3F << ICE_AQ_RECIPE_RESULT_DATA_S)
+#define ICE_AQ_RECIPE_RESULT_EN                BIT(7)
+       u8 rsvd0[3];
+       u8 act_ctrl_join_priority;
+       u8 act_ctrl_fwd_priority;
+#define ICE_AQ_RECIPE_FWD_PRIORITY_S   0
+#define ICE_AQ_RECIPE_FWD_PRIORITY_M   (0xF << ICE_AQ_RECIPE_FWD_PRIORITY_S)
+       u8 act_ctrl;
+#define ICE_AQ_RECIPE_ACT_NEED_PASS_L2 BIT(0)
+#define ICE_AQ_RECIPE_ACT_ALLOW_PASS_L2        BIT(1)
+#define ICE_AQ_RECIPE_ACT_INV_ACT      BIT(2)
+#define ICE_AQ_RECIPE_ACT_PRUNE_INDX_S 4
+#define ICE_AQ_RECIPE_ACT_PRUNE_INDX_M (0x3 << ICE_AQ_RECIPE_ACT_PRUNE_INDX_S)
+       u8 rsvd1;
+       __le32 dflt_act;
+#define ICE_AQ_RECIPE_DFLT_ACT_S       0
+#define ICE_AQ_RECIPE_DFLT_ACT_M       (0x7FFFF << ICE_AQ_RECIPE_DFLT_ACT_S)
+#define ICE_AQ_RECIPE_DFLT_ACT_VALID   BIT(31)
+};
+
+struct ice_aqc_recipe_data_elem {
+       u8 recipe_indx;
+       u8 resp_bits;
+#define ICE_AQ_RECIPE_WAS_UPDATED      BIT(0)
+       u8 rsvd0[2];
+       u8 recipe_bitmap[8];
+       u8 rsvd1[4];
+       struct ice_aqc_recipe_content content;
+       u8 rsvd2[20];
+};
+
+/* This struct contains a number of entries as per the
+ * num_sub_recipes in the command
+ */
+struct ice_aqc_add_get_recipe_data {
+       struct ice_aqc_recipe_data_elem recipe[1];
+};
+
+/* Set/Get Recipes to Profile Association (direct 0x0291/0x0293) */
+struct ice_aqc_recipe_to_profile {
+       __le16 profile_id;
+       u8 rsvd[6];
+       ice_declare_bitmap(recipe_assoc, ICE_MAX_NUM_RECIPES);
+};
 
 /* Add/Update/Remove/Get switch rules (indirect 0x02A0, 0x02A1, 0x02A2, 0x02A3)
  */
@@ -1347,6 +1425,7 @@ struct ice_aqc_get_phy_caps_data {
 #define ICE_AQC_PHY_FEC_25G_RS_CLAUSE91_EN             BIT(6)
 #define ICE_AQC_PHY_FEC_25G_KR_CLAUSE74_EN             BIT(7)
 #define ICE_AQC_PHY_FEC_MASK                           MAKEMASK(0xdf, 0)
+       u8 rsvd1;       /* Byte 35 reserved */
        u8 extended_compliance_code;
 #define ICE_MODULE_TYPE_TOTAL_BYTE                     3
        u8 module_type[ICE_MODULE_TYPE_TOTAL_BYTE];
@@ -1361,13 +1440,14 @@ struct ice_aqc_get_phy_caps_data {
 #define ICE_AQC_MOD_TYPE_BYTE2_SFP_PLUS                        0xA0
 #define ICE_AQC_MOD_TYPE_BYTE2_QSFP_PLUS               0x86
        u8 qualified_module_count;
+       u8 rsvd2[7];    /* Bytes 47:41 reserved */
 #define ICE_AQC_QUAL_MOD_COUNT_MAX                     16
        struct {
                u8 v_oui[3];
                u8 rsvd3;
                u8 v_part[16];
                __le32 v_rev;
-               __le64 rsvd8;
+               __le64 rsvd4;
        } qual_modules[ICE_AQC_QUAL_MOD_COUNT_MAX];
 };
 
@@ -1753,7 +1833,7 @@ struct ice_aqc_get_cee_dcb_cfg_resp {
 };
 
 /* Set Local LLDP MIB (indirect 0x0A08)
- * Used to replace the local MIB of a given LLDP agent. e.g. DCBx
+ * Used to replace the local MIB of a given LLDP agent. e.g. DCBX
  */
 struct ice_aqc_lldp_set_local_mib {
        u8 type;
@@ -1778,7 +1858,7 @@ struct ice_aqc_lldp_set_local_mib_resp {
 };
 
 /* Stop/Start LLDP Agent (direct 0x0A09)
- * Used for stopping/starting specific LLDP agent. e.g. DCBx.
+ * Used for stopping/starting specific LLDP agent. e.g. DCBX.
  * The same structure is used for the response, with the command field
  * being used as the status field.
  */
@@ -1861,6 +1941,16 @@ struct ice_aqc_get_set_rss_lut {
 };
 
 
+/* Clear FD Table Command (direct, 0x0B06) */
+struct ice_aqc_clear_fd_table {
+       u8 clear_type;
+#define CL_FD_VM_VF_TYPE_VSI_IDX       1
+#define CL_FD_VM_VF_TYPE_PF_IDX                2
+       u8 rsvd;
+       __le16 vsi_index;
+       u8 reserved[12];
+};
+
 
 
 
@@ -2108,6 +2198,7 @@ enum ice_aqc_fw_logging_mod {
        ICE_AQC_FW_LOG_ID_WATCHDOG,
        ICE_AQC_FW_LOG_ID_TASK_DISPATCH,
        ICE_AQC_FW_LOG_ID_MNG,
+       ICE_AQC_FW_LOG_ID_SYNCE,
        ICE_AQC_FW_LOG_ID_MAX,
 };
 
@@ -2171,6 +2262,7 @@ struct ice_aq_desc {
                u8 raw[16];
                struct ice_aqc_generic generic;
                struct ice_aqc_get_ver get_ver;
+               struct ice_aqc_driver_ver driver_ver;
                struct ice_aqc_q_shutdown q_shutdown;
                struct ice_aqc_req_res res_owner;
                struct ice_aqc_manage_mac_read mac_read;
@@ -2187,6 +2279,8 @@ struct ice_aq_desc {
                struct ice_aqc_get_sw_cfg get_sw_conf;
                struct ice_aqc_sw_rules sw_rules;
                struct ice_aqc_storm_cfg storm_conf;
+               struct ice_aqc_add_get_recipe add_get_recipe;
+               struct ice_aqc_recipe_to_profile recipe_to_profile;
                struct ice_aqc_get_topo get_topo;
                struct ice_aqc_sched_elem_cmd sched_elem_cmd;
                struct ice_aqc_query_txsched_res query_sched_res;
@@ -2210,6 +2304,7 @@ struct ice_aq_desc {
                struct ice_aqc_lldp_stop_start_specific_agent lldp_agent_ctrl;
                struct ice_aqc_get_set_rss_lut get_set_rss_lut;
                struct ice_aqc_get_set_rss_key get_set_rss_key;
+               struct ice_aqc_clear_fd_table clear_fd_table;
                struct ice_aqc_add_txqs add_txqs;
                struct ice_aqc_dis_txqs dis_txqs;
                struct ice_aqc_txqs_cleanup txqs_cleanup;
@@ -2345,6 +2440,11 @@ enum ice_adminq_opc {
        ice_aqc_opc_set_storm_cfg                       = 0x0280,
        ice_aqc_opc_get_storm_cfg                       = 0x0281,
 
+       /* recipe commands */
+       ice_aqc_opc_add_recipe                          = 0x0290,
+       ice_aqc_opc_recipe_to_profile                   = 0x0291,
+       ice_aqc_opc_get_recipe                          = 0x0292,
+       ice_aqc_opc_get_recipe_to_profile               = 0x0293,
 
        /* switch rules population commands */
        ice_aqc_opc_add_sw_rules                        = 0x02A0,
@@ -2415,6 +2515,7 @@ enum ice_adminq_opc {
        ice_aqc_opc_set_rss_lut                         = 0x0B03,
        ice_aqc_opc_get_rss_key                         = 0x0B04,
        ice_aqc_opc_get_rss_lut                         = 0x0B05,
+       ice_aqc_opc_clear_fd_table                      = 0x0B06,
 
        /* Tx queue handling commands/events */
        ice_aqc_opc_add_txqs                            = 0x0C30,