/* Host monitor interval */
#define HN_CHAN_LATENCY_NS 50000
+#define HN_TXCOPY_THRESHOLD 512
+#define HN_RXCOPY_THRESHOLD 256
+
+#define HN_RX_EXTMBUF_ENABLE 0
+
/* Buffers need to be aligned */
#ifndef PAGE_SIZE
#define PAGE_SIZE 4096
uint64_t bytes;
uint64_t errors;
uint64_t ring_full;
+ uint64_t channel_full;
uint64_t multicast;
uint64_t broadcast;
/* Size bins in array as RFC 2819, undersized [0], 64 [1], etc */
uint16_t queue_id;
uint32_t free_thresh;
struct rte_mempool *txdesc_pool;
+ const struct rte_memzone *tx_rndis_mz;
void *tx_rndis;
+ rte_iova_t tx_rndis_iova;
/* Applied packet transmission aggregation limits. */
uint32_t agg_szmax;
struct hn_stats stats;
void *event_buf;
+ struct hn_rx_bufinfo *rxbuf_info;
+ rte_atomic32_t rxbuf_outstanding;
};
/* multi-packet data from host */
struct hn_rx_bufinfo {
struct vmbus_channel *chan;
- struct hn_data *hv;
+ struct hn_rx_queue *rxq;
uint64_t xactid;
struct rte_mbuf_ext_shared_info shinfo;
} __rte_cache_aligned;
uint32_t link_speed;
struct rte_mem_resource *rxbuf_res; /* UIO resource for Rx */
- struct hn_rx_bufinfo *rxbuf_info;
uint32_t rxbuf_section_cnt; /* # of Rx sections */
- volatile uint32_t rxbuf_outstanding;
+ uint32_t rx_copybreak;
+ uint32_t rx_extmbuf_enable;
uint16_t max_queues; /* Max available queues */
uint16_t num_queues;
uint64_t rss_offloads;
struct rte_mem_resource *chim_res; /* UIO resource for Tx */
struct rte_bitmap *chim_bmap; /* Send buffer map */
void *chim_bmem;
+ uint32_t tx_copybreak;
uint32_t chim_szmax; /* Max size per buffer */
uint32_t chim_cnt; /* Max packets per buffer */
uint16_t rss_ind[128];
struct rte_eth_dev_owner owner;
- struct rte_intr_handle vf_intr;
struct vmbus_channel *channels[HN_MAX_CHANNELS];
};
void hn_dev_tx_queue_info(struct rte_eth_dev *dev, uint16_t queue_idx,
struct rte_eth_txq_info *qinfo);
int hn_dev_tx_done_cleanup(void *arg, uint32_t free_cnt);
+int hn_dev_tx_descriptor_status(void *arg, uint16_t offset);
struct hn_rx_queue *hn_rx_queue_alloc(struct hn_data *hv,
uint16_t queue_id,
void hn_dev_rx_queue_info(struct rte_eth_dev *dev, uint16_t queue_id,
struct rte_eth_rxq_info *qinfo);
void hn_dev_rx_queue_release(void *arg);
+uint32_t hn_dev_rx_queue_count(struct rte_eth_dev *dev, uint16_t queue_id);
+int hn_dev_rx_queue_status(void *rxq, uint16_t offset);
void hn_dev_free_queues(struct rte_eth_dev *dev);
/* Check if VF is attached */
const uint32_t *hn_vf_supported_ptypes(struct rte_eth_dev *dev);
int hn_vf_start(struct rte_eth_dev *dev);
void hn_vf_reset(struct rte_eth_dev *dev);
-void hn_vf_stop(struct rte_eth_dev *dev);
-void hn_vf_close(struct rte_eth_dev *dev);
+int hn_vf_close(struct rte_eth_dev *dev);
+int hn_vf_stop(struct rte_eth_dev *dev);
int hn_vf_allmulticast_enable(struct rte_eth_dev *dev);
int hn_vf_allmulticast_disable(struct rte_eth_dev *dev);
struct rte_ether_addr *mc_addr_set,
uint32_t nb_mc_addr);
-int hn_vf_link_update(struct rte_eth_dev *dev,
- int wait_to_complete);
int hn_vf_tx_queue_setup(struct rte_eth_dev *dev,
uint16_t queue_idx, uint16_t nb_desc,
unsigned int socket_id,
const struct rte_eth_txconf *tx_conf);
void hn_vf_tx_queue_release(struct hn_data *hv, uint16_t queue_id);
+int hn_vf_tx_queue_status(struct hn_data *hv, uint16_t queue_id, uint16_t offset);
+
int hn_vf_rx_queue_setup(struct rte_eth_dev *dev,
uint16_t queue_idx, uint16_t nb_desc,
unsigned int socket_id,