mirror of
https://github.com/torvalds/linux.git
synced 2024-12-15 23:51:46 +00:00
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>
This commit is contained in:
parent
3b9d965009
commit
6a3a1056d6
@ -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))
|
||||
|
Loading…
Reference in New Issue
Block a user