mlx4: trust shinfo->gso_segs
mlx4 is the only driver in the tree making a point to recompute shinfo->gso_segs. Lets remove superfluous code. Signed-off-by: Eric Dumazet <edumazet@google.com> Cc: Tariq Toukan <tariqt@mellanox.com> Cc: Saeed Mahameed <saeedm@mellanox.com> Reviewed-by: Saeed Mahameed <saeedm@mellanox.com> Signed-off-by: David S. Miller <davem@davemloft.net>
This commit is contained in:
parent
827d240a23
commit
75d04aa368
@ -978,8 +978,7 @@ netdev_tx_t mlx4_en_xmit(struct sk_buff *skb, struct net_device *dev)
|
||||
|
||||
ring->tso_packets++;
|
||||
|
||||
i = ((skb->len - lso_header_size) / shinfo->gso_size) +
|
||||
!!((skb->len - lso_header_size) % shinfo->gso_size);
|
||||
i = shinfo->gso_segs;
|
||||
tx_info->nr_bytes = skb->len + (i - 1) * lso_header_size;
|
||||
ring->packets += i;
|
||||
} else {
|
||||
|
Loading…
Reference in New Issue
Block a user