summaryrefslogtreecommitdiff
path: root/drivers
diff options
context:
space:
mode:
authorZhouyi Zhou <zhouzhouyi@gmail.com>2016-12-07 10:30:05 +0300
committerDoug Ledford <dledford@redhat.com>2016-12-14 22:26:49 +0300
commit6a3a1056d66e6a64446930b0d9de2430d835d38f (patch)
treea74407d72cb26a6a5d4da1a5e6fda04eca0fef0e /drivers
parent3b9d9650096921f27086d8e0a66eba277f7badba (diff)
downloadlinux-6a3a1056d66e6a64446930b0d9de2430d835d38f.tar.xz
infiniband: nes: return value of skb_linearize should be handled
Return value of skb_linearize should be handled in function nes_netdev_start_xmit. Compiled in x86_64 Signed-off-by: Zhouyi Zhou <yizhouzhou@ict.ac.cn> Reviewed-by: Yuval Shaia <yuval.shaia@oracle.com> Reviewed-by: Eric Dumazet <eric.dumazet@gmail.com> Signed-off-by: Doug Ledford <dledford@redhat.com>
Diffstat (limited to 'drivers')
-rw-r--r--drivers/infiniband/hw/nes/nes_nic.c8
1 files changed, 6 insertions, 2 deletions
diff --git a/drivers/infiniband/hw/nes/nes_nic.c b/drivers/infiniband/hw/nes/nes_nic.c
index 311b4ba1cade..4dcfe669ebad 100644
--- a/drivers/infiniband/hw/nes/nes_nic.c
+++ b/drivers/infiniband/hw/nes/nes_nic.c
@@ -662,10 +662,14 @@ tso_sq_no_longer_full:
nesnic->sq_head &= nesnic->sq_size-1;
}
} else {
- nesvnic->linearized_skbs++;
hoffset = skb_transport_header(skb) - skb->data;
nhoffset = skb_network_header(skb) - skb->data;
- skb_linearize(skb);
+ if (skb_linearize(skb)) {
+ nesvnic->tx_sw_dropped++;
+ kfree_skb(skb);
+ return NETDEV_TX_OK;
+ }
+ nesvnic->linearized_skbs++;
skb_set_transport_header(skb, hoffset);
skb_set_network_header(skb, nhoffset);
if (!nes_nic_send(skb, netdev))