#define _IAVF_ETHDEV_H_
#include <rte_kvargs.h>
+#include <iavf_prototype.h>
+#include <iavf_adminq_cmd.h>
+#include <iavf_type.h>
+
+#include "iavf_log.h"
#define IAVF_AQ_LEN 32
#define IAVF_AQ_BUF_SZ 4096
*/
#define IAVF_VLAN_TAG_SIZE 4
#define IAVF_ETH_OVERHEAD \
- (ETHER_HDR_LEN + ETHER_CRC_LEN + IAVF_VLAN_TAG_SIZE * 2)
+ (RTE_ETHER_HDR_LEN + RTE_ETHER_CRC_LEN + IAVF_VLAN_TAG_SIZE * 2)
+
+#define IAVF_32_BIT_WIDTH (CHAR_BIT * 4)
+#define IAVF_48_BIT_WIDTH (CHAR_BIT * 6)
+#define IAVF_48_BIT_MASK RTE_LEN2MASK(IAVF_48_BIT_WIDTH, uint64_t)
struct iavf_adapter;
struct iavf_rx_queue;
uint16_t max_macaddrs; /* Maximum number of MAC addresses */
uint16_t base_vector;
uint16_t msix_intr; /* The MSIX interrupt binds to VSI */
+ struct virtchnl_eth_stats eth_stats_offset;
};
+struct rte_flow;
+TAILQ_HEAD(iavf_flow_list, rte_flow);
+
+struct iavf_flow_parser_node;
+TAILQ_HEAD(iavf_parser_list, iavf_flow_parser_node);
+
/* TODO: is that correct to assume the max number to be 16 ?*/
#define IAVF_MAX_MSIX_VECTORS 16
/* Event from pf */
bool dev_closed;
bool link_up;
- enum virtchnl_link_speed link_speed;
+ uint32_t link_speed;
struct iavf_vsi vsi;
bool vf_reset;
uint16_t msix_base; /* msix vector base from */
/* queue bitmask for each vector */
uint16_t rxq_map[IAVF_MAX_MSIX_VECTORS];
+ struct iavf_flow_list flow_list;
+ rte_spinlock_t flow_ops_lock;
+ struct iavf_parser_list rss_parser_list;
+ struct iavf_parser_list dist_parser_list;
};
-#define IAVF_MAX_PKT_TYPE 256
+#define IAVF_MAX_PKT_TYPE 1024
/* Structure to store private data for each VF instance. */
struct iavf_adapter {
/* For vector PMD */
bool rx_vec_allowed;
bool tx_vec_allowed;
+ const uint32_t *ptype_tbl;
+ bool stopped;
};
/* IAVF_DEV_PRIVATE_TO */
uint32_t out_size; /* buffer size for response */
};
+/* notify current command done. Only call in case execute
+ * _atomic_set_cmd successfully.
+ */
+static inline void
+_notify_cmd(struct iavf_info *vf, uint32_t msg_ret)
+{
+ vf->cmd_retval = msg_ret;
+ rte_wmb();
+ vf->pend_cmd = VIRTCHNL_OP_UNKNOWN;
+}
+
/* clear current command. Only call in case execute
* _atomic_set_cmd successfully.
*/
int iavf_config_promisc(struct iavf_adapter *adapter, bool enable_unicast,
bool enable_multicast);
int iavf_add_del_eth_addr(struct iavf_adapter *adapter,
- struct ether_addr *addr, bool add);
+ struct rte_ether_addr *addr, bool add);
int iavf_add_del_vlan(struct iavf_adapter *adapter, uint16_t vlanid, bool add);
#endif /* _IAVF_ETHDEV_H_ */