|
@@ -708,6 +708,7 @@ void ipoib_cm_send(struct net_device *dev, struct sk_buff *skb, struct ipoib_cm_
|
|
struct ipoib_dev_priv *priv = netdev_priv(dev);
|
|
struct ipoib_dev_priv *priv = netdev_priv(dev);
|
|
struct ipoib_cm_tx_buf *tx_req;
|
|
struct ipoib_cm_tx_buf *tx_req;
|
|
u64 addr;
|
|
u64 addr;
|
|
|
|
+ int rc;
|
|
|
|
|
|
if (unlikely(skb->len > tx->mtu)) {
|
|
if (unlikely(skb->len > tx->mtu)) {
|
|
ipoib_warn(priv, "packet len %d (> %d) too long to send, dropping\n",
|
|
ipoib_warn(priv, "packet len %d (> %d) too long to send, dropping\n",
|
|
@@ -739,9 +740,10 @@ void ipoib_cm_send(struct net_device *dev, struct sk_buff *skb, struct ipoib_cm_
|
|
|
|
|
|
tx_req->mapping = addr;
|
|
tx_req->mapping = addr;
|
|
|
|
|
|
- if (unlikely(post_send(priv, tx, tx->tx_head & (ipoib_sendq_size - 1),
|
|
|
|
- addr, skb->len))) {
|
|
|
|
- ipoib_warn(priv, "post_send failed\n");
|
|
|
|
|
|
+ rc = post_send(priv, tx, tx->tx_head & (ipoib_sendq_size - 1),
|
|
|
|
+ addr, skb->len);
|
|
|
|
+ if (unlikely(rc)) {
|
|
|
|
+ ipoib_warn(priv, "post_send failed, error %d\n", rc);
|
|
++dev->stats.tx_errors;
|
|
++dev->stats.tx_errors;
|
|
ib_dma_unmap_single(priv->ca, addr, skb->len, DMA_TO_DEVICE);
|
|
ib_dma_unmap_single(priv->ca, addr, skb->len, DMA_TO_DEVICE);
|
|
dev_kfree_skb_any(skb);
|
|
dev_kfree_skb_any(skb);
|