xref: /freebsd/sys/dev/qlnx/qlnxe/ecore_vfpf_if.h (revision 95ee2897)
1 /*
2  * Copyright (c) 2017-2018 Cavium, Inc.
3  * All rights reserved.
4  *
5  *  Redistribution and use in source and binary forms, with or without
6  *  modification, are permitted provided that the following conditions
7  *  are met:
8  *
9  *  1. Redistributions of source code must retain the above copyright
10  *     notice, this list of conditions and the following disclaimer.
11  *  2. Redistributions in binary form must reproduce the above copyright
12  *     notice, this list of conditions and the following disclaimer in the
13  *     documentation and/or other materials provided with the distribution.
14  *
15  *  THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
16  *  AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
17  *  IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
18  *  ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE
19  *  LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
20  *  CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
21  *  SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
22  *  INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
23  *  CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
24  *  ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
25  *  POSSIBILITY OF SUCH DAMAGE.
26  *
27  */
28 
29 #ifndef __ECORE_VF_PF_IF_H__
30 #define __ECORE_VF_PF_IF_H__
31 
32 #define T_ETH_INDIRECTION_TABLE_SIZE 128 /* @@@ TBD MichalK this should be HSI? */
33 #define T_ETH_RSS_KEY_SIZE 10 /* @@@ TBD this should be HSI? */
34 #ifndef LINUX_REMOVE
35 #ifndef ETH_ALEN
36 #define ETH_ALEN 6 /* @@@ TBD MichalK - should this be defined here?*/
37 #endif
38 #endif
39 
40 /***********************************************
41  *
42  * Common definitions for all HVs
43  *
44  **/
45 struct vf_pf_resc_request {
46 	u8 num_rxqs;
47 	u8 num_txqs;
48 	u8 num_sbs;
49 	u8 num_mac_filters;
50 	u8 num_vlan_filters;
51 	u8 num_mc_filters; /* No limit  so superfluous */
52 	u8 num_cids;
53 	u8 padding;
54 };
55 
56 struct hw_sb_info {
57 	u16 hw_sb_id;    /* aka absolute igu id, used to ack the sb */
58 	u8 sb_qid;      /* used to update DHC for sb */
59 	u8 padding[5];
60 };
61 
62 /***********************************************
63  *
64  * HW VF-PF channel definitions
65  *
66  * A.K.A VF-PF mailbox
67  *
68  **/
69 #define TLV_BUFFER_SIZE 		1024
70 
71 /* vf pf channel tlvs */
72 /* general tlv header (used for both vf->pf request and pf->vf response) */
73 struct channel_tlv {
74 	u16 type;
75 	u16 length;
76 };
77 
78 /* header of first vf->pf tlv carries the offset used to calculate reponse
79  * buffer address
80  */
81 struct vfpf_first_tlv {
82 	struct channel_tlv tl;
83 	u32 padding;
84 	u64 reply_address;
85 };
86 
87 /* header of pf->vf tlvs, carries the status of handling the request */
88 struct pfvf_tlv {
89 	struct channel_tlv tl;
90 	u8 status;
91 	u8 padding[3];
92 };
93 
94 /* response tlv used for most tlvs */
95 struct pfvf_def_resp_tlv {
96 	struct pfvf_tlv hdr;
97 };
98 
99 /* used to terminate and pad a tlv list */
100 struct channel_list_end_tlv {
101 	struct channel_tlv tl;
102 	u8 padding[4];
103 };
104 
105 /* Acquire */
106 struct vfpf_acquire_tlv {
107 	struct vfpf_first_tlv first_tlv;
108 
109 	struct vf_pf_vfdev_info {
110 #ifndef LINUX_REMOVE
111 	/* First bit was used on 8.7.x and 8.8.x versions, which had different
112 	 * FWs used but with the same faspath HSI. As this was prior to the
113 	 * fastpath versioning, wanted to have ability to override fw matching
114 	 * and allow them to interact.
115 	 */
116 #endif
117 #define VFPF_ACQUIRE_CAP_PRE_FP_HSI	(1 << 0) /* VF pre-FP hsi version */
118 #define VFPF_ACQUIRE_CAP_100G		(1 << 1) /* VF can support 100g */
119 
120 	/* A requirement for supporting multi-Tx queues on a single queue-zone,
121 	 * VF would pass qids as additional information whenever passing queue
122 	 * references.
123 	 * TODO - due to the CID limitations in Bar0, VFs currently don't pass
124 	 * this, and use the legacy CID scheme.
125 	 */
126 #define VFPF_ACQUIRE_CAP_QUEUE_QIDS	(1 << 2)
127 
128 	/* The VF is using the physical bar. While this is mostly internal
129 	 * to the VF, might affect the number of CIDs supported assuming
130 	 * QUEUE_QIDS is set.
131 	 */
132 #define VFPF_ACQUIRE_CAP_PHYSICAL_BAR	(1 << 3)
133 		u64 capabilities;
134 		u8 fw_major;
135 		u8 fw_minor;
136 		u8 fw_revision;
137 		u8 fw_engineering;
138 		u32 driver_version;
139 		u16 opaque_fid; /* ME register value */
140 		u8 os_type; /* VFPF_ACQUIRE_OS_* value */
141 		u8 eth_fp_hsi_major;
142 		u8 eth_fp_hsi_minor;
143 		u8 padding[3];
144 	} vfdev_info;
145 
146 	struct vf_pf_resc_request resc_request;
147 
148 	u64 bulletin_addr;
149 	u32 bulletin_size;
150 	u32 padding;
151 };
152 
153 /* receive side scaling tlv */
154 struct vfpf_vport_update_rss_tlv {
155 	struct channel_tlv	tl;
156 
157 	u8 update_rss_flags;
158 	#define VFPF_UPDATE_RSS_CONFIG_FLAG	  (1 << 0)
159 	#define VFPF_UPDATE_RSS_CAPS_FLAG	  (1 << 1)
160 	#define VFPF_UPDATE_RSS_IND_TABLE_FLAG	  (1 << 2)
161 	#define VFPF_UPDATE_RSS_KEY_FLAG	  (1 << 3)
162 
163 	u8 rss_enable;
164 	u8 rss_caps;
165 	u8 rss_table_size_log; /* The table size is 2 ^ rss_table_size_log */
166 	u16 rss_ind_table[T_ETH_INDIRECTION_TABLE_SIZE];
167 	u32 rss_key[T_ETH_RSS_KEY_SIZE];
168 };
169 
170 struct pfvf_storm_stats {
171 	u32 address;
172 	u32 len;
173 };
174 
175 struct pfvf_stats_info {
176 	struct pfvf_storm_stats mstats;
177 	struct pfvf_storm_stats pstats;
178 	struct pfvf_storm_stats tstats;
179 	struct pfvf_storm_stats ustats;
180 };
181 
182 /* acquire response tlv - carries the allocated resources */
183 struct pfvf_acquire_resp_tlv {
184 	struct pfvf_tlv hdr;
185 
186 	struct pf_vf_pfdev_info {
187 		u32 chip_num;
188 		u32 mfw_ver;
189 
190 		u16 fw_major;
191 		u16 fw_minor;
192 		u16 fw_rev;
193 		u16 fw_eng;
194 
195 		u64 capabilities;
196 #define PFVF_ACQUIRE_CAP_DEFAULT_UNTAGGED	(1 << 0)
197 #define PFVF_ACQUIRE_CAP_100G			(1 << 1) /* If set, 100g PF */
198 /* There are old PF versions where the PF might mistakenly override the sanity
199  * mechanism [version-based] and allow a VF that can't be supported to pass
200  * the acquisition phase.
201  * To overcome this, PFs now indicate that they're past that point and the new
202  * VFs would fail probe on the older PFs that fail to do so.
203  */
204 #ifndef LINUX_REMOVE
205 /* Said bug was in quest/serpens; Can't be certain no official release included
206  * the bug since the fix arrived very late in the programs.
207  */
208 #endif
209 #define PFVF_ACQUIRE_CAP_POST_FW_OVERRIDE	(1 << 2)
210 
211 	/* PF expects queues to be received with additional qids */
212 #define PFVF_ACQUIRE_CAP_QUEUE_QIDS		(1 << 3)
213 
214 		u16 db_size;
215 		u8  indices_per_sb;
216 		u8 os_type;
217 
218 		/* These should match the PF's ecore_dev values */
219 		u16 chip_rev;
220 		u8 dev_type;
221 
222 		/* Doorbell bar size configured in HW: log(size) or 0 */
223 		u8 bar_size;
224 
225 		struct pfvf_stats_info stats_info;
226 
227 		u8 port_mac[ETH_ALEN];
228 
229 		/* It's possible PF had to configure an older fastpath HSI
230 		 * [in case VF is newer than PF]. This is communicated back
231 		 * to the VF. It can also be used in case of error due to
232 		 * non-matching versions to shed light in VF about failure.
233 		 */
234 		u8 major_fp_hsi;
235 		u8 minor_fp_hsi;
236 	} pfdev_info;
237 
238 	struct pf_vf_resc {
239 		/* in case of status NO_RESOURCE in message hdr, pf will fill
240 		 * this struct with suggested amount of resources for next
241 		 * acquire request
242 		 */
243 		#define PFVF_MAX_QUEUES_PER_VF         16
244 		#define PFVF_MAX_SBS_PER_VF            16
245 		struct hw_sb_info hw_sbs[PFVF_MAX_SBS_PER_VF];
246 		u8      hw_qid[PFVF_MAX_QUEUES_PER_VF];
247 		u8      cid[PFVF_MAX_QUEUES_PER_VF];
248 
249 		u8      num_rxqs;
250 		u8      num_txqs;
251 		u8      num_sbs;
252 		u8      num_mac_filters;
253 		u8      num_vlan_filters;
254 		u8      num_mc_filters;
255 		u8	num_cids;
256 		u8      padding;
257 	} resc;
258 
259 	u32 bulletin_size;
260 	u32 padding;
261 };
262 
263 struct pfvf_start_queue_resp_tlv {
264 	struct pfvf_tlv hdr;
265 	u32 offset; /* offset to consumer/producer of queue */
266 	u8 padding[4];
267 };
268 
269 /* Extended queue information - additional index for reference inside qzone.
270  * If commmunicated between VF/PF, each TLV relating to queues should be
271  * extended by one such [or have a future base TLV that already contains info].
272  */
273 struct vfpf_qid_tlv {
274 	struct channel_tlv	tl;
275 	u8			qid;
276 	u8			padding[3];
277 };
278 
279 /* Setup Queue */
280 struct vfpf_start_rxq_tlv {
281 	struct vfpf_first_tlv	first_tlv;
282 
283 	/* physical addresses */
284 	u64		rxq_addr;
285 	u64		deprecated_sge_addr;
286 	u64		cqe_pbl_addr;
287 
288 	u16			cqe_pbl_size;
289 	u16			hw_sb;
290 	u16			rx_qid;
291 	u16			hc_rate; /* desired interrupts per sec. */
292 
293 	u16			bd_max_bytes;
294 	u16			stat_id;
295 	u8			sb_index;
296 	u8			padding[3];
297 
298 };
299 
300 struct vfpf_start_txq_tlv {
301 	struct vfpf_first_tlv	first_tlv;
302 
303 	/* physical addresses */
304 	u64		pbl_addr;
305 	u16			pbl_size;
306 	u16			stat_id;
307 	u16			tx_qid;
308 	u16			hw_sb;
309 
310 	u32			flags; /* VFPF_QUEUE_FLG_X flags */
311 	u16			hc_rate; /* desired interrupts per sec. */
312 	u8			sb_index;
313 	u8			padding[3];
314 };
315 
316 /* Stop RX Queue */
317 struct vfpf_stop_rxqs_tlv {
318 	struct vfpf_first_tlv	first_tlv;
319 
320 	u16			rx_qid;
321 
322 	/* While the API supports multiple Rx-queues on a single TLV
323 	 * message, in practice older VFs always used it as one [ecore].
324 	 * And there are PFs [starting with the CHANNEL_TLV_QID] which
325 	 * would start assuming this is always a '1'. So in practice this
326 	 * field should be considered deprecated and *Always* set to '1'.
327 	 */
328 	u8			num_rxqs;
329 
330 	u8			cqe_completion;
331 	u8			padding[4];
332 };
333 
334 /* Stop TX Queues */
335 struct vfpf_stop_txqs_tlv {
336 	struct vfpf_first_tlv	first_tlv;
337 
338 	u16			tx_qid;
339 
340 	/* While the API supports multiple Tx-queues on a single TLV
341 	 * message, in practice older VFs always used it as one [ecore].
342 	 * And there are PFs [starting with the CHANNEL_TLV_QID] which
343 	 * would start assuming this is always a '1'. So in practice this
344 	 * field should be considered deprecated and *Always* set to '1'.
345 	 */
346 	u8			num_txqs;
347 	u8			padding[5];
348 };
349 
350 struct vfpf_update_rxq_tlv {
351 	struct vfpf_first_tlv	first_tlv;
352 
353 	u64		deprecated_sge_addr[PFVF_MAX_QUEUES_PER_VF];
354 
355 	u16			rx_qid;
356 	u8			num_rxqs;
357 	u8			flags;
358 	#define VFPF_RXQ_UPD_INIT_SGE_DEPRECATE_FLAG	(1 << 0)
359 	#define VFPF_RXQ_UPD_COMPLETE_CQE_FLAG		(1 << 1)
360 	#define VFPF_RXQ_UPD_COMPLETE_EVENT_FLAG	(1 << 2)
361 
362 	u8			padding[4];
363 };
364 
365 /* Set Queue Filters */
366 struct vfpf_q_mac_vlan_filter {
367 	u32 flags;
368 	#define VFPF_Q_FILTER_DEST_MAC_VALID    0x01
369 	#define VFPF_Q_FILTER_VLAN_TAG_VALID    0x02
370 	#define VFPF_Q_FILTER_SET_MAC   	0x100   /* set/clear */
371 
372 	u8  mac[ETH_ALEN];
373 	u16 vlan_tag;
374 
375 	u8	padding[4];
376 };
377 
378 /* Start a vport */
379 struct vfpf_vport_start_tlv {
380 	struct vfpf_first_tlv	first_tlv;
381 
382 	u64		sb_addr[PFVF_MAX_SBS_PER_VF];
383 
384 	u32			tpa_mode;
385 	u16			dep1;
386 	u16			mtu;
387 
388 	u8			vport_id;
389 	u8			inner_vlan_removal;
390 
391 	u8			only_untagged;
392 	u8			max_buffers_per_cqe;
393 
394 	u8			zero_placement_offset;
395 	u8			padding[3];
396 };
397 
398 /* Extended tlvs - need to add rss, mcast, accept mode tlvs */
399 struct vfpf_vport_update_activate_tlv {
400 	struct channel_tlv	tl;
401 	u8			update_rx;
402 	u8			update_tx;
403 	u8			active_rx;
404 	u8			active_tx;
405 };
406 
407 struct vfpf_vport_update_tx_switch_tlv {
408 	struct channel_tlv	tl;
409 	u8			tx_switching;
410 	u8			padding[3];
411 };
412 
413 struct vfpf_vport_update_vlan_strip_tlv {
414 	struct channel_tlv	tl;
415 	u8			remove_vlan;
416 	u8			padding[3];
417 };
418 
419 struct vfpf_vport_update_mcast_bin_tlv {
420 	struct channel_tlv	tl;
421 	u8			padding[4];
422 
423 	/* This was a mistake; There are only 256 approx bins,
424 	 * and in HSI they're divided into 32-bit values.
425 	 * As old VFs used to set-bit to the values on its side,
426 	 * the upper half of the array is never expected to contain any data.
427 	 */
428 	u64		bins[4];
429 	u64		obsolete_bins[4];
430 };
431 
432 struct vfpf_vport_update_accept_param_tlv {
433 	struct channel_tlv tl;
434 	u8	update_rx_mode;
435 	u8	update_tx_mode;
436 	u8	rx_accept_filter;
437 	u8	tx_accept_filter;
438 };
439 
440 struct vfpf_vport_update_accept_any_vlan_tlv {
441 	struct channel_tlv tl;
442 	u8 update_accept_any_vlan_flg;
443 	u8 accept_any_vlan;
444 
445 	u8 padding[2];
446 };
447 
448 struct vfpf_vport_update_sge_tpa_tlv {
449 	struct channel_tlv	tl;
450 
451 	u16			sge_tpa_flags;
452 	#define VFPF_TPA_IPV4_EN_FLAG	     (1 << 0)
453 	#define VFPF_TPA_IPV6_EN_FLAG        (1 << 1)
454 	#define VFPF_TPA_PKT_SPLIT_FLAG      (1 << 2)
455 	#define VFPF_TPA_HDR_DATA_SPLIT_FLAG (1 << 3)
456 	#define VFPF_TPA_GRO_CONSIST_FLAG    (1 << 4)
457 
458 	u8			update_sge_tpa_flags;
459 	#define VFPF_UPDATE_SGE_DEPRECATED_FLAG	   (1 << 0)
460 	#define VFPF_UPDATE_TPA_EN_FLAG    (1 << 1)
461 	#define VFPF_UPDATE_TPA_PARAM_FLAG (1 << 2)
462 
463 	u8			max_buffers_per_cqe;
464 
465 	u16			deprecated_sge_buff_size;
466 	u16			tpa_max_size;
467 	u16			tpa_min_size_to_start;
468 	u16			tpa_min_size_to_cont;
469 
470 	u8			tpa_max_aggs_num;
471 	u8			padding[7];
472 
473 };
474 
475 /* Primary tlv as a header for various extended tlvs for
476  * various functionalities in vport update ramrod.
477  */
478 struct vfpf_vport_update_tlv {
479 	struct vfpf_first_tlv first_tlv;
480 };
481 
482 struct vfpf_ucast_filter_tlv {
483 	struct vfpf_first_tlv	first_tlv;
484 
485 	u8			opcode;
486 	u8			type;
487 
488 	u8			mac[ETH_ALEN];
489 
490 	u16			vlan;
491 	u16			padding[3];
492 };
493 
494 /* tunnel update param tlv */
495 struct vfpf_update_tunn_param_tlv {
496 	struct vfpf_first_tlv   first_tlv;
497 
498 	u8			tun_mode_update_mask;
499 	u8			tunn_mode;
500 	u8			update_tun_cls;
501 	u8			vxlan_clss;
502 	u8			l2gre_clss;
503 	u8			ipgre_clss;
504 	u8			l2geneve_clss;
505 	u8			ipgeneve_clss;
506 	u8			update_geneve_port;
507 	u8			update_vxlan_port;
508 	u16			geneve_port;
509 	u16			vxlan_port;
510 	u8			padding[2];
511 };
512 
513 struct pfvf_update_tunn_param_tlv {
514 	struct pfvf_tlv hdr;
515 
516 	u16			tunn_feature_mask;
517 	u8			vxlan_mode;
518 	u8			l2geneve_mode;
519 	u8			ipgeneve_mode;
520 	u8			l2gre_mode;
521 	u8			ipgre_mode;
522 	u8			vxlan_clss;
523 	u8			l2gre_clss;
524 	u8			ipgre_clss;
525 	u8			l2geneve_clss;
526 	u8			ipgeneve_clss;
527 	u16			vxlan_udp_port;
528 	u16			geneve_udp_port;
529 };
530 
531 struct tlv_buffer_size {
532 	u8 tlv_buffer[TLV_BUFFER_SIZE];
533 };
534 
535 struct vfpf_update_coalesce {
536 	struct vfpf_first_tlv first_tlv;
537 	u16 rx_coal;
538 	u16 tx_coal;
539 	u16 qid;
540 	u8 padding[2];
541 };
542 
543 struct vfpf_read_coal_req_tlv {
544 	struct vfpf_first_tlv first_tlv;
545 	u16 qid;
546 	u8 is_rx;
547 	u8 padding[5];
548 };
549 
550 struct pfvf_read_coal_resp_tlv {
551 	struct pfvf_tlv hdr;
552 	u16 coal;
553 	u8 padding[6];
554 };
555 
556 union vfpf_tlvs {
557 	struct vfpf_first_tlv			first_tlv;
558 	struct vfpf_acquire_tlv			acquire;
559 	struct vfpf_start_rxq_tlv		start_rxq;
560 	struct vfpf_start_txq_tlv		start_txq;
561 	struct vfpf_stop_rxqs_tlv		stop_rxqs;
562 	struct vfpf_stop_txqs_tlv		stop_txqs;
563 	struct vfpf_update_rxq_tlv		update_rxq;
564 	struct vfpf_vport_start_tlv		start_vport;
565 	struct vfpf_vport_update_tlv		vport_update;
566 	struct vfpf_ucast_filter_tlv		ucast_filter;
567 	struct vfpf_update_tunn_param_tlv	tunn_param_update;
568 	struct vfpf_update_coalesce		update_coalesce;
569 	struct vfpf_read_coal_req_tlv		read_coal_req;
570 	struct tlv_buffer_size			tlv_buf_size;
571 };
572 
573 union pfvf_tlvs {
574 	struct pfvf_def_resp_tlv		default_resp;
575 	struct pfvf_acquire_resp_tlv		acquire_resp;
576 	struct tlv_buffer_size			tlv_buf_size;
577 	struct pfvf_start_queue_resp_tlv	queue_start;
578 	struct pfvf_update_tunn_param_tlv	tunn_param_resp;
579 	struct pfvf_read_coal_resp_tlv		read_coal_resp;
580 };
581 
582 /* This is a structure which is allocated in the VF, which the PF may update
583  * when it deems it necessary to do so. The bulletin board is sampled
584  * periodically by the VF. A copy per VF is maintained in the PF (to prevent
585  * loss of data upon multiple updates (or the need for read modify write)).
586  */
587 enum ecore_bulletin_bit {
588 	/* Alert the VF that a forced MAC was set by the PF */
589 	MAC_ADDR_FORCED = 0,
590 
591 	/* The VF should not access the vfpf channel */
592 	VFPF_CHANNEL_INVALID = 1,
593 
594 	/* Alert the VF that a forced VLAN was set by the PF */
595 	VLAN_ADDR_FORCED = 2,
596 
597 	/* Indicate that `default_only_untagged' contains actual data */
598 	VFPF_BULLETIN_UNTAGGED_DEFAULT = 3,
599 	VFPF_BULLETIN_UNTAGGED_DEFAULT_FORCED = 4,
600 
601 	/* Alert the VF that suggested mac was sent by the PF.
602 	 * MAC_ADDR will be disabled in case MAC_ADDR_FORCED is set
603 	 */
604 	VFPF_BULLETIN_MAC_ADDR = 5
605 };
606 
607 struct ecore_bulletin_content {
608 	/* crc of structure to ensure is not in mid-update */
609 	u32 crc;
610 
611 	u32 version;
612 
613 	/* bitmap indicating which fields hold valid values */
614 	u64 valid_bitmap;
615 
616 	/* used for MAC_ADDR or MAC_ADDR_FORCED */
617 	u8 mac[ETH_ALEN];
618 
619 	/* If valid, 1 => only untagged Rx if no vlan is configured */
620 	u8 default_only_untagged;
621 	u8 padding;
622 
623 	/* The following is a 'copy' of ecore_mcp_link_state,
624 	 * ecore_mcp_link_params and ecore_mcp_link_capabilities. Since it's
625 	 * possible the structs will increase further along the road we cannot
626 	 * have it here; Instead we need to have all of its fields.
627 	 */
628 	u8 req_autoneg;
629 	u8 req_autoneg_pause;
630 	u8 req_forced_rx;
631 	u8 req_forced_tx;
632 	u8 padding2[4];
633 
634 	u32 req_adv_speed;
635 	u32 req_forced_speed;
636 	u32 req_loopback;
637 	u32 padding3;
638 
639 	u8 link_up;
640 	u8 full_duplex;
641 	u8 autoneg;
642 	u8 autoneg_complete;
643 	u8 parallel_detection;
644 	u8 pfc_enabled;
645 	u8 partner_tx_flow_ctrl_en;
646 	u8 partner_rx_flow_ctrl_en;
647 
648 	u8 partner_adv_pause;
649 	u8 sfp_tx_fault;
650 	u16 vxlan_udp_port;
651 	u16 geneve_udp_port;
652 	u8 padding4[2];
653 
654 	u32 speed;
655 	u32 partner_adv_speed;
656 
657 	u32 capability_speed;
658 
659 	/* Forced vlan */
660 	u16 pvid;
661 	u16 padding5;
662 };
663 
664 struct ecore_bulletin {
665 	dma_addr_t phys;
666 	struct ecore_bulletin_content *p_virt;
667 	u32 size;
668 };
669 
670 enum {
671 /*!!!!! Make sure to update STRINGS structure accordingly !!!!!*/
672 
673 	CHANNEL_TLV_NONE, /* ends tlv sequence */
674 	CHANNEL_TLV_ACQUIRE,
675 	CHANNEL_TLV_VPORT_START,
676 	CHANNEL_TLV_VPORT_UPDATE,
677 	CHANNEL_TLV_VPORT_TEARDOWN,
678 	CHANNEL_TLV_START_RXQ,
679 	CHANNEL_TLV_START_TXQ,
680 	CHANNEL_TLV_STOP_RXQS,
681 	CHANNEL_TLV_STOP_TXQS,
682 	CHANNEL_TLV_UPDATE_RXQ,
683 	CHANNEL_TLV_INT_CLEANUP,
684 	CHANNEL_TLV_CLOSE,
685 	CHANNEL_TLV_RELEASE,
686 	CHANNEL_TLV_LIST_END,
687 	CHANNEL_TLV_UCAST_FILTER,
688 	CHANNEL_TLV_VPORT_UPDATE_ACTIVATE,
689 	CHANNEL_TLV_VPORT_UPDATE_TX_SWITCH,
690 	CHANNEL_TLV_VPORT_UPDATE_VLAN_STRIP,
691 	CHANNEL_TLV_VPORT_UPDATE_MCAST,
692 	CHANNEL_TLV_VPORT_UPDATE_ACCEPT_PARAM,
693 	CHANNEL_TLV_VPORT_UPDATE_RSS,
694 	CHANNEL_TLV_VPORT_UPDATE_ACCEPT_ANY_VLAN,
695 	CHANNEL_TLV_VPORT_UPDATE_SGE_TPA,
696 	CHANNEL_TLV_UPDATE_TUNN_PARAM,
697 	CHANNEL_TLV_COALESCE_UPDATE,
698 	CHANNEL_TLV_QID,
699 	CHANNEL_TLV_COALESCE_READ,
700 	CHANNEL_TLV_MAX,
701 
702 	/* Required for iterating over vport-update tlvs.
703 	 * Will break in case non-sequential vport-update tlvs.
704 	 */
705 	CHANNEL_TLV_VPORT_UPDATE_MAX = CHANNEL_TLV_VPORT_UPDATE_SGE_TPA + 1,
706 
707 /*!!!!! Make sure to update STRINGS structure accordingly !!!!!*/
708 };
709 extern const char *ecore_channel_tlvs_string[];
710 
711 #endif /* __ECORE_VF_PF_IF_H__ */
712