X-Git-Url: http://git.droids-corp.org/?a=blobdiff_plain;f=drivers%2Fnet%2Fcxgbe%2Fbase%2Fadapter.h;h=e548f9f63a101dc3e3041de50ada0e5a612fa87d;hb=6de4c538b393d5a1414a18b2dfb83293b9c429a1;hp=3ed3252e873f4c7eafb5ca07ee5d401bc00331ae;hpb=3f2c1e209cfcccedcf3c5de2248daffd90f42626;p=dpdk.git diff --git a/drivers/net/cxgbe/base/adapter.h b/drivers/net/cxgbe/base/adapter.h index 3ed3252e87..e548f9f63a 100644 --- a/drivers/net/cxgbe/base/adapter.h +++ b/drivers/net/cxgbe/base/adapter.h @@ -14,9 +14,9 @@ #include #include -#include "cxgbe_compat.h" +#include "../cxgbe_compat.h" +#include "../cxgbe_ofld.h" #include "t4_regs_values.h" -#include "cxgbe_ofld.h" enum { MAX_ETH_QSETS = 64, /* # of Ethernet Tx/Rx queue sets */ @@ -324,7 +324,11 @@ struct adapter { unsigned int clipt_start; /* CLIP table start */ unsigned int clipt_end; /* CLIP table end */ + unsigned int l2t_start; /* Layer 2 table start */ + unsigned int l2t_end; /* Layer 2 table end */ struct clip_tbl *clipt; /* CLIP table */ + struct l2t_data *l2t; /* Layer 2 table */ + struct mpstcam_table *mpstcam; struct tid_info tids; /* Info used to access TID related tables */ }; @@ -364,7 +368,7 @@ static inline void t4_os_write_unlock(rte_rwlock_t *lock) */ static inline struct port_info *ethdev2pinfo(const struct rte_eth_dev *dev) { - return (struct port_info *)dev->data->dev_private; + return dev->data->dev_private; } /** @@ -667,7 +671,7 @@ static inline void t4_os_set_hw_addr(struct adapter *adapter, int port_idx, { struct port_info *pi = adap2pinfo(adapter, port_idx); - ether_addr_copy((struct ether_addr *)hw_addr, + rte_ether_addr_copy((struct rte_ether_addr *)hw_addr, &pi->eth_dev->data->mac_addrs[0]); } @@ -771,6 +775,17 @@ static inline void t4_complete(struct t4_completion *c) t4_os_unlock(&c->lock); } +/** + * cxgbe_port_viid - get the VI id of a port + * @dev: the device for the port + * + * Return the VI id of the given port. + */ +static inline unsigned int cxgbe_port_viid(const struct rte_eth_dev *dev) +{ + return ethdev2pinfo(dev)->viid; +} + void *t4_alloc_mem(size_t size); void t4_free_mem(void *addr); #define t4_os_alloc(_size) t4_alloc_mem((_size)) @@ -786,8 +801,6 @@ void t4_sge_tx_monitor_stop(struct adapter *adap); int t4_eth_xmit(struct sge_eth_txq *txq, struct rte_mbuf *mbuf, uint16_t nb_pkts); int t4_mgmt_tx(struct sge_ctrl_txq *txq, struct rte_mbuf *mbuf); -int t4_ethrx_handler(struct sge_rspq *q, const __be64 *rsp, - const struct pkt_gl *gl); int t4_sge_init(struct adapter *adap); int t4vf_sge_init(struct adapter *adap); int t4_sge_alloc_eth_txq(struct adapter *adap, struct sge_eth_txq *txq,