Changeset View
Changeset View
Standalone View
Standalone View
sys/ofed/drivers/infiniband/ulp/ipoib/ipoib.h
Show First 20 Lines • Show All 432 Lines • ▼ Show 20 Lines | |||||
/* UD Only transmits encap len but we want the two sizes to be symmetrical. */ | /* UD Only transmits encap len but we want the two sizes to be symmetrical. */ | ||||
#define IPOIB_UD_MTU(ib_mtu) (ib_mtu - IPOIB_ENCAP_LEN) | #define IPOIB_UD_MTU(ib_mtu) (ib_mtu - IPOIB_ENCAP_LEN) | ||||
#define IPOIB_CM_MTU(ib_mtu) (ib_mtu - 0x10) | #define IPOIB_CM_MTU(ib_mtu) (ib_mtu - 0x10) | ||||
#define IPOIB_IS_MULTICAST(addr) ((addr)[4] == 0xff) | #define IPOIB_IS_MULTICAST(addr) ((addr)[4] == 0xff) | ||||
extern struct workqueue_struct *ipoib_workqueue; | extern struct workqueue_struct *ipoib_workqueue; | ||||
#define IPOIB_MTAP_PROTO(_ifp, _m, _proto) \ | |||||
do { \ | |||||
if (bpf_peers_present((_ifp)->if_bpf)) { \ | |||||
M_ASSERTVALID(_m); \ | |||||
ipoib_mtap_proto((_ifp), (_m), (_proto)); \ | |||||
} \ | |||||
} while (0) | |||||
/* functions */ | /* functions */ | ||||
void ipoib_mtap_proto(struct ifnet *ifp, struct mbuf *mb, uint16_t proto); | |||||
void ipoib_ib_completion(struct ib_cq *cq, void *dev_ptr); | void ipoib_ib_completion(struct ib_cq *cq, void *dev_ptr); | ||||
void ipoib_send_comp_handler(struct ib_cq *cq, void *dev_ptr); | void ipoib_send_comp_handler(struct ib_cq *cq, void *dev_ptr); | ||||
struct ipoib_ah *ipoib_create_ah(struct ipoib_dev_priv *, | struct ipoib_ah *ipoib_create_ah(struct ipoib_dev_priv *, | ||||
struct ib_pd *pd, struct ib_ah_attr *attr); | struct ib_pd *pd, struct ib_ah_attr *attr); | ||||
void ipoib_free_ah(struct kref *kref); | void ipoib_free_ah(struct kref *kref); | ||||
static inline void ipoib_put_ah(struct ipoib_ah *ah) | static inline void ipoib_put_ah(struct ipoib_ah *ah) | ||||
{ | { | ||||
kref_put(&ah->ref, ipoib_free_ah); | kref_put(&ah->ref, ipoib_free_ah); | ||||
} | } | ||||
int ipoib_open(struct ipoib_dev_priv *priv); | int ipoib_open(struct ipoib_dev_priv *priv); | ||||
int ipoib_add_pkey_attr(struct ipoib_dev_priv *priv); | int ipoib_add_pkey_attr(struct ipoib_dev_priv *priv); | ||||
int ipoib_add_umcast_attr(struct ipoib_dev_priv *priv); | int ipoib_add_umcast_attr(struct ipoib_dev_priv *priv); | ||||
void ipoib_demux(struct ifnet *ifp, struct mbuf *m, u_short proto); | |||||
void ipoib_send(struct ipoib_dev_priv *priv, struct mbuf *mb, | void ipoib_send(struct ipoib_dev_priv *priv, struct mbuf *mb, | ||||
struct ipoib_ah *address, u32 qpn); | struct ipoib_ah *address, u32 qpn); | ||||
void ipoib_reap_ah(struct work_struct *work); | void ipoib_reap_ah(struct work_struct *work); | ||||
void ipoib_mark_paths_invalid(struct ipoib_dev_priv *priv); | void ipoib_mark_paths_invalid(struct ipoib_dev_priv *priv); | ||||
void ipoib_flush_paths(struct ipoib_dev_priv *priv); | void ipoib_flush_paths(struct ipoib_dev_priv *priv); | ||||
struct ipoib_dev_priv *ipoib_intf_alloc(const char *format); | struct ipoib_dev_priv *ipoib_intf_alloc(const char *format); | ||||
▲ Show 20 Lines • Show All 59 Lines • ▼ Show 20 Lines | |||||
void ipoib_drain_cq(struct ipoib_dev_priv *priv); | void ipoib_drain_cq(struct ipoib_dev_priv *priv); | ||||
int ipoib_dma_map_tx(struct ib_device *ca, struct ipoib_tx_buf *tx_req, int max); | int ipoib_dma_map_tx(struct ib_device *ca, struct ipoib_tx_buf *tx_req, int max); | ||||
void ipoib_dma_unmap_tx(struct ib_device *ca, struct ipoib_tx_buf *tx_req); | void ipoib_dma_unmap_tx(struct ib_device *ca, struct ipoib_tx_buf *tx_req); | ||||
int ipoib_poll_tx(struct ipoib_dev_priv *priv, bool do_start); | int ipoib_poll_tx(struct ipoib_dev_priv *priv, bool do_start); | ||||
void ipoib_dma_unmap_rx(struct ipoib_dev_priv *priv, struct ipoib_rx_buf *rx_req); | void ipoib_dma_unmap_rx(struct ipoib_dev_priv *priv, struct ipoib_rx_buf *rx_req); | ||||
void ipoib_dma_mb(struct ipoib_dev_priv *priv, struct mbuf *mb, unsigned int length); | void ipoib_dma_mb(struct ipoib_dev_priv *priv, struct mbuf *mb, unsigned int length); | ||||
struct mbuf *ipoib_alloc_map_mb(struct ipoib_dev_priv *priv, struct ipoib_rx_buf *rx_req, int size); | struct mbuf *ipoib_alloc_map_mb(struct ipoib_dev_priv *priv, struct ipoib_rx_buf *rx_req, int align, int size); | ||||
void ipoib_set_ethtool_ops(struct ifnet *dev); | void ipoib_set_ethtool_ops(struct ifnet *dev); | ||||
int ipoib_set_dev_features(struct ipoib_dev_priv *priv, struct ib_device *hca); | int ipoib_set_dev_features(struct ipoib_dev_priv *priv, struct ib_device *hca); | ||||
#ifdef CONFIG_INFINIBAND_IPOIB_CM | #ifdef CONFIG_INFINIBAND_IPOIB_CM | ||||
#define IPOIB_FLAGS_RC 0x80 | #define IPOIB_FLAGS_RC 0x80 | ||||
▲ Show 20 Lines • Show All 218 Lines • Show Last 20 Lines |