ibmvnic: enable RX checksum offload
authorThomas Falcon <tlfalcon@linux.vnet.ibm.com>
Fri, 1 Apr 2016 22:20:35 +0000 (17:20 -0500)
committerDavid S. Miller <davem@davemloft.net>
Tue, 5 Apr 2016 23:51:38 +0000 (19:51 -0400)
Enable RX Checksum offload feature in the ibmvnic driver.

Signed-off-by: Thomas Falcon <tlfalcon@linux.vnet.ibm.com>
Cc: John Allen <jallen@linux.vnet.ibm.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/ethernet/ibm/ibmvnic.c

index 4e97e762e297cc6cb2fd483c2650ba60415a7c97..21bccf6eb9198da0bcf092e97b6892092e889cc1 100644 (file)
@@ -2105,6 +2105,10 @@ static void handle_query_ip_offload_rsp(struct ibmvnic_adapter *adapter)
        if (buf->tcp_ipv6_chksum || buf->udp_ipv6_chksum)
                adapter->netdev->features |= NETIF_F_IPV6_CSUM;
 
+       if ((adapter->netdev->features &
+           (NETIF_F_IP_CSUM | NETIF_F_IPV6_CSUM)))
+               adapter->netdev->features |= NETIF_F_RXCSUM;
+
        memset(&crq, 0, sizeof(crq));
        crq.control_ip_offload.first = IBMVNIC_CRQ_CMD;
        crq.control_ip_offload.cmd = CONTROL_IP_OFFLOAD;