diff mbox series

[v2,1/2] ibmveth: Switch order of ibmveth_helper calls.

Message ID 20201013232014.26044-2-dwilder@us.ibm.com (mailing list archive)
State Not Applicable
Delegated to: Netdev Maintainers
Headers show
Series ibmveth gso fix. | expand

Commit Message

David J Wilder Oct. 13, 2020, 11:20 p.m. UTC
ibmveth_rx_csum_helper() must be called after ibmveth_rx_mss_helper()
as ibmveth_rx_csum_helper() may alter ip and tcp checksum values.

Fixes: 66aa0678efc2 ("ibmveth: Support to enable LSO/CSO for Trunk
VEA.")
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>
---
 drivers/net/ethernet/ibm/ibmveth.c | 10 +++++-----
 1 file changed, 5 insertions(+), 5 deletions(-)

Comments

Willem de Bruijn Oct. 14, 2020, 4:22 p.m. UTC | #1
On Tue, Oct 13, 2020 at 7:21 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.
>
> Fixes: 66aa0678efc2 ("ibmveth: Support to enable LSO/CSO for Trunk
> VEA.")
> 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>
Jakub Kicinski Oct. 15, 2020, 3:23 a.m. UTC | #2
On Tue, 13 Oct 2020 16:20:13 -0700 David Wilder wrote:
> Fixes: 66aa0678efc2 ("ibmveth: Support to enable LSO/CSO for Trunk
> VEA.")

Please make sure Fixes tags are not wrapped in the future.
diff mbox series

Patch

diff --git a/drivers/net/ethernet/ibm/ibmveth.c b/drivers/net/ethernet/ibm/ibmveth.c
index c5c732601e35..3935a7e22ce5 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++;