Message ID | 20201008190538.6223-2-dwilder@us.ibm.com (mailing list archive) |
---|---|
State | Not Applicable |
Headers | show |
Series | ibmveth gso fix. | expand |
On Thu, Oct 8, 2020 at 3:06 PM David Wilder <dwilder@us.ibm.com> wrote: > > ibmveth_rx_csum_helper() must be called after ibmveth_rx_mss_helper() > as ibmveth_rx_csum_helper() may alter ip and tcp checksum values. > > Signed-off-by: David Wilder <dwilder@us.ibm.com> > Reviewed-by: Thomas Falcon <tlfalcon@linux.ibm.com> > Reviewed-by: Cristobal Forno <cris.forno@ibm.com> > Reviewed-by: Pradeep Satyanarayana <pradeeps@linux.vnet.ibm.com> Acked-by: Willem de Bruijn <willemb@google.com> (for netdrv) At first glance the two features sound independent, but this device may pass mss information through the tcp checksum field. Hence that must not get overwritten first. " /* if mss is not set through Large Packet bit/mss in rx buffer, * expect that the mss will be written to the tcp header checksum. */ "
diff --git a/drivers/net/ethernet/ibm/ibmveth.c b/drivers/net/ethernet/ibm/ibmveth.c index c5c7326..3935a7e 100644 --- a/drivers/net/ethernet/ibm/ibmveth.c +++ b/drivers/net/ethernet/ibm/ibmveth.c @@ -1385,16 +1385,16 @@ static int ibmveth_poll(struct napi_struct *napi, int budget) skb_put(skb, length); skb->protocol = eth_type_trans(skb, netdev); - if (csum_good) { - skb->ip_summed = CHECKSUM_UNNECESSARY; - ibmveth_rx_csum_helper(skb, adapter); - } - if (length > netdev->mtu + ETH_HLEN) { ibmveth_rx_mss_helper(skb, mss, lrg_pkt); adapter->rx_large_packets++; } + if (csum_good) { + skb->ip_summed = CHECKSUM_UNNECESSARY; + ibmveth_rx_csum_helper(skb, adapter); + } + napi_gro_receive(napi, skb); /* send it up */ netdev->stats.rx_packets++;