X-Git-Url: http://git.droids-corp.org/?a=blobdiff_plain;f=lib%2Flibrte_pmd_enic%2Fenic.h;h=57b9c80e9ef3f0c577079f7f8aada0cb3ac2e7f8;hb=78d9a8988428e18490dfe463157579030dbe9c63;hp=9f80fc050ac238bffa0b8d5e33bce8fff3c83b62;hpb=fefed3d1e62cc0a50af965baaa3acd98542dc833;p=dpdk.git diff --git a/lib/librte_pmd_enic/enic.h b/lib/librte_pmd_enic/enic.h index 9f80fc050a..57b9c80e9e 100644 --- a/lib/librte_pmd_enic/enic.h +++ b/lib/librte_pmd_enic/enic.h @@ -66,9 +66,9 @@ #define ENIC_CALC_IP_CKSUM 1 #define ENIC_CALC_TCP_UDP_CKSUM 2 #define ENIC_MAX_MTU 9000 -#define PAGE_SIZE 4096 +#define ENIC_PAGE_SIZE 4096 #define PAGE_ROUND_UP(x) \ - ((((unsigned long)(x)) + PAGE_SIZE-1) & (~(PAGE_SIZE-1))) + ((((unsigned long)(x)) + ENIC_PAGE_SIZE-1) & (~(ENIC_PAGE_SIZE-1))) #define ENICPMD_VFIO_PATH "/dev/vfio/vfio" /*#define ENIC_DESC_COUNT_MAKE_ODD (x) do{if ((~(x)) & 1) { (x)--; } }while(0)*/ @@ -106,7 +106,7 @@ struct enic { int iommu_group_fd; int iommu_groupid; int eventfd; - u_int8_t mac_addr[ETH_ALEN]; + uint8_t mac_addr[ETH_ALEN]; pthread_t err_intr_thread; int promisc; int allmulti; @@ -134,7 +134,7 @@ struct enic { unsigned int intr_count; }; -static inline unsigned int enic_cq_rq(struct enic *enic, unsigned int rq) +static inline unsigned int enic_cq_rq(__rte_unused struct enic *enic, unsigned int rq) { return rq; } @@ -144,7 +144,7 @@ static inline unsigned int enic_cq_wq(struct enic *enic, unsigned int wq) return enic->rq_count + wq; } -static inline unsigned int enic_msix_err_intr(struct enic *enic) +static inline unsigned int enic_msix_err_intr(__rte_unused struct enic *enic) { return 0; } @@ -154,4 +154,44 @@ static inline struct enic *pmd_priv(struct rte_eth_dev *eth_dev) return (struct enic *)eth_dev->data->dev_private; } +extern int enic_fdir_add_fltr(struct enic *enic, + struct rte_fdir_filter *params, u16 queue, u8 drop); +extern int enic_fdir_del_fltr(struct enic *enic, + struct rte_fdir_filter *params); +extern void enic_free_wq(void *txq); +extern int enic_alloc_intr_resources(struct enic *enic); +extern int enic_setup_finish(struct enic *enic); +extern int enic_alloc_wq(struct enic *enic, uint16_t queue_idx, + unsigned int socket_id, uint16_t nb_desc); +extern void enic_start_wq(struct enic *enic, uint16_t queue_idx); +extern int enic_stop_wq(struct enic *enic, uint16_t queue_idx); +extern void enic_start_rq(struct enic *enic, uint16_t queue_idx); +extern int enic_stop_rq(struct enic *enic, uint16_t queue_idx); +extern void enic_free_rq(void *rxq); +extern int enic_alloc_rq(struct enic *enic, uint16_t queue_idx, + unsigned int socket_id, struct rte_mempool *mp, + uint16_t nb_desc); +extern int enic_set_rss_nic_cfg(struct enic *enic); +extern int enic_set_vnic_res(struct enic *enic); +extern void enic_set_hdr_split_size(struct enic *enic, u16 split_hdr_size); +extern int enic_enable(struct enic *enic); +extern int enic_disable(struct enic *enic); +extern void enic_remove(struct enic *enic); +extern int enic_get_link_status(struct enic *enic); +extern void enic_dev_stats_get(struct enic *enic, + struct rte_eth_stats *r_stats); +extern void enic_dev_stats_clear(struct enic *enic); +extern void enic_add_packet_filter(struct enic *enic); +extern void enic_set_mac_address(struct enic *enic, uint8_t *mac_addr); +extern void enic_del_mac_address(struct enic *enic); +extern unsigned int enic_cleanup_wq(struct enic *enic, struct vnic_wq *wq); +extern int enic_send_pkt(struct enic *enic, struct vnic_wq *wq, + struct rte_mbuf *tx_pkt, unsigned short len, + uint8_t sop, uint8_t eop, + uint16_t ol_flags, uint16_t vlan_tag); +extern int enic_poll(struct vnic_rq *rq, struct rte_mbuf **rx_pkts, + unsigned int budget, unsigned int *work_done); +extern int enic_probe(struct enic *enic); +extern int enic_clsf_init(struct enic *enic); +extern void enic_clsf_destroy(struct enic *enic); #endif /* _ENIC_H_ */