]> git.proxmox.com Git - mirror_ubuntu-artful-kernel.git/commit
ibmveth: Add a proper check for the availability of the checksum features
authorThomas Huth <thuth@redhat.com>
Tue, 24 Jan 2017 06:28:41 +0000 (07:28 +0100)
committerKleber Sacilotto de Souza <kleber.souza@canonical.com>
Wed, 19 Jul 2017 07:59:02 +0000 (09:59 +0200)
commitd7a8f132c5164fc01abe871eb4ee479642d2f2ec
tree0b601b85a40419be4923282271b8d23b7fe85862
parent24e76a04040bd0a1f37ef5ec560e6379f445e058
ibmveth: Add a proper check for the availability of the checksum features

BugLink: http://bugs.launchpad.net/bugs/1702863
[ Upstream commit 23d28a859fb847fd7fcfbd31acb3b160abb5d6ae ]

When using the ibmveth driver in a KVM/QEMU based VM, it currently
always prints out a scary error message like this when it is started:

 ibmveth 71000003 (unregistered net_device): unable to change
 checksum offload settings. 1 rc=-2 ret_attr=71000003

This happens because the driver always tries to enable the checksum
offloading without checking for the availability of this feature first.
QEMU does not support checksum offloading for the spapr-vlan device,
thus we always get the error message here.
According to the LoPAPR specification, the "ibm,illan-options" property
of the corresponding device tree node should be checked first to see
whether the H_ILLAN_ATTRIUBTES hypercall and thus the checksum offloading
feature is available. Thus let's do this in the ibmveth driver, too, so
that the error message is really only limited to cases where something
goes wrong, and does not occur if the feature is just missing.

Signed-off-by: Thomas Huth <thuth@redhat.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Sasha Levin <alexander.levin@verizon.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: Stefan Bader <stefan.bader@canonical.com>
Signed-off-by: Thadeu Lima de Souza Cascardo <cascardo@canonical.com>
drivers/net/ethernet/ibm/ibmveth.c