Lines Matching refs:mb
100 for (m = rx_req->mb, i = 0; m != NULL; m = m->m_next, i++) { in ipoib_cm_post_receive_srq()
112 m_freem(priv->cm.srq_ring[id].mb); in ipoib_cm_post_receive_srq()
113 priv->cm.srq_ring[id].mb = NULL; in ipoib_cm_post_receive_srq()
131 for (m = rx_req->mb, i = 0; m != NULL; m = m->m_next, i++) { in ipoib_cm_post_receive_nonsrq()
143 m_freem(rx->rx_ring[id].mb); in ipoib_cm_post_receive_nonsrq()
144 rx->rx_ring[id].mb = NULL; in ipoib_cm_post_receive_nonsrq()
163 if (rx_ring[i].mb) { in ipoib_cm_free_rx_ring()
165 m_freem(rx_ring[i].mb); in ipoib_cm_free_rx_ring()
482 struct mbuf *mb, *newmb; in ipoib_cm_handle_rx_wc() local
509 mb = rx_ring[wr_id].mb; in ipoib_cm_handle_rx_wc()
557 ipoib_dma_mb(priv, mb, wc->byte_len); in ipoib_cm_handle_rx_wc()
559 mb->m_pkthdr.rcvif = dev; in ipoib_cm_handle_rx_wc()
561 M_PREPEND(mb, sizeof(struct ipoib_pseudoheader), M_NOWAIT); in ipoib_cm_handle_rx_wc()
562 if (likely(mb != NULL)) { in ipoib_cm_handle_rx_wc()
566 if_inc_counter(dev, IFCOUNTER_IBYTES, mb->m_pkthdr.len); in ipoib_cm_handle_rx_wc()
569 ibh = mtod(mb, struct ipoib_header *); in ipoib_cm_handle_rx_wc()
573 if_input(dev, mb); in ipoib_cm_handle_rx_wc()
602 struct mbuf *mb = tx_req->mb; in post_send() local
607 for (m = mb, i = 0; m != NULL; m = m->m_next, i++) { in post_send()
618 void ipoib_cm_send(struct ipoib_dev_priv *priv, struct mbuf *mb, struct ipoib_cm_tx *tx) in ipoib_cm_send() argument
628 m_adj(mb, sizeof(struct ipoib_pseudoheader)); in ipoib_cm_send()
629 if (unlikely(mb->m_pkthdr.len > tx->mtu)) { in ipoib_cm_send()
631 mb->m_pkthdr.len, tx->mtu); in ipoib_cm_send()
633 ipoib_cm_mb_too_long(priv, mb, IPOIB_CM_MTU(tx->mtu)); in ipoib_cm_send()
638 tx->tx_head, mb->m_pkthdr.len, tx->qp->qp_num); in ipoib_cm_send()
649 tx_req->mb = mb; in ipoib_cm_send()
653 if (tx_req->mb) in ipoib_cm_send()
654 m_freem(tx_req->mb); in ipoib_cm_send()
662 m_freem(mb); in ipoib_cm_send()
700 m_freem(tx_req->mb); in ipoib_cm_handle_tx_wc()
854 struct mbuf *mb; in ipoib_cm_rep_handler() local
897 _IF_DEQUEUE(&p->path->queue, mb); in ipoib_cm_rep_handler()
898 if (mb == NULL) in ipoib_cm_rep_handler()
900 _IF_ENQUEUE(&mbqueue, mb); in ipoib_cm_rep_handler()
907 _IF_DEQUEUE(&mbqueue, mb); in ipoib_cm_rep_handler()
908 if (mb == NULL) in ipoib_cm_rep_handler()
910 mb->m_pkthdr.rcvif = dev; in ipoib_cm_rep_handler()
911 if (if_transmit(dev, mb)) in ipoib_cm_rep_handler()
1097 m_freem(tx_req->mb); in ipoib_cm_tx_destroy()
1264 struct mbuf *mb; in ipoib_cm_mb_reap() local
1276 IF_DEQUEUE(&priv->cm.mb_queue, mb); in ipoib_cm_mb_reap()
1277 if (mb == NULL) in ipoib_cm_mb_reap()
1281 proto = htons(*mtod(mb, uint16_t *)); in ipoib_cm_mb_reap()
1282 m_adj(mb, IPOIB_ENCAP_LEN); in ipoib_cm_mb_reap()
1286 icmp_error(mb, ICMP_UNREACH, ICMP_UNREACH_NEEDFRAG, 0, mtu); in ipoib_cm_mb_reap()
1291 icmp6_error(mb, ICMP6_PACKET_TOO_BIG, 0, mtu); in ipoib_cm_mb_reap()
1295 m_freem(mb); in ipoib_cm_mb_reap()
1307 ipoib_cm_mb_too_long(struct ipoib_dev_priv *priv, struct mbuf *mb, unsigned int mtu) in ipoib_cm_mb_too_long() argument
1311 IF_ENQUEUE(&priv->cm.mb_queue, mb); in ipoib_cm_mb_too_long()