diff options
author | Zhouyi Zhou <zhouzhouyi@gmail.com> | 2016-12-07 10:30:05 +0300 |
---|---|---|
committer | Doug Ledford <dledford@redhat.com> | 2016-12-14 22:26:49 +0300 |
commit | 6a3a1056d66e6a64446930b0d9de2430d835d38f (patch) | |
tree | a74407d72cb26a6a5d4da1a5e6fda04eca0fef0e | |
parent | 3b9d9650096921f27086d8e0a66eba277f7badba (diff) | |
download | linux-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>
-rw-r--r-- | drivers/infiniband/hw/nes/nes_nic.c | 8 |
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)) |