ice_adminq_cmd.h 40 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697989910010110210310410510610710810911011111211311411511611711811912012112212312412512612712812913013113213313413513613713813914014114214314414514614714814915015115215315415515615715815916016116216316416516616716816917017117217317417517617717817918018118218318418518618718818919019119219319419519619719819920020120220320420520620720820921021121221321421521621721821922022122222322422522622722822923023123223323423523623723823924024124224324424524624724824925025125225325425525625725825926026126226326426526626726826927027127227327427527627727827928028128228328428528628728828929029129229329429529629729829930030130230330430530630730830931031131231331431531631731831932032132232332432532632732832933033133233333433533633733833934034134234334434534634734834935035135235335435535635735835936036136236336436536636736836937037137237337437537637737837938038138238338438538638738838939039139239339439539639739839940040140240340440540640740840941041141241341441541641741841942042142242342442542642742842943043143243343443543643743843944044144244344444544644744844945045145245345445545645745845946046146246346446546646746846947047147247347447547647747847948048148248348448548648748848949049149249349449549649749849950050150250350450550650750850951051151251351451551651751851952052152252352452552652752852953053153253353453553653753853954054154254354454554654754854955055155255355455555655755855956056156256356456556656756856957057157257357457557657757857958058158258358458558658758858959059159259359459559659759859960060160260360460560660760860961061161261361461561661761861962062162262362462562662762862963063163263363463563663763863964064164264364464564664764864965065165265365465565665765865966066166266366466566666766866967067167267367467567667767867968068168268368468568668768868969069169269369469569669769869970070170270370470570670770870971071171271371471571671771871972072172272372472572672772872973073173273373473573673773873974074174274374474574674774874975075175275375475575675775875976076176276376476576676776876977077177277377477577677777877978078178278378478578678778878979079179279379479579679779879980080180280380480580680780880981081181281381481581681781881982082182282382482582682782882983083183283383483583683783883984084184284384484584684784884985085185285385485585685785885986086186286386486586686786886987087187287387487587687787887988088188288388488588688788888989089189289389489589689789889990090190290390490590690790890991091191291391491591691791891992092192292392492592692792892993093193293393493593693793893994094194294394494594694794894995095195295395495595695795895996096196296396496596696796896997097197297397497597697797897998098198298398498598698798898999099199299399499599699799899910001001100210031004100510061007100810091010101110121013101410151016101710181019102010211022102310241025102610271028102910301031103210331034103510361037103810391040104110421043104410451046104710481049105010511052105310541055105610571058105910601061106210631064106510661067106810691070107110721073107410751076107710781079108010811082108310841085108610871088108910901091109210931094109510961097109810991100110111021103110411051106110711081109111011111112111311141115111611171118111911201121112211231124112511261127112811291130113111321133113411351136113711381139114011411142114311441145114611471148114911501151115211531154115511561157115811591160116111621163116411651166116711681169117011711172117311741175117611771178117911801181118211831184118511861187118811891190119111921193119411951196119711981199120012011202120312041205120612071208120912101211121212131214121512161217121812191220122112221223122412251226122712281229123012311232123312341235123612371238123912401241
  1. /* SPDX-License-Identifier: GPL-2.0 */
  2. /* Copyright (c) 2018, Intel Corporation. */
  3. #ifndef _ICE_ADMINQ_CMD_H_
  4. #define _ICE_ADMINQ_CMD_H_
  5. /* This header file defines the Admin Queue commands, error codes and
  6. * descriptor format. It is shared between Firmware and Software.
  7. */
  8. #define ICE_MAX_VSI 768
  9. #define ICE_AQC_TOPO_MAX_LEVEL_NUM 0x9
  10. #define ICE_AQ_SET_MAC_FRAME_SIZE_MAX 9728
  11. struct ice_aqc_generic {
  12. __le32 param0;
  13. __le32 param1;
  14. __le32 addr_high;
  15. __le32 addr_low;
  16. };
  17. /* Get version (direct 0x0001) */
  18. struct ice_aqc_get_ver {
  19. __le32 rom_ver;
  20. __le32 fw_build;
  21. u8 fw_branch;
  22. u8 fw_major;
  23. u8 fw_minor;
  24. u8 fw_patch;
  25. u8 api_branch;
  26. u8 api_major;
  27. u8 api_minor;
  28. u8 api_patch;
  29. };
  30. /* Queue Shutdown (direct 0x0003) */
  31. struct ice_aqc_q_shutdown {
  32. #define ICE_AQC_DRIVER_UNLOADING BIT(0)
  33. __le32 driver_unloading;
  34. u8 reserved[12];
  35. };
  36. /* Request resource ownership (direct 0x0008)
  37. * Release resource ownership (direct 0x0009)
  38. */
  39. struct ice_aqc_req_res {
  40. __le16 res_id;
  41. #define ICE_AQC_RES_ID_NVM 1
  42. #define ICE_AQC_RES_ID_SDP 2
  43. #define ICE_AQC_RES_ID_CHNG_LOCK 3
  44. #define ICE_AQC_RES_ID_GLBL_LOCK 4
  45. __le16 access_type;
  46. #define ICE_AQC_RES_ACCESS_READ 1
  47. #define ICE_AQC_RES_ACCESS_WRITE 2
  48. /* Upon successful completion, FW writes this value and driver is
  49. * expected to release resource before timeout. This value is provided
  50. * in milliseconds.
  51. */
  52. __le32 timeout;
  53. #define ICE_AQ_RES_NVM_READ_DFLT_TIMEOUT_MS 3000
  54. #define ICE_AQ_RES_NVM_WRITE_DFLT_TIMEOUT_MS 180000
  55. #define ICE_AQ_RES_CHNG_LOCK_DFLT_TIMEOUT_MS 1000
  56. #define ICE_AQ_RES_GLBL_LOCK_DFLT_TIMEOUT_MS 3000
  57. /* For SDP: pin id of the SDP */
  58. __le32 res_number;
  59. /* Status is only used for ICE_AQC_RES_ID_GLBL_LOCK */
  60. __le16 status;
  61. #define ICE_AQ_RES_GLBL_SUCCESS 0
  62. #define ICE_AQ_RES_GLBL_IN_PROG 1
  63. #define ICE_AQ_RES_GLBL_DONE 2
  64. u8 reserved[2];
  65. };
  66. /* Get function capabilities (indirect 0x000A)
  67. * Get device capabilities (indirect 0x000B)
  68. */
  69. struct ice_aqc_list_caps {
  70. u8 cmd_flags;
  71. u8 pf_index;
  72. u8 reserved[2];
  73. __le32 count;
  74. __le32 addr_high;
  75. __le32 addr_low;
  76. };
  77. /* Device/Function buffer entry, repeated per reported capability */
  78. struct ice_aqc_list_caps_elem {
  79. __le16 cap;
  80. #define ICE_AQC_CAPS_VSI 0x0017
  81. #define ICE_AQC_CAPS_RSS 0x0040
  82. #define ICE_AQC_CAPS_RXQS 0x0041
  83. #define ICE_AQC_CAPS_TXQS 0x0042
  84. #define ICE_AQC_CAPS_MSIX 0x0043
  85. #define ICE_AQC_CAPS_MAX_MTU 0x0047
  86. u8 major_ver;
  87. u8 minor_ver;
  88. /* Number of resources described by this capability */
  89. __le32 number;
  90. /* Only meaningful for some types of resources */
  91. __le32 logical_id;
  92. /* Only meaningful for some types of resources */
  93. __le32 phys_id;
  94. __le64 rsvd1;
  95. __le64 rsvd2;
  96. };
  97. /* Manage MAC address, read command - indirect (0x0107)
  98. * This struct is also used for the response
  99. */
  100. struct ice_aqc_manage_mac_read {
  101. __le16 flags; /* Zeroed by device driver */
  102. #define ICE_AQC_MAN_MAC_LAN_ADDR_VALID BIT(4)
  103. #define ICE_AQC_MAN_MAC_SAN_ADDR_VALID BIT(5)
  104. #define ICE_AQC_MAN_MAC_PORT_ADDR_VALID BIT(6)
  105. #define ICE_AQC_MAN_MAC_WOL_ADDR_VALID BIT(7)
  106. #define ICE_AQC_MAN_MAC_READ_S 4
  107. #define ICE_AQC_MAN_MAC_READ_M (0xF << ICE_AQC_MAN_MAC_READ_S)
  108. u8 lport_num;
  109. u8 lport_num_valid;
  110. #define ICE_AQC_MAN_MAC_PORT_NUM_IS_VALID BIT(0)
  111. u8 num_addr; /* Used in response */
  112. u8 reserved[3];
  113. __le32 addr_high;
  114. __le32 addr_low;
  115. };
  116. /* Response buffer format for manage MAC read command */
  117. struct ice_aqc_manage_mac_read_resp {
  118. u8 lport_num;
  119. u8 addr_type;
  120. #define ICE_AQC_MAN_MAC_ADDR_TYPE_LAN 0
  121. #define ICE_AQC_MAN_MAC_ADDR_TYPE_WOL 1
  122. u8 mac_addr[ETH_ALEN];
  123. };
  124. /* Clear PXE Command and response (direct 0x0110) */
  125. struct ice_aqc_clear_pxe {
  126. u8 rx_cnt;
  127. #define ICE_AQC_CLEAR_PXE_RX_CNT 0x2
  128. u8 reserved[15];
  129. };
  130. /* Get switch configuration (0x0200) */
  131. struct ice_aqc_get_sw_cfg {
  132. /* Reserved for command and copy of request flags for response */
  133. __le16 flags;
  134. /* First desc in case of command and next_elem in case of response
  135. * In case of response, if it is not zero, means all the configuration
  136. * was not returned and new command shall be sent with this value in
  137. * the 'first desc' field
  138. */
  139. __le16 element;
  140. /* Reserved for command, only used for response */
  141. __le16 num_elems;
  142. __le16 rsvd;
  143. __le32 addr_high;
  144. __le32 addr_low;
  145. };
  146. /* Each entry in the response buffer is of the following type: */
  147. struct ice_aqc_get_sw_cfg_resp_elem {
  148. /* VSI/Port Number */
  149. __le16 vsi_port_num;
  150. #define ICE_AQC_GET_SW_CONF_RESP_VSI_PORT_NUM_S 0
  151. #define ICE_AQC_GET_SW_CONF_RESP_VSI_PORT_NUM_M \
  152. (0x3FF << ICE_AQC_GET_SW_CONF_RESP_VSI_PORT_NUM_S)
  153. #define ICE_AQC_GET_SW_CONF_RESP_TYPE_S 14
  154. #define ICE_AQC_GET_SW_CONF_RESP_TYPE_M (0x3 << ICE_AQC_GET_SW_CONF_RESP_TYPE_S)
  155. #define ICE_AQC_GET_SW_CONF_RESP_PHYS_PORT 0
  156. #define ICE_AQC_GET_SW_CONF_RESP_VIRT_PORT 1
  157. #define ICE_AQC_GET_SW_CONF_RESP_VSI 2
  158. /* SWID VSI/Port belongs to */
  159. __le16 swid;
  160. /* Bit 14..0 : PF/VF number VSI belongs to
  161. * Bit 15 : VF indication bit
  162. */
  163. __le16 pf_vf_num;
  164. #define ICE_AQC_GET_SW_CONF_RESP_FUNC_NUM_S 0
  165. #define ICE_AQC_GET_SW_CONF_RESP_FUNC_NUM_M \
  166. (0x7FFF << ICE_AQC_GET_SW_CONF_RESP_FUNC_NUM_S)
  167. #define ICE_AQC_GET_SW_CONF_RESP_IS_VF BIT(15)
  168. };
  169. /* The response buffer is as follows. Note that the length of the
  170. * elements array varies with the length of the command response.
  171. */
  172. struct ice_aqc_get_sw_cfg_resp {
  173. struct ice_aqc_get_sw_cfg_resp_elem elements[1];
  174. };
  175. /* These resource type defines are used for all switch resource
  176. * commands where a resource type is required, such as:
  177. * Get Resource Allocation command (indirect 0x0204)
  178. * Allocate Resources command (indirect 0x0208)
  179. * Free Resources command (indirect 0x0209)
  180. * Get Allocated Resource Descriptors Command (indirect 0x020A)
  181. */
  182. #define ICE_AQC_RES_TYPE_VSI_LIST_REP 0x03
  183. #define ICE_AQC_RES_TYPE_VSI_LIST_PRUNE 0x04
  184. /* Allocate Resources command (indirect 0x0208)
  185. * Free Resources command (indirect 0x0209)
  186. */
  187. struct ice_aqc_alloc_free_res_cmd {
  188. __le16 num_entries; /* Number of Resource entries */
  189. u8 reserved[6];
  190. __le32 addr_high;
  191. __le32 addr_low;
  192. };
  193. /* Resource descriptor */
  194. struct ice_aqc_res_elem {
  195. union {
  196. __le16 sw_resp;
  197. __le16 flu_resp;
  198. } e;
  199. };
  200. /* Buffer for Allocate/Free Resources commands */
  201. struct ice_aqc_alloc_free_res_elem {
  202. __le16 res_type; /* Types defined above cmd 0x0204 */
  203. #define ICE_AQC_RES_TYPE_SHARED_S 7
  204. #define ICE_AQC_RES_TYPE_SHARED_M (0x1 << ICE_AQC_RES_TYPE_SHARED_S)
  205. #define ICE_AQC_RES_TYPE_VSI_PRUNE_LIST_S 8
  206. #define ICE_AQC_RES_TYPE_VSI_PRUNE_LIST_M \
  207. (0xF << ICE_AQC_RES_TYPE_VSI_PRUNE_LIST_S)
  208. __le16 num_elems;
  209. struct ice_aqc_res_elem elem[1];
  210. };
  211. /* Add VSI (indirect 0x0210)
  212. * Update VSI (indirect 0x0211)
  213. * Get VSI (indirect 0x0212)
  214. * Free VSI (indirect 0x0213)
  215. */
  216. struct ice_aqc_add_get_update_free_vsi {
  217. __le16 vsi_num;
  218. #define ICE_AQ_VSI_NUM_S 0
  219. #define ICE_AQ_VSI_NUM_M (0x03FF << ICE_AQ_VSI_NUM_S)
  220. #define ICE_AQ_VSI_IS_VALID BIT(15)
  221. __le16 cmd_flags;
  222. #define ICE_AQ_VSI_KEEP_ALLOC 0x1
  223. u8 vf_id;
  224. u8 reserved;
  225. __le16 vsi_flags;
  226. #define ICE_AQ_VSI_TYPE_S 0
  227. #define ICE_AQ_VSI_TYPE_M (0x3 << ICE_AQ_VSI_TYPE_S)
  228. #define ICE_AQ_VSI_TYPE_VF 0x0
  229. #define ICE_AQ_VSI_TYPE_VMDQ2 0x1
  230. #define ICE_AQ_VSI_TYPE_PF 0x2
  231. #define ICE_AQ_VSI_TYPE_EMP_MNG 0x3
  232. __le32 addr_high;
  233. __le32 addr_low;
  234. };
  235. /* Response descriptor for:
  236. * Add VSI (indirect 0x0210)
  237. * Update VSI (indirect 0x0211)
  238. * Free VSI (indirect 0x0213)
  239. */
  240. struct ice_aqc_add_update_free_vsi_resp {
  241. __le16 vsi_num;
  242. __le16 ext_status;
  243. __le16 vsi_used;
  244. __le16 vsi_free;
  245. __le32 addr_high;
  246. __le32 addr_low;
  247. };
  248. struct ice_aqc_vsi_props {
  249. __le16 valid_sections;
  250. #define ICE_AQ_VSI_PROP_SW_VALID BIT(0)
  251. #define ICE_AQ_VSI_PROP_SECURITY_VALID BIT(1)
  252. #define ICE_AQ_VSI_PROP_VLAN_VALID BIT(2)
  253. #define ICE_AQ_VSI_PROP_OUTER_TAG_VALID BIT(3)
  254. #define ICE_AQ_VSI_PROP_INGRESS_UP_VALID BIT(4)
  255. #define ICE_AQ_VSI_PROP_EGRESS_UP_VALID BIT(5)
  256. #define ICE_AQ_VSI_PROP_RXQ_MAP_VALID BIT(6)
  257. #define ICE_AQ_VSI_PROP_Q_OPT_VALID BIT(7)
  258. #define ICE_AQ_VSI_PROP_OUTER_UP_VALID BIT(8)
  259. #define ICE_AQ_VSI_PROP_FLOW_DIR_VALID BIT(11)
  260. #define ICE_AQ_VSI_PROP_PASID_VALID BIT(12)
  261. /* switch section */
  262. u8 sw_id;
  263. u8 sw_flags;
  264. #define ICE_AQ_VSI_SW_FLAG_ALLOW_LB BIT(5)
  265. #define ICE_AQ_VSI_SW_FLAG_LOCAL_LB BIT(6)
  266. #define ICE_AQ_VSI_SW_FLAG_SRC_PRUNE BIT(7)
  267. u8 sw_flags2;
  268. #define ICE_AQ_VSI_SW_FLAG_RX_PRUNE_EN_S 0
  269. #define ICE_AQ_VSI_SW_FLAG_RX_PRUNE_EN_M \
  270. (0xF << ICE_AQ_VSI_SW_FLAG_RX_PRUNE_EN_S)
  271. #define ICE_AQ_VSI_SW_FLAG_RX_VLAN_PRUNE_ENA BIT(0)
  272. #define ICE_AQ_VSI_SW_FLAG_LAN_ENA BIT(4)
  273. u8 veb_stat_id;
  274. #define ICE_AQ_VSI_SW_VEB_STAT_ID_S 0
  275. #define ICE_AQ_VSI_SW_VEB_STAT_ID_M (0x1F << ICE_AQ_VSI_SW_VEB_STAT_ID_S)
  276. #define ICE_AQ_VSI_SW_VEB_STAT_ID_VALID BIT(5)
  277. /* security section */
  278. u8 sec_flags;
  279. #define ICE_AQ_VSI_SEC_FLAG_ALLOW_DEST_OVRD BIT(0)
  280. #define ICE_AQ_VSI_SEC_FLAG_ENA_MAC_ANTI_SPOOF BIT(2)
  281. #define ICE_AQ_VSI_SEC_TX_PRUNE_ENA_S 4
  282. #define ICE_AQ_VSI_SEC_TX_PRUNE_ENA_M (0xF << ICE_AQ_VSI_SEC_TX_PRUNE_ENA_S)
  283. #define ICE_AQ_VSI_SEC_TX_VLAN_PRUNE_ENA BIT(0)
  284. u8 sec_reserved;
  285. /* VLAN section */
  286. __le16 pvid; /* VLANS include priority bits */
  287. u8 pvlan_reserved[2];
  288. u8 port_vlan_flags;
  289. #define ICE_AQ_VSI_PVLAN_MODE_S 0
  290. #define ICE_AQ_VSI_PVLAN_MODE_M (0x3 << ICE_AQ_VSI_PVLAN_MODE_S)
  291. #define ICE_AQ_VSI_PVLAN_MODE_UNTAGGED 0x1
  292. #define ICE_AQ_VSI_PVLAN_MODE_TAGGED 0x2
  293. #define ICE_AQ_VSI_PVLAN_MODE_ALL 0x3
  294. #define ICE_AQ_VSI_PVLAN_INSERT_PVID BIT(2)
  295. #define ICE_AQ_VSI_PVLAN_EMOD_S 3
  296. #define ICE_AQ_VSI_PVLAN_EMOD_M (0x3 << ICE_AQ_VSI_PVLAN_EMOD_S)
  297. #define ICE_AQ_VSI_PVLAN_EMOD_STR_BOTH (0x0 << ICE_AQ_VSI_PVLAN_EMOD_S)
  298. #define ICE_AQ_VSI_PVLAN_EMOD_STR_UP (0x1 << ICE_AQ_VSI_PVLAN_EMOD_S)
  299. #define ICE_AQ_VSI_PVLAN_EMOD_STR (0x2 << ICE_AQ_VSI_PVLAN_EMOD_S)
  300. #define ICE_AQ_VSI_PVLAN_EMOD_NOTHING (0x3 << ICE_AQ_VSI_PVLAN_EMOD_S)
  301. u8 pvlan_reserved2[3];
  302. /* ingress egress up sections */
  303. __le32 ingress_table; /* bitmap, 3 bits per up */
  304. #define ICE_AQ_VSI_UP_TABLE_UP0_S 0
  305. #define ICE_AQ_VSI_UP_TABLE_UP0_M (0x7 << ICE_AQ_VSI_UP_TABLE_UP0_S)
  306. #define ICE_AQ_VSI_UP_TABLE_UP1_S 3
  307. #define ICE_AQ_VSI_UP_TABLE_UP1_M (0x7 << ICE_AQ_VSI_UP_TABLE_UP1_S)
  308. #define ICE_AQ_VSI_UP_TABLE_UP2_S 6
  309. #define ICE_AQ_VSI_UP_TABLE_UP2_M (0x7 << ICE_AQ_VSI_UP_TABLE_UP2_S)
  310. #define ICE_AQ_VSI_UP_TABLE_UP3_S 9
  311. #define ICE_AQ_VSI_UP_TABLE_UP3_M (0x7 << ICE_AQ_VSI_UP_TABLE_UP3_S)
  312. #define ICE_AQ_VSI_UP_TABLE_UP4_S 12
  313. #define ICE_AQ_VSI_UP_TABLE_UP4_M (0x7 << ICE_AQ_VSI_UP_TABLE_UP4_S)
  314. #define ICE_AQ_VSI_UP_TABLE_UP5_S 15
  315. #define ICE_AQ_VSI_UP_TABLE_UP5_M (0x7 << ICE_AQ_VSI_UP_TABLE_UP5_S)
  316. #define ICE_AQ_VSI_UP_TABLE_UP6_S 18
  317. #define ICE_AQ_VSI_UP_TABLE_UP6_M (0x7 << ICE_AQ_VSI_UP_TABLE_UP6_S)
  318. #define ICE_AQ_VSI_UP_TABLE_UP7_S 21
  319. #define ICE_AQ_VSI_UP_TABLE_UP7_M (0x7 << ICE_AQ_VSI_UP_TABLE_UP7_S)
  320. __le32 egress_table; /* same defines as for ingress table */
  321. /* outer tags section */
  322. __le16 outer_tag;
  323. u8 outer_tag_flags;
  324. #define ICE_AQ_VSI_OUTER_TAG_MODE_S 0
  325. #define ICE_AQ_VSI_OUTER_TAG_MODE_M (0x3 << ICE_AQ_VSI_OUTER_TAG_MODE_S)
  326. #define ICE_AQ_VSI_OUTER_TAG_NOTHING 0x0
  327. #define ICE_AQ_VSI_OUTER_TAG_REMOVE 0x1
  328. #define ICE_AQ_VSI_OUTER_TAG_COPY 0x2
  329. #define ICE_AQ_VSI_OUTER_TAG_TYPE_S 2
  330. #define ICE_AQ_VSI_OUTER_TAG_TYPE_M (0x3 << ICE_AQ_VSI_OUTER_TAG_TYPE_S)
  331. #define ICE_AQ_VSI_OUTER_TAG_NONE 0x0
  332. #define ICE_AQ_VSI_OUTER_TAG_STAG 0x1
  333. #define ICE_AQ_VSI_OUTER_TAG_VLAN_8100 0x2
  334. #define ICE_AQ_VSI_OUTER_TAG_VLAN_9100 0x3
  335. #define ICE_AQ_VSI_OUTER_TAG_INSERT BIT(4)
  336. #define ICE_AQ_VSI_OUTER_TAG_ACCEPT_HOST BIT(6)
  337. u8 outer_tag_reserved;
  338. /* queue mapping section */
  339. __le16 mapping_flags;
  340. #define ICE_AQ_VSI_Q_MAP_CONTIG 0x0
  341. #define ICE_AQ_VSI_Q_MAP_NONCONTIG BIT(0)
  342. __le16 q_mapping[16];
  343. #define ICE_AQ_VSI_Q_S 0
  344. #define ICE_AQ_VSI_Q_M (0x7FF << ICE_AQ_VSI_Q_S)
  345. __le16 tc_mapping[8];
  346. #define ICE_AQ_VSI_TC_Q_OFFSET_S 0
  347. #define ICE_AQ_VSI_TC_Q_OFFSET_M (0x7FF << ICE_AQ_VSI_TC_Q_OFFSET_S)
  348. #define ICE_AQ_VSI_TC_Q_NUM_S 11
  349. #define ICE_AQ_VSI_TC_Q_NUM_M (0xF << ICE_AQ_VSI_TC_Q_NUM_S)
  350. /* queueing option section */
  351. u8 q_opt_rss;
  352. #define ICE_AQ_VSI_Q_OPT_RSS_LUT_S 0
  353. #define ICE_AQ_VSI_Q_OPT_RSS_LUT_M (0x3 << ICE_AQ_VSI_Q_OPT_RSS_LUT_S)
  354. #define ICE_AQ_VSI_Q_OPT_RSS_LUT_VSI 0x0
  355. #define ICE_AQ_VSI_Q_OPT_RSS_LUT_PF 0x2
  356. #define ICE_AQ_VSI_Q_OPT_RSS_LUT_GBL 0x3
  357. #define ICE_AQ_VSI_Q_OPT_RSS_GBL_LUT_S 2
  358. #define ICE_AQ_VSI_Q_OPT_RSS_GBL_LUT_M (0xF << ICE_AQ_VSI_Q_OPT_RSS_GBL_LUT_S)
  359. #define ICE_AQ_VSI_Q_OPT_RSS_HASH_S 6
  360. #define ICE_AQ_VSI_Q_OPT_RSS_HASH_M (0x3 << ICE_AQ_VSI_Q_OPT_RSS_HASH_S)
  361. #define ICE_AQ_VSI_Q_OPT_RSS_TPLZ (0x0 << ICE_AQ_VSI_Q_OPT_RSS_HASH_S)
  362. #define ICE_AQ_VSI_Q_OPT_RSS_SYM_TPLZ (0x1 << ICE_AQ_VSI_Q_OPT_RSS_HASH_S)
  363. #define ICE_AQ_VSI_Q_OPT_RSS_XOR (0x2 << ICE_AQ_VSI_Q_OPT_RSS_HASH_S)
  364. #define ICE_AQ_VSI_Q_OPT_RSS_JHASH (0x3 << ICE_AQ_VSI_Q_OPT_RSS_HASH_S)
  365. u8 q_opt_tc;
  366. #define ICE_AQ_VSI_Q_OPT_TC_OVR_S 0
  367. #define ICE_AQ_VSI_Q_OPT_TC_OVR_M (0x1F << ICE_AQ_VSI_Q_OPT_TC_OVR_S)
  368. #define ICE_AQ_VSI_Q_OPT_PROF_TC_OVR BIT(7)
  369. u8 q_opt_flags;
  370. #define ICE_AQ_VSI_Q_OPT_PE_FLTR_EN BIT(0)
  371. u8 q_opt_reserved[3];
  372. /* outer up section */
  373. __le32 outer_up_table; /* same structure and defines as ingress tbl */
  374. /* section 10 */
  375. __le16 sect_10_reserved;
  376. /* flow director section */
  377. __le16 fd_options;
  378. #define ICE_AQ_VSI_FD_ENABLE BIT(0)
  379. #define ICE_AQ_VSI_FD_TX_AUTO_ENABLE BIT(1)
  380. #define ICE_AQ_VSI_FD_PROG_ENABLE BIT(3)
  381. __le16 max_fd_fltr_dedicated;
  382. __le16 max_fd_fltr_shared;
  383. __le16 fd_def_q;
  384. #define ICE_AQ_VSI_FD_DEF_Q_S 0
  385. #define ICE_AQ_VSI_FD_DEF_Q_M (0x7FF << ICE_AQ_VSI_FD_DEF_Q_S)
  386. #define ICE_AQ_VSI_FD_DEF_GRP_S 12
  387. #define ICE_AQ_VSI_FD_DEF_GRP_M (0x7 << ICE_AQ_VSI_FD_DEF_GRP_S)
  388. __le16 fd_report_opt;
  389. #define ICE_AQ_VSI_FD_REPORT_Q_S 0
  390. #define ICE_AQ_VSI_FD_REPORT_Q_M (0x7FF << ICE_AQ_VSI_FD_REPORT_Q_S)
  391. #define ICE_AQ_VSI_FD_DEF_PRIORITY_S 12
  392. #define ICE_AQ_VSI_FD_DEF_PRIORITY_M (0x7 << ICE_AQ_VSI_FD_DEF_PRIORITY_S)
  393. #define ICE_AQ_VSI_FD_DEF_DROP BIT(15)
  394. /* PASID section */
  395. __le32 pasid_id;
  396. #define ICE_AQ_VSI_PASID_ID_S 0
  397. #define ICE_AQ_VSI_PASID_ID_M (0xFFFFF << ICE_AQ_VSI_PASID_ID_S)
  398. #define ICE_AQ_VSI_PASID_ID_VALID BIT(31)
  399. u8 reserved[24];
  400. };
  401. /* Add/Update/Remove/Get switch rules (indirect 0x02A0, 0x02A1, 0x02A2, 0x02A3)
  402. */
  403. struct ice_aqc_sw_rules {
  404. /* ops: add switch rules, referring the number of rules.
  405. * ops: update switch rules, referring the number of filters
  406. * ops: remove switch rules, referring the entry index.
  407. * ops: get switch rules, referring to the number of filters.
  408. */
  409. __le16 num_rules_fltr_entry_index;
  410. u8 reserved[6];
  411. __le32 addr_high;
  412. __le32 addr_low;
  413. };
  414. /* Add/Update/Get/Remove lookup Rx/Tx command/response entry
  415. * This structures describes the lookup rules and associated actions. "index"
  416. * is returned as part of a response to a successful Add command, and can be
  417. * used to identify the rule for Update/Get/Remove commands.
  418. */
  419. struct ice_sw_rule_lkup_rx_tx {
  420. __le16 recipe_id;
  421. #define ICE_SW_RECIPE_LOGICAL_PORT_FWD 10
  422. /* Source port for LOOKUP_RX and source VSI in case of LOOKUP_TX */
  423. __le16 src;
  424. __le32 act;
  425. /* Bit 0:1 - Action type */
  426. #define ICE_SINGLE_ACT_TYPE_S 0x00
  427. #define ICE_SINGLE_ACT_TYPE_M (0x3 << ICE_SINGLE_ACT_TYPE_S)
  428. /* Bit 2 - Loop back enable
  429. * Bit 3 - LAN enable
  430. */
  431. #define ICE_SINGLE_ACT_LB_ENABLE BIT(2)
  432. #define ICE_SINGLE_ACT_LAN_ENABLE BIT(3)
  433. /* Action type = 0 - Forward to VSI or VSI list */
  434. #define ICE_SINGLE_ACT_VSI_FORWARDING 0x0
  435. #define ICE_SINGLE_ACT_VSI_ID_S 4
  436. #define ICE_SINGLE_ACT_VSI_ID_M (0x3FF << ICE_SINGLE_ACT_VSI_ID_S)
  437. #define ICE_SINGLE_ACT_VSI_LIST_ID_S 4
  438. #define ICE_SINGLE_ACT_VSI_LIST_ID_M (0x3FF << ICE_SINGLE_ACT_VSI_LIST_ID_S)
  439. /* This bit needs to be set if action is forward to VSI list */
  440. #define ICE_SINGLE_ACT_VSI_LIST BIT(14)
  441. #define ICE_SINGLE_ACT_VALID_BIT BIT(17)
  442. #define ICE_SINGLE_ACT_DROP BIT(18)
  443. /* Action type = 1 - Forward to Queue of Queue group */
  444. #define ICE_SINGLE_ACT_TO_Q 0x1
  445. #define ICE_SINGLE_ACT_Q_INDEX_S 4
  446. #define ICE_SINGLE_ACT_Q_INDEX_M (0x7FF << ICE_SINGLE_ACT_Q_INDEX_S)
  447. #define ICE_SINGLE_ACT_Q_REGION_S 15
  448. #define ICE_SINGLE_ACT_Q_REGION_M (0x7 << ICE_SINGLE_ACT_Q_REGION_S)
  449. #define ICE_SINGLE_ACT_Q_PRIORITY BIT(18)
  450. /* Action type = 2 - Prune */
  451. #define ICE_SINGLE_ACT_PRUNE 0x2
  452. #define ICE_SINGLE_ACT_EGRESS BIT(15)
  453. #define ICE_SINGLE_ACT_INGRESS BIT(16)
  454. #define ICE_SINGLE_ACT_PRUNET BIT(17)
  455. /* Bit 18 should be set to 0 for this action */
  456. /* Action type = 2 - Pointer */
  457. #define ICE_SINGLE_ACT_PTR 0x2
  458. #define ICE_SINGLE_ACT_PTR_VAL_S 4
  459. #define ICE_SINGLE_ACT_PTR_VAL_M (0x1FFF << ICE_SINGLE_ACT_PTR_VAL_S)
  460. /* Bit 18 should be set to 1 */
  461. #define ICE_SINGLE_ACT_PTR_BIT BIT(18)
  462. /* Action type = 3 - Other actions. Last two bits
  463. * are other action identifier
  464. */
  465. #define ICE_SINGLE_ACT_OTHER_ACTS 0x3
  466. #define ICE_SINGLE_OTHER_ACT_IDENTIFIER_S 17
  467. #define ICE_SINGLE_OTHER_ACT_IDENTIFIER_M \
  468. (0x3 << \ ICE_SINGLE_OTHER_ACT_IDENTIFIER_S)
  469. /* Bit 17:18 - Defines other actions */
  470. /* Other action = 0 - Mirror VSI */
  471. #define ICE_SINGLE_OTHER_ACT_MIRROR 0
  472. #define ICE_SINGLE_ACT_MIRROR_VSI_ID_S 4
  473. #define ICE_SINGLE_ACT_MIRROR_VSI_ID_M \
  474. (0x3FF << ICE_SINGLE_ACT_MIRROR_VSI_ID_S)
  475. /* Other action = 3 - Set Stat count */
  476. #define ICE_SINGLE_OTHER_ACT_STAT_COUNT 3
  477. #define ICE_SINGLE_ACT_STAT_COUNT_INDEX_S 4
  478. #define ICE_SINGLE_ACT_STAT_COUNT_INDEX_M \
  479. (0x7F << ICE_SINGLE_ACT_STAT_COUNT_INDEX_S)
  480. __le16 index; /* The index of the rule in the lookup table */
  481. /* Length and values of the header to be matched per recipe or
  482. * lookup-type
  483. */
  484. __le16 hdr_len;
  485. u8 hdr[1];
  486. } __packed;
  487. /* Add/Update/Remove large action command/response entry
  488. * "index" is returned as part of a response to a successful Add command, and
  489. * can be used to identify the action for Update/Get/Remove commands.
  490. */
  491. struct ice_sw_rule_lg_act {
  492. __le16 index; /* Index in large action table */
  493. __le16 size;
  494. __le32 act[1]; /* array of size for actions */
  495. /* Max number of large actions */
  496. #define ICE_MAX_LG_ACT 4
  497. /* Bit 0:1 - Action type */
  498. #define ICE_LG_ACT_TYPE_S 0
  499. #define ICE_LG_ACT_TYPE_M (0x7 << ICE_LG_ACT_TYPE_S)
  500. /* Action type = 0 - Forward to VSI or VSI list */
  501. #define ICE_LG_ACT_VSI_FORWARDING 0
  502. #define ICE_LG_ACT_VSI_ID_S 3
  503. #define ICE_LG_ACT_VSI_ID_M (0x3FF << ICE_LG_ACT_VSI_ID_S)
  504. #define ICE_LG_ACT_VSI_LIST_ID_S 3
  505. #define ICE_LG_ACT_VSI_LIST_ID_M (0x3FF << ICE_LG_ACT_VSI_LIST_ID_S)
  506. /* This bit needs to be set if action is forward to VSI list */
  507. #define ICE_LG_ACT_VSI_LIST BIT(13)
  508. #define ICE_LG_ACT_VALID_BIT BIT(16)
  509. /* Action type = 1 - Forward to Queue of Queue group */
  510. #define ICE_LG_ACT_TO_Q 0x1
  511. #define ICE_LG_ACT_Q_INDEX_S 3
  512. #define ICE_LG_ACT_Q_INDEX_M (0x7FF << ICE_LG_ACT_Q_INDEX_S)
  513. #define ICE_LG_ACT_Q_REGION_S 14
  514. #define ICE_LG_ACT_Q_REGION_M (0x7 << ICE_LG_ACT_Q_REGION_S)
  515. #define ICE_LG_ACT_Q_PRIORITY_SET BIT(17)
  516. /* Action type = 2 - Prune */
  517. #define ICE_LG_ACT_PRUNE 0x2
  518. #define ICE_LG_ACT_EGRESS BIT(14)
  519. #define ICE_LG_ACT_INGRESS BIT(15)
  520. #define ICE_LG_ACT_PRUNET BIT(16)
  521. /* Action type = 3 - Mirror VSI */
  522. #define ICE_LG_OTHER_ACT_MIRROR 0x3
  523. #define ICE_LG_ACT_MIRROR_VSI_ID_S 3
  524. #define ICE_LG_ACT_MIRROR_VSI_ID_M (0x3FF << ICE_LG_ACT_MIRROR_VSI_ID_S)
  525. /* Action type = 5 - Large Action */
  526. #define ICE_LG_ACT_GENERIC 0x5
  527. #define ICE_LG_ACT_GENERIC_VALUE_S 3
  528. #define ICE_LG_ACT_GENERIC_VALUE_M (0xFFFF << ICE_LG_ACT_GENERIC_VALUE_S)
  529. #define ICE_LG_ACT_GENERIC_OFFSET_S 19
  530. #define ICE_LG_ACT_GENERIC_OFFSET_M (0x7 << ICE_LG_ACT_GENERIC_OFFSET_S)
  531. #define ICE_LG_ACT_GENERIC_PRIORITY_S 22
  532. #define ICE_LG_ACT_GENERIC_PRIORITY_M (0x7 << ICE_LG_ACT_GENERIC_PRIORITY_S)
  533. /* Action = 7 - Set Stat count */
  534. #define ICE_LG_ACT_STAT_COUNT 0x7
  535. #define ICE_LG_ACT_STAT_COUNT_S 3
  536. #define ICE_LG_ACT_STAT_COUNT_M (0x7F << ICE_LG_ACT_STAT_COUNT_S)
  537. };
  538. /* Add/Update/Remove VSI list command/response entry
  539. * "index" is returned as part of a response to a successful Add command, and
  540. * can be used to identify the VSI list for Update/Get/Remove commands.
  541. */
  542. struct ice_sw_rule_vsi_list {
  543. __le16 index; /* Index of VSI/Prune list */
  544. __le16 number_vsi;
  545. __le16 vsi[1]; /* Array of number_vsi VSI numbers */
  546. };
  547. /* Query VSI list command/response entry */
  548. struct ice_sw_rule_vsi_list_query {
  549. __le16 index;
  550. DECLARE_BITMAP(vsi_list, ICE_MAX_VSI);
  551. } __packed;
  552. /* Add switch rule response:
  553. * Content of return buffer is same as the input buffer. The status field and
  554. * LUT index are updated as part of the response
  555. */
  556. struct ice_aqc_sw_rules_elem {
  557. __le16 type; /* Switch rule type, one of T_... */
  558. #define ICE_AQC_SW_RULES_T_LKUP_RX 0x0
  559. #define ICE_AQC_SW_RULES_T_LKUP_TX 0x1
  560. #define ICE_AQC_SW_RULES_T_LG_ACT 0x2
  561. #define ICE_AQC_SW_RULES_T_VSI_LIST_SET 0x3
  562. #define ICE_AQC_SW_RULES_T_VSI_LIST_CLEAR 0x4
  563. #define ICE_AQC_SW_RULES_T_PRUNE_LIST_SET 0x5
  564. #define ICE_AQC_SW_RULES_T_PRUNE_LIST_CLEAR 0x6
  565. __le16 status;
  566. union {
  567. struct ice_sw_rule_lkup_rx_tx lkup_tx_rx;
  568. struct ice_sw_rule_lg_act lg_act;
  569. struct ice_sw_rule_vsi_list vsi_list;
  570. struct ice_sw_rule_vsi_list_query vsi_list_query;
  571. } __packed pdata;
  572. };
  573. /* Get Default Topology (indirect 0x0400) */
  574. struct ice_aqc_get_topo {
  575. u8 port_num;
  576. u8 num_branches;
  577. __le16 reserved1;
  578. __le32 reserved2;
  579. __le32 addr_high;
  580. __le32 addr_low;
  581. };
  582. /* Add TSE (indirect 0x0401)
  583. * Delete TSE (indirect 0x040F)
  584. * Move TSE (indirect 0x0408)
  585. */
  586. struct ice_aqc_add_move_delete_elem {
  587. __le16 num_grps_req;
  588. __le16 num_grps_updated;
  589. __le32 reserved;
  590. __le32 addr_high;
  591. __le32 addr_low;
  592. };
  593. struct ice_aqc_elem_info_bw {
  594. __le16 bw_profile_idx;
  595. __le16 bw_alloc;
  596. };
  597. struct ice_aqc_txsched_elem {
  598. u8 elem_type; /* Special field, reserved for some aq calls */
  599. #define ICE_AQC_ELEM_TYPE_UNDEFINED 0x0
  600. #define ICE_AQC_ELEM_TYPE_ROOT_PORT 0x1
  601. #define ICE_AQC_ELEM_TYPE_TC 0x2
  602. #define ICE_AQC_ELEM_TYPE_SE_GENERIC 0x3
  603. #define ICE_AQC_ELEM_TYPE_ENTRY_POINT 0x4
  604. #define ICE_AQC_ELEM_TYPE_LEAF 0x5
  605. #define ICE_AQC_ELEM_TYPE_SE_PADDED 0x6
  606. u8 valid_sections;
  607. #define ICE_AQC_ELEM_VALID_GENERIC BIT(0)
  608. #define ICE_AQC_ELEM_VALID_CIR BIT(1)
  609. #define ICE_AQC_ELEM_VALID_EIR BIT(2)
  610. #define ICE_AQC_ELEM_VALID_SHARED BIT(3)
  611. u8 generic;
  612. #define ICE_AQC_ELEM_GENERIC_MODE_M 0x1
  613. #define ICE_AQC_ELEM_GENERIC_PRIO_S 0x1
  614. #define ICE_AQC_ELEM_GENERIC_PRIO_M (0x7 << ICE_AQC_ELEM_GENERIC_PRIO_S)
  615. #define ICE_AQC_ELEM_GENERIC_SP_S 0x4
  616. #define ICE_AQC_ELEM_GENERIC_SP_M (0x1 << ICE_AQC_ELEM_GENERIC_SP_S)
  617. #define ICE_AQC_ELEM_GENERIC_ADJUST_VAL_S 0x5
  618. #define ICE_AQC_ELEM_GENERIC_ADJUST_VAL_M \
  619. (0x3 << ICE_AQC_ELEM_GENERIC_ADJUST_VAL_S)
  620. u8 flags; /* Special field, reserved for some aq calls */
  621. #define ICE_AQC_ELEM_FLAG_SUSPEND_M 0x1
  622. struct ice_aqc_elem_info_bw cir_bw;
  623. struct ice_aqc_elem_info_bw eir_bw;
  624. __le16 srl_id;
  625. __le16 reserved2;
  626. };
  627. struct ice_aqc_txsched_elem_data {
  628. __le32 parent_teid;
  629. __le32 node_teid;
  630. struct ice_aqc_txsched_elem data;
  631. };
  632. struct ice_aqc_txsched_topo_grp_info_hdr {
  633. __le32 parent_teid;
  634. __le16 num_elems;
  635. __le16 reserved2;
  636. };
  637. struct ice_aqc_get_topo_elem {
  638. struct ice_aqc_txsched_topo_grp_info_hdr hdr;
  639. struct ice_aqc_txsched_elem_data
  640. generic[ICE_AQC_TOPO_MAX_LEVEL_NUM];
  641. };
  642. struct ice_aqc_delete_elem {
  643. struct ice_aqc_txsched_topo_grp_info_hdr hdr;
  644. __le32 teid[1];
  645. };
  646. /* Query Scheduler Resource Allocation (indirect 0x0412)
  647. * This indirect command retrieves the scheduler resources allocated by
  648. * EMP Firmware to the given PF.
  649. */
  650. struct ice_aqc_query_txsched_res {
  651. u8 reserved[8];
  652. __le32 addr_high;
  653. __le32 addr_low;
  654. };
  655. struct ice_aqc_generic_sched_props {
  656. __le16 phys_levels;
  657. __le16 logical_levels;
  658. u8 flattening_bitmap;
  659. u8 max_device_cgds;
  660. u8 max_pf_cgds;
  661. u8 rsvd0;
  662. __le16 rdma_qsets;
  663. u8 rsvd1[22];
  664. };
  665. struct ice_aqc_layer_props {
  666. u8 logical_layer;
  667. u8 chunk_size;
  668. __le16 max_device_nodes;
  669. __le16 max_pf_nodes;
  670. u8 rsvd0[2];
  671. __le16 max_shared_rate_lmtr;
  672. __le16 max_children;
  673. __le16 max_cir_rl_profiles;
  674. __le16 max_eir_rl_profiles;
  675. __le16 max_srl_profiles;
  676. u8 rsvd1[14];
  677. };
  678. struct ice_aqc_query_txsched_res_resp {
  679. struct ice_aqc_generic_sched_props sched_props;
  680. struct ice_aqc_layer_props layer_props[ICE_AQC_TOPO_MAX_LEVEL_NUM];
  681. };
  682. /* Get PHY capabilities (indirect 0x0600) */
  683. struct ice_aqc_get_phy_caps {
  684. u8 lport_num;
  685. u8 reserved;
  686. __le16 param0;
  687. /* 18.0 - Report qualified modules */
  688. #define ICE_AQC_GET_PHY_RQM BIT(0)
  689. /* 18.1 - 18.2 : Report mode
  690. * 00b - Report NVM capabilities
  691. * 01b - Report topology capabilities
  692. * 10b - Report SW configured
  693. */
  694. #define ICE_AQC_REPORT_MODE_S 1
  695. #define ICE_AQC_REPORT_MODE_M (3 << ICE_AQC_REPORT_MODE_S)
  696. #define ICE_AQC_REPORT_NVM_CAP 0
  697. #define ICE_AQC_REPORT_TOPO_CAP BIT(1)
  698. #define ICE_AQC_REPORT_SW_CFG BIT(2)
  699. __le32 reserved1;
  700. __le32 addr_high;
  701. __le32 addr_low;
  702. };
  703. /* This is #define of PHY type (Extended):
  704. * The first set of defines is for phy_type_low.
  705. */
  706. #define ICE_PHY_TYPE_LOW_100BASE_TX BIT_ULL(0)
  707. #define ICE_PHY_TYPE_LOW_100M_SGMII BIT_ULL(1)
  708. #define ICE_PHY_TYPE_LOW_1000BASE_T BIT_ULL(2)
  709. #define ICE_PHY_TYPE_LOW_1000BASE_SX BIT_ULL(3)
  710. #define ICE_PHY_TYPE_LOW_1000BASE_LX BIT_ULL(4)
  711. #define ICE_PHY_TYPE_LOW_1000BASE_KX BIT_ULL(5)
  712. #define ICE_PHY_TYPE_LOW_1G_SGMII BIT_ULL(6)
  713. #define ICE_PHY_TYPE_LOW_2500BASE_T BIT_ULL(7)
  714. #define ICE_PHY_TYPE_LOW_2500BASE_X BIT_ULL(8)
  715. #define ICE_PHY_TYPE_LOW_2500BASE_KX BIT_ULL(9)
  716. #define ICE_PHY_TYPE_LOW_5GBASE_T BIT_ULL(10)
  717. #define ICE_PHY_TYPE_LOW_5GBASE_KR BIT_ULL(11)
  718. #define ICE_PHY_TYPE_LOW_10GBASE_T BIT_ULL(12)
  719. #define ICE_PHY_TYPE_LOW_10G_SFI_DA BIT_ULL(13)
  720. #define ICE_PHY_TYPE_LOW_10GBASE_SR BIT_ULL(14)
  721. #define ICE_PHY_TYPE_LOW_10GBASE_LR BIT_ULL(15)
  722. #define ICE_PHY_TYPE_LOW_10GBASE_KR_CR1 BIT_ULL(16)
  723. #define ICE_PHY_TYPE_LOW_10G_SFI_AOC_ACC BIT_ULL(17)
  724. #define ICE_PHY_TYPE_LOW_10G_SFI_C2C BIT_ULL(18)
  725. #define ICE_PHY_TYPE_LOW_25GBASE_T BIT_ULL(19)
  726. #define ICE_PHY_TYPE_LOW_25GBASE_CR BIT_ULL(20)
  727. #define ICE_PHY_TYPE_LOW_25GBASE_CR_S BIT_ULL(21)
  728. #define ICE_PHY_TYPE_LOW_25GBASE_CR1 BIT_ULL(22)
  729. #define ICE_PHY_TYPE_LOW_25GBASE_SR BIT_ULL(23)
  730. #define ICE_PHY_TYPE_LOW_25GBASE_LR BIT_ULL(24)
  731. #define ICE_PHY_TYPE_LOW_25GBASE_KR BIT_ULL(25)
  732. #define ICE_PHY_TYPE_LOW_25GBASE_KR_S BIT_ULL(26)
  733. #define ICE_PHY_TYPE_LOW_25GBASE_KR1 BIT_ULL(27)
  734. #define ICE_PHY_TYPE_LOW_25G_AUI_AOC_ACC BIT_ULL(28)
  735. #define ICE_PHY_TYPE_LOW_25G_AUI_C2C BIT_ULL(29)
  736. #define ICE_PHY_TYPE_LOW_40GBASE_CR4 BIT_ULL(30)
  737. #define ICE_PHY_TYPE_LOW_40GBASE_SR4 BIT_ULL(31)
  738. #define ICE_PHY_TYPE_LOW_40GBASE_LR4 BIT_ULL(32)
  739. #define ICE_PHY_TYPE_LOW_40GBASE_KR4 BIT_ULL(33)
  740. #define ICE_PHY_TYPE_LOW_40G_XLAUI_AOC_ACC BIT_ULL(34)
  741. #define ICE_PHY_TYPE_LOW_40G_XLAUI BIT_ULL(35)
  742. #define ICE_PHY_TYPE_LOW_MAX_INDEX 63
  743. struct ice_aqc_get_phy_caps_data {
  744. __le64 phy_type_low; /* Use values from ICE_PHY_TYPE_LOW_* */
  745. __le64 reserved;
  746. u8 caps;
  747. #define ICE_AQC_PHY_EN_TX_LINK_PAUSE BIT(0)
  748. #define ICE_AQC_PHY_EN_RX_LINK_PAUSE BIT(1)
  749. #define ICE_AQC_PHY_LOW_POWER_MODE BIT(2)
  750. #define ICE_AQC_PHY_EN_LINK BIT(3)
  751. #define ICE_AQC_PHY_AN_MODE BIT(4)
  752. #define ICE_AQC_GET_PHY_EN_MOD_QUAL BIT(5)
  753. u8 low_power_ctrl;
  754. #define ICE_AQC_PHY_EN_D3COLD_LOW_POWER_AUTONEG BIT(0)
  755. __le16 eee_cap;
  756. #define ICE_AQC_PHY_EEE_EN_100BASE_TX BIT(0)
  757. #define ICE_AQC_PHY_EEE_EN_1000BASE_T BIT(1)
  758. #define ICE_AQC_PHY_EEE_EN_10GBASE_T BIT(2)
  759. #define ICE_AQC_PHY_EEE_EN_1000BASE_KX BIT(3)
  760. #define ICE_AQC_PHY_EEE_EN_10GBASE_KR BIT(4)
  761. #define ICE_AQC_PHY_EEE_EN_25GBASE_KR BIT(5)
  762. #define ICE_AQC_PHY_EEE_EN_40GBASE_KR4 BIT(6)
  763. __le16 eeer_value;
  764. u8 phy_id_oui[4]; /* PHY/Module ID connected on the port */
  765. u8 link_fec_options;
  766. #define ICE_AQC_PHY_FEC_10G_KR_40G_KR4_EN BIT(0)
  767. #define ICE_AQC_PHY_FEC_10G_KR_40G_KR4_REQ BIT(1)
  768. #define ICE_AQC_PHY_FEC_25G_RS_528_REQ BIT(2)
  769. #define ICE_AQC_PHY_FEC_25G_KR_REQ BIT(3)
  770. #define ICE_AQC_PHY_FEC_25G_RS_544_REQ BIT(4)
  771. #define ICE_AQC_PHY_FEC_25G_RS_CLAUSE91_EN BIT(6)
  772. #define ICE_AQC_PHY_FEC_25G_KR_CLAUSE74_EN BIT(7)
  773. u8 extended_compliance_code;
  774. #define ICE_MODULE_TYPE_TOTAL_BYTE 3
  775. u8 module_type[ICE_MODULE_TYPE_TOTAL_BYTE];
  776. #define ICE_AQC_MOD_TYPE_BYTE0_SFP_PLUS 0xA0
  777. #define ICE_AQC_MOD_TYPE_BYTE0_QSFP_PLUS 0x80
  778. #define ICE_AQC_MOD_TYPE_BYTE1_SFP_PLUS_CU_PASSIVE BIT(0)
  779. #define ICE_AQC_MOD_TYPE_BYTE1_SFP_PLUS_CU_ACTIVE BIT(1)
  780. #define ICE_AQC_MOD_TYPE_BYTE1_10G_BASE_SR BIT(4)
  781. #define ICE_AQC_MOD_TYPE_BYTE1_10G_BASE_LR BIT(5)
  782. #define ICE_AQC_MOD_TYPE_BYTE1_10G_BASE_LRM BIT(6)
  783. #define ICE_AQC_MOD_TYPE_BYTE1_10G_BASE_ER BIT(7)
  784. #define ICE_AQC_MOD_TYPE_BYTE2_SFP_PLUS 0xA0
  785. #define ICE_AQC_MOD_TYPE_BYTE2_QSFP_PLUS 0x86
  786. u8 qualified_module_count;
  787. #define ICE_AQC_QUAL_MOD_COUNT_MAX 16
  788. struct {
  789. u8 v_oui[3];
  790. u8 rsvd1;
  791. u8 v_part[16];
  792. __le32 v_rev;
  793. __le64 rsvd8;
  794. } qual_modules[ICE_AQC_QUAL_MOD_COUNT_MAX];
  795. };
  796. /* Get link status (indirect 0x0607), also used for Link Status Event */
  797. struct ice_aqc_get_link_status {
  798. u8 lport_num;
  799. u8 reserved;
  800. __le16 cmd_flags;
  801. #define ICE_AQ_LSE_M 0x3
  802. #define ICE_AQ_LSE_NOP 0x0
  803. #define ICE_AQ_LSE_DIS 0x2
  804. #define ICE_AQ_LSE_ENA 0x3
  805. /* only response uses this flag */
  806. #define ICE_AQ_LSE_IS_ENABLED 0x1
  807. __le32 reserved2;
  808. __le32 addr_high;
  809. __le32 addr_low;
  810. };
  811. /* Get link status response data structure, also used for Link Status Event */
  812. struct ice_aqc_get_link_status_data {
  813. u8 topo_media_conflict;
  814. #define ICE_AQ_LINK_TOPO_CONFLICT BIT(0)
  815. #define ICE_AQ_LINK_MEDIA_CONFLICT BIT(1)
  816. #define ICE_AQ_LINK_TOPO_CORRUPT BIT(2)
  817. u8 reserved1;
  818. u8 link_info;
  819. #define ICE_AQ_LINK_UP BIT(0) /* Link Status */
  820. #define ICE_AQ_LINK_FAULT BIT(1)
  821. #define ICE_AQ_LINK_FAULT_TX BIT(2)
  822. #define ICE_AQ_LINK_FAULT_RX BIT(3)
  823. #define ICE_AQ_LINK_FAULT_REMOTE BIT(4)
  824. #define ICE_AQ_LINK_UP_PORT BIT(5) /* External Port Link Status */
  825. #define ICE_AQ_MEDIA_AVAILABLE BIT(6)
  826. #define ICE_AQ_SIGNAL_DETECT BIT(7)
  827. u8 an_info;
  828. #define ICE_AQ_AN_COMPLETED BIT(0)
  829. #define ICE_AQ_LP_AN_ABILITY BIT(1)
  830. #define ICE_AQ_PD_FAULT BIT(2) /* Parallel Detection Fault */
  831. #define ICE_AQ_FEC_EN BIT(3)
  832. #define ICE_AQ_PHY_LOW_POWER BIT(4) /* Low Power State */
  833. #define ICE_AQ_LINK_PAUSE_TX BIT(5)
  834. #define ICE_AQ_LINK_PAUSE_RX BIT(6)
  835. #define ICE_AQ_QUALIFIED_MODULE BIT(7)
  836. u8 ext_info;
  837. #define ICE_AQ_LINK_PHY_TEMP_ALARM BIT(0)
  838. #define ICE_AQ_LINK_EXCESSIVE_ERRORS BIT(1) /* Excessive Link Errors */
  839. /* Port TX Suspended */
  840. #define ICE_AQ_LINK_TX_S 2
  841. #define ICE_AQ_LINK_TX_M (0x03 << ICE_AQ_LINK_TX_S)
  842. #define ICE_AQ_LINK_TX_ACTIVE 0
  843. #define ICE_AQ_LINK_TX_DRAINED 1
  844. #define ICE_AQ_LINK_TX_FLUSHED 3
  845. u8 reserved2;
  846. __le16 max_frame_size;
  847. u8 cfg;
  848. #define ICE_AQ_LINK_25G_KR_FEC_EN BIT(0)
  849. #define ICE_AQ_LINK_25G_RS_528_FEC_EN BIT(1)
  850. #define ICE_AQ_LINK_25G_RS_544_FEC_EN BIT(2)
  851. /* Pacing Config */
  852. #define ICE_AQ_CFG_PACING_S 3
  853. #define ICE_AQ_CFG_PACING_M (0xF << ICE_AQ_CFG_PACING_S)
  854. #define ICE_AQ_CFG_PACING_TYPE_M BIT(7)
  855. #define ICE_AQ_CFG_PACING_TYPE_AVG 0
  856. #define ICE_AQ_CFG_PACING_TYPE_FIXED ICE_AQ_CFG_PACING_TYPE_M
  857. /* External Device Power Ability */
  858. u8 power_desc;
  859. #define ICE_AQ_PWR_CLASS_M 0x3
  860. #define ICE_AQ_LINK_PWR_BASET_LOW_HIGH 0
  861. #define ICE_AQ_LINK_PWR_BASET_HIGH 1
  862. #define ICE_AQ_LINK_PWR_QSFP_CLASS_1 0
  863. #define ICE_AQ_LINK_PWR_QSFP_CLASS_2 1
  864. #define ICE_AQ_LINK_PWR_QSFP_CLASS_3 2
  865. #define ICE_AQ_LINK_PWR_QSFP_CLASS_4 3
  866. __le16 link_speed;
  867. #define ICE_AQ_LINK_SPEED_10MB BIT(0)
  868. #define ICE_AQ_LINK_SPEED_100MB BIT(1)
  869. #define ICE_AQ_LINK_SPEED_1000MB BIT(2)
  870. #define ICE_AQ_LINK_SPEED_2500MB BIT(3)
  871. #define ICE_AQ_LINK_SPEED_5GB BIT(4)
  872. #define ICE_AQ_LINK_SPEED_10GB BIT(5)
  873. #define ICE_AQ_LINK_SPEED_20GB BIT(6)
  874. #define ICE_AQ_LINK_SPEED_25GB BIT(7)
  875. #define ICE_AQ_LINK_SPEED_40GB BIT(8)
  876. #define ICE_AQ_LINK_SPEED_UNKNOWN BIT(15)
  877. __le32 reserved3; /* Aligns next field to 8-byte boundary */
  878. __le64 phy_type_low; /* Use values from ICE_PHY_TYPE_LOW_* */
  879. __le64 reserved4;
  880. };
  881. /* NVM Read command (indirect 0x0701)
  882. * NVM Erase commands (direct 0x0702)
  883. * NVM Update commands (indirect 0x0703)
  884. */
  885. struct ice_aqc_nvm {
  886. u8 cmd_flags;
  887. #define ICE_AQC_NVM_LAST_CMD BIT(0)
  888. #define ICE_AQC_NVM_PCIR_REQ BIT(0) /* Used by NVM Update reply */
  889. #define ICE_AQC_NVM_PRESERVATION_S 1
  890. #define ICE_AQC_NVM_PRESERVATION_M (3 << CSR_AQ_NVM_PRESERVATION_S)
  891. #define ICE_AQC_NVM_NO_PRESERVATION (0 << CSR_AQ_NVM_PRESERVATION_S)
  892. #define ICE_AQC_NVM_PRESERVE_ALL BIT(1)
  893. #define ICE_AQC_NVM_PRESERVE_SELECTED (3 << CSR_AQ_NVM_PRESERVATION_S)
  894. #define ICE_AQC_NVM_FLASH_ONLY BIT(7)
  895. u8 module_typeid;
  896. __le16 length;
  897. #define ICE_AQC_NVM_ERASE_LEN 0xFFFF
  898. __le32 offset;
  899. __le32 addr_high;
  900. __le32 addr_low;
  901. };
  902. /* Get/Set RSS key (indirect 0x0B04/0x0B02) */
  903. struct ice_aqc_get_set_rss_key {
  904. #define ICE_AQC_GSET_RSS_KEY_VSI_VALID BIT(15)
  905. #define ICE_AQC_GSET_RSS_KEY_VSI_ID_S 0
  906. #define ICE_AQC_GSET_RSS_KEY_VSI_ID_M (0x3FF << ICE_AQC_GSET_RSS_KEY_VSI_ID_S)
  907. __le16 vsi_id;
  908. u8 reserved[6];
  909. __le32 addr_high;
  910. __le32 addr_low;
  911. };
  912. #define ICE_AQC_GET_SET_RSS_KEY_DATA_RSS_KEY_SIZE 0x28
  913. #define ICE_AQC_GET_SET_RSS_KEY_DATA_HASH_KEY_SIZE 0xC
  914. struct ice_aqc_get_set_rss_keys {
  915. u8 standard_rss_key[ICE_AQC_GET_SET_RSS_KEY_DATA_RSS_KEY_SIZE];
  916. u8 extended_hash_key[ICE_AQC_GET_SET_RSS_KEY_DATA_HASH_KEY_SIZE];
  917. };
  918. /* Get/Set RSS LUT (indirect 0x0B05/0x0B03) */
  919. struct ice_aqc_get_set_rss_lut {
  920. #define ICE_AQC_GSET_RSS_LUT_VSI_VALID BIT(15)
  921. #define ICE_AQC_GSET_RSS_LUT_VSI_ID_S 0
  922. #define ICE_AQC_GSET_RSS_LUT_VSI_ID_M (0x1FF << ICE_AQC_GSET_RSS_LUT_VSI_ID_S)
  923. __le16 vsi_id;
  924. #define ICE_AQC_GSET_RSS_LUT_TABLE_TYPE_S 0
  925. #define ICE_AQC_GSET_RSS_LUT_TABLE_TYPE_M \
  926. (0x3 << ICE_AQC_GSET_RSS_LUT_TABLE_TYPE_S)
  927. #define ICE_AQC_GSET_RSS_LUT_TABLE_TYPE_VSI 0
  928. #define ICE_AQC_GSET_RSS_LUT_TABLE_TYPE_PF 1
  929. #define ICE_AQC_GSET_RSS_LUT_TABLE_TYPE_GLOBAL 2
  930. #define ICE_AQC_GSET_RSS_LUT_TABLE_SIZE_S 2
  931. #define ICE_AQC_GSET_RSS_LUT_TABLE_SIZE_M \
  932. (0x3 << ICE_AQC_GSET_RSS_LUT_TABLE_SIZE_S)
  933. #define ICE_AQC_GSET_RSS_LUT_TABLE_SIZE_128 128
  934. #define ICE_AQC_GSET_RSS_LUT_TABLE_SIZE_128_FLAG 0
  935. #define ICE_AQC_GSET_RSS_LUT_TABLE_SIZE_512 512
  936. #define ICE_AQC_GSET_RSS_LUT_TABLE_SIZE_512_FLAG 1
  937. #define ICE_AQC_GSET_RSS_LUT_TABLE_SIZE_2K 2048
  938. #define ICE_AQC_GSET_RSS_LUT_TABLE_SIZE_2K_FLAG 2
  939. #define ICE_AQC_GSET_RSS_LUT_GLOBAL_IDX_S 4
  940. #define ICE_AQC_GSET_RSS_LUT_GLOBAL_IDX_M \
  941. (0xF << ICE_AQC_GSET_RSS_LUT_GLOBAL_IDX_S)
  942. __le16 flags;
  943. __le32 reserved;
  944. __le32 addr_high;
  945. __le32 addr_low;
  946. };
  947. /* Add TX LAN Queues (indirect 0x0C30) */
  948. struct ice_aqc_add_txqs {
  949. u8 num_qgrps;
  950. u8 reserved[3];
  951. __le32 reserved1;
  952. __le32 addr_high;
  953. __le32 addr_low;
  954. };
  955. /* This is the descriptor of each queue entry for the Add TX LAN Queues
  956. * command (0x0C30). Only used within struct ice_aqc_add_tx_qgrp.
  957. */
  958. struct ice_aqc_add_txqs_perq {
  959. __le16 txq_id;
  960. u8 rsvd[2];
  961. __le32 q_teid;
  962. u8 txq_ctx[22];
  963. u8 rsvd2[2];
  964. struct ice_aqc_txsched_elem info;
  965. };
  966. /* The format of the command buffer for Add TX LAN Queues (0x0C30)
  967. * is an array of the following structs. Please note that the length of
  968. * each struct ice_aqc_add_tx_qgrp is variable due
  969. * to the variable number of queues in each group!
  970. */
  971. struct ice_aqc_add_tx_qgrp {
  972. __le32 parent_teid;
  973. u8 num_txqs;
  974. u8 rsvd[3];
  975. struct ice_aqc_add_txqs_perq txqs[1];
  976. };
  977. /* Disable TX LAN Queues (indirect 0x0C31) */
  978. struct ice_aqc_dis_txqs {
  979. u8 cmd_type;
  980. #define ICE_AQC_Q_DIS_CMD_S 0
  981. #define ICE_AQC_Q_DIS_CMD_M (0x3 << ICE_AQC_Q_DIS_CMD_S)
  982. #define ICE_AQC_Q_DIS_CMD_NO_FUNC_RESET (0 << ICE_AQC_Q_DIS_CMD_S)
  983. #define ICE_AQC_Q_DIS_CMD_VM_RESET BIT(ICE_AQC_Q_DIS_CMD_S)
  984. #define ICE_AQC_Q_DIS_CMD_VF_RESET (2 << ICE_AQC_Q_DIS_CMD_S)
  985. #define ICE_AQC_Q_DIS_CMD_PF_RESET (3 << ICE_AQC_Q_DIS_CMD_S)
  986. #define ICE_AQC_Q_DIS_CMD_SUBSEQ_CALL BIT(2)
  987. #define ICE_AQC_Q_DIS_CMD_FLUSH_PIPE BIT(3)
  988. u8 num_entries;
  989. __le16 vmvf_and_timeout;
  990. #define ICE_AQC_Q_DIS_VMVF_NUM_S 0
  991. #define ICE_AQC_Q_DIS_VMVF_NUM_M (0x3FF << ICE_AQC_Q_DIS_VMVF_NUM_S)
  992. #define ICE_AQC_Q_DIS_TIMEOUT_S 10
  993. #define ICE_AQC_Q_DIS_TIMEOUT_M (0x3F << ICE_AQC_Q_DIS_TIMEOUT_S)
  994. __le32 blocked_cgds;
  995. __le32 addr_high;
  996. __le32 addr_low;
  997. };
  998. /* The buffer for Disable TX LAN Queues (indirect 0x0C31)
  999. * contains the following structures, arrayed one after the
  1000. * other.
  1001. * Note: Since the q_id is 16 bits wide, if the
  1002. * number of queues is even, then 2 bytes of alignment MUST be
  1003. * added before the start of the next group, to allow correct
  1004. * alignment of the parent_teid field.
  1005. */
  1006. struct ice_aqc_dis_txq_item {
  1007. __le32 parent_teid;
  1008. u8 num_qs;
  1009. u8 rsvd;
  1010. /* The length of the q_id array varies according to num_qs */
  1011. __le16 q_id[1];
  1012. /* This only applies from F8 onward */
  1013. #define ICE_AQC_Q_DIS_BUF_ELEM_TYPE_S 15
  1014. #define ICE_AQC_Q_DIS_BUF_ELEM_TYPE_LAN_Q \
  1015. (0 << ICE_AQC_Q_DIS_BUF_ELEM_TYPE_S)
  1016. #define ICE_AQC_Q_DIS_BUF_ELEM_TYPE_RDMA_QSET \
  1017. (1 << ICE_AQC_Q_DIS_BUF_ELEM_TYPE_S)
  1018. };
  1019. struct ice_aqc_dis_txq {
  1020. struct ice_aqc_dis_txq_item qgrps[1];
  1021. };
  1022. /**
  1023. * struct ice_aq_desc - Admin Queue (AQ) descriptor
  1024. * @flags: ICE_AQ_FLAG_* flags
  1025. * @opcode: AQ command opcode
  1026. * @datalen: length in bytes of indirect/external data buffer
  1027. * @retval: return value from firmware
  1028. * @cookie_h: opaque data high-half
  1029. * @cookie_l: opaque data low-half
  1030. * @params: command-specific parameters
  1031. *
  1032. * Descriptor format for commands the driver posts on the Admin Transmit Queue
  1033. * (ATQ). The firmware writes back onto the command descriptor and returns
  1034. * the result of the command. Asynchronous events that are not an immediate
  1035. * result of the command are written to the Admin Receive Queue (ARQ) using
  1036. * the same descriptor format. Descriptors are in little-endian notation with
  1037. * 32-bit words.
  1038. */
  1039. struct ice_aq_desc {
  1040. __le16 flags;
  1041. __le16 opcode;
  1042. __le16 datalen;
  1043. __le16 retval;
  1044. __le32 cookie_high;
  1045. __le32 cookie_low;
  1046. union {
  1047. u8 raw[16];
  1048. struct ice_aqc_generic generic;
  1049. struct ice_aqc_get_ver get_ver;
  1050. struct ice_aqc_q_shutdown q_shutdown;
  1051. struct ice_aqc_req_res res_owner;
  1052. struct ice_aqc_manage_mac_read mac_read;
  1053. struct ice_aqc_clear_pxe clear_pxe;
  1054. struct ice_aqc_list_caps get_cap;
  1055. struct ice_aqc_get_phy_caps get_phy;
  1056. struct ice_aqc_get_sw_cfg get_sw_conf;
  1057. struct ice_aqc_sw_rules sw_rules;
  1058. struct ice_aqc_get_topo get_topo;
  1059. struct ice_aqc_query_txsched_res query_sched_res;
  1060. struct ice_aqc_add_move_delete_elem add_move_delete_elem;
  1061. struct ice_aqc_nvm nvm;
  1062. struct ice_aqc_get_set_rss_lut get_set_rss_lut;
  1063. struct ice_aqc_get_set_rss_key get_set_rss_key;
  1064. struct ice_aqc_add_txqs add_txqs;
  1065. struct ice_aqc_dis_txqs dis_txqs;
  1066. struct ice_aqc_add_get_update_free_vsi vsi_cmd;
  1067. struct ice_aqc_alloc_free_res_cmd sw_res_ctrl;
  1068. struct ice_aqc_get_link_status get_link_status;
  1069. } params;
  1070. };
  1071. /* FW defined boundary for a large buffer, 4k >= Large buffer > 512 bytes */
  1072. #define ICE_AQ_LG_BUF 512
  1073. #define ICE_AQ_FLAG_ERR_S 2
  1074. #define ICE_AQ_FLAG_LB_S 9
  1075. #define ICE_AQ_FLAG_RD_S 10
  1076. #define ICE_AQ_FLAG_BUF_S 12
  1077. #define ICE_AQ_FLAG_SI_S 13
  1078. #define ICE_AQ_FLAG_ERR BIT(ICE_AQ_FLAG_ERR_S) /* 0x4 */
  1079. #define ICE_AQ_FLAG_LB BIT(ICE_AQ_FLAG_LB_S) /* 0x200 */
  1080. #define ICE_AQ_FLAG_RD BIT(ICE_AQ_FLAG_RD_S) /* 0x400 */
  1081. #define ICE_AQ_FLAG_BUF BIT(ICE_AQ_FLAG_BUF_S) /* 0x1000 */
  1082. #define ICE_AQ_FLAG_SI BIT(ICE_AQ_FLAG_SI_S) /* 0x2000 */
  1083. /* error codes */
  1084. enum ice_aq_err {
  1085. ICE_AQ_RC_OK = 0, /* success */
  1086. ICE_AQ_RC_ENOMEM = 9, /* Out of memory */
  1087. ICE_AQ_RC_EBUSY = 12, /* Device or resource busy */
  1088. ICE_AQ_RC_EEXIST = 13, /* object already exists */
  1089. };
  1090. /* Admin Queue command opcodes */
  1091. enum ice_adminq_opc {
  1092. /* AQ commands */
  1093. ice_aqc_opc_get_ver = 0x0001,
  1094. ice_aqc_opc_q_shutdown = 0x0003,
  1095. /* resource ownership */
  1096. ice_aqc_opc_req_res = 0x0008,
  1097. ice_aqc_opc_release_res = 0x0009,
  1098. /* device/function capabilities */
  1099. ice_aqc_opc_list_func_caps = 0x000A,
  1100. ice_aqc_opc_list_dev_caps = 0x000B,
  1101. /* manage MAC address */
  1102. ice_aqc_opc_manage_mac_read = 0x0107,
  1103. /* PXE */
  1104. ice_aqc_opc_clear_pxe_mode = 0x0110,
  1105. /* internal switch commands */
  1106. ice_aqc_opc_get_sw_cfg = 0x0200,
  1107. /* Alloc/Free/Get Resources */
  1108. ice_aqc_opc_alloc_res = 0x0208,
  1109. ice_aqc_opc_free_res = 0x0209,
  1110. /* VSI commands */
  1111. ice_aqc_opc_add_vsi = 0x0210,
  1112. ice_aqc_opc_update_vsi = 0x0211,
  1113. ice_aqc_opc_free_vsi = 0x0213,
  1114. /* switch rules population commands */
  1115. ice_aqc_opc_add_sw_rules = 0x02A0,
  1116. ice_aqc_opc_update_sw_rules = 0x02A1,
  1117. ice_aqc_opc_remove_sw_rules = 0x02A2,
  1118. ice_aqc_opc_clear_pf_cfg = 0x02A4,
  1119. /* transmit scheduler commands */
  1120. ice_aqc_opc_get_dflt_topo = 0x0400,
  1121. ice_aqc_opc_delete_sched_elems = 0x040F,
  1122. ice_aqc_opc_query_sched_res = 0x0412,
  1123. /* PHY commands */
  1124. ice_aqc_opc_get_phy_caps = 0x0600,
  1125. ice_aqc_opc_get_link_status = 0x0607,
  1126. /* NVM commands */
  1127. ice_aqc_opc_nvm_read = 0x0701,
  1128. /* RSS commands */
  1129. ice_aqc_opc_set_rss_key = 0x0B02,
  1130. ice_aqc_opc_set_rss_lut = 0x0B03,
  1131. ice_aqc_opc_get_rss_key = 0x0B04,
  1132. ice_aqc_opc_get_rss_lut = 0x0B05,
  1133. /* TX queue handling commands/events */
  1134. ice_aqc_opc_add_txqs = 0x0C30,
  1135. ice_aqc_opc_dis_txqs = 0x0C31,
  1136. };
  1137. #endif /* _ICE_ADMINQ_CMD_H_ */