+ uint16_t used_rx_queues;
+ uint16_t used_tx_queues;
+
+ /* Config max queue numbers between rx and tx queues from user */
+ uint16_t cfg_max_queues;
+ struct hns3_fake_queue_data fkq_data; /* fake queue data */
+ uint16_t alloc_rss_size; /* RX queue number per TC */
+ uint16_t tx_qnum_per_tc; /* TX queue number per TC */
+
+ uint32_t capability;
+ uint32_t max_tm_rate;
+ /*
+ * The minimum length of the packet supported by hardware in the Tx
+ * direction.
+ */
+ uint32_t min_tx_pkt_len;
+
+ struct hns3_queue_intr intr;
+ /*
+ * tso mode.
+ * value range:
+ * HNS3_TSO_SW_CAL_PSEUDO_H_CSUM/HNS3_TSO_HW_CAL_PSEUDO_H_CSUM
+ *
+ * - HNS3_TSO_SW_CAL_PSEUDO_H_CSUM
+ * In this mode, because of the hardware constraint, network driver
+ * software need erase the L4 len value of the TCP pseudo header
+ * and recalculate the TCP pseudo header checksum of packets that
+ * need TSO.
+ *
+ * - HNS3_TSO_HW_CAL_PSEUDO_H_CSUM
+ * In this mode, hardware support recalculate the TCP pseudo header
+ * checksum of packets that need TSO, so network driver software
+ * not need to recalculate it.
+ */
+ uint8_t tso_mode;
+ /*
+ * vlan mode.
+ * value range:
+ * HNS3_SW_SHIFT_AND_DISCARD_MODE/HNS3_HW_SHFIT_AND_DISCARD_MODE
+ *
+ * - HNS3_SW_SHIFT_AND_DISCARD_MODE
+ * For some versions of hardware network engine, because of the
+ * hardware limitation, PMD driver needs to detect the PVID status
+ * to work with haredware to implement PVID-related functions.
+ * For example, driver need discard the stripped PVID tag to ensure
+ * the PVID will not report to mbuf and shift the inserted VLAN tag
+ * to avoid port based VLAN covering it.
+ *
+ * - HNS3_HW_SHIT_AND_DISCARD_MODE
+ * PMD driver does not need to process PVID-related functions in
+ * I/O process, Hardware will adjust the sequence between port based
+ * VLAN tag and BD VLAN tag automatically and VLAN tag stripped by
+ * PVID will be invisible to driver. And in this mode, hns3 is able
+ * to send a multi-layer VLAN packets when hw VLAN insert offload
+ * is enabled.
+ */
+ uint8_t vlan_mode;
+ /*
+ * promisc mode.
+ * value range:
+ * HNS3_UNLIMIT_PROMISC_MODE/HNS3_LIMIT_PROMISC_MODE
+ *
+ * - HNS3_UNLIMIT_PROMISC_MODE
+ * In this mode, TX unicast promisc will be configured when promisc
+ * is set, driver can receive all the ingress and outgoing traffic.
+ * In the words, all the ingress packets, all the packets sent from
+ * the PF and other VFs on the same physical port.
+ *
+ * - HNS3_LIMIT_PROMISC_MODE
+ * In this mode, TX unicast promisc is shutdown when promisc mode
+ * is set. So, driver will only receive all the ingress traffic.
+ * The packets sent from the PF and other VFs on the same physical
+ * port won't be copied to the function which has set promisc mode.
+ */
+ uint8_t promisc_mode;
+
+ /*
+ * drop_stats_mode mode.
+ * value range:
+ * HNS3_PKTS_DROP_STATS_MODE1/HNS3_PKTS_DROP_STATS_MODE2
+ *
+ * - HNS3_PKTS_DROP_STATS_MODE1
+ * This mode for kunpeng920. In this mode, port level imissed stats
+ * is supported. It only includes RPU drop stats.
+ *
+ * - HNS3_PKTS_DROP_STATS_MODE2
+ * This mode for kunpeng930. In this mode, imissed stats and oerrors
+ * stats is supported. Function level imissed stats is supported. It
+ * includes RPU drop stats in VF, and includes both RPU drop stats
+ * and SSU drop stats in PF. Oerror stats is also supported in PF.
+ */
+ uint8_t drop_stats_mode;
+
+ uint8_t max_non_tso_bd_num; /* max BD number of one non-TSO packet */
+ /*
+ * udp checksum mode.
+ * value range:
+ * HNS3_SPECIAL_PORT_HW_CKSUM_MODE/HNS3_SPECIAL_PORT_SW_CKSUM_MODE
+ *
+ * - HNS3_SPECIAL_PORT_SW_CKSUM_MODE
+ * In this mode, HW can not do checksum for special UDP port like
+ * 4789, 4790, 6081 for non-tunnel UDP packets and UDP tunnel
+ * packets without the PKT_TX_TUNEL_MASK in the mbuf. So, PMD need
+ * do the checksum for these packets to avoid a checksum error.
+ *
+ * - HNS3_SPECIAL_PORT_HW_CKSUM_MODE
+ * In this mode, HW does not have the preceding problems and can
+ * directly calculate the checksum of these UDP packets.
+ */
+ uint8_t udp_cksum_mode;
+
+ struct hns3_port_base_vlan_config port_base_vlan_cfg;
+
+ pthread_mutex_t flows_lock; /* rte_flow ops lock */