]> www.infradead.org Git - users/jedix/linux-maple.git/commitdiff
sunvnet: hack to work around Solaris VIO bug
authorSowmini Varadhan <sowmini.varadhan@oracle.com>
Thu, 21 Jan 2016 12:09:49 +0000 (04:09 -0800)
committerAllen Pais <allen.pais@oracle.com>
Thu, 21 Jan 2016 17:42:18 +0000 (23:12 +0530)
Orabug 21895216

port workaround used for Bug 20455702:

This patch works around a problem where Solaris drops packets bound for
physical NICs (i.e., off host) that are using LSO and do not have the VIO v7
descriptor flags VNET_PKT_HASH, VNET_PKT_HCK_IPV4_HDRCKSUM,
VNET_PKT_HCK_FULLCKSUM set along with VNET_PKT_IPV4_LSO.

This patch can't go upstream because it doesn't actually support output
hashing (all packets will hash to '0'). The full and IPv4 header checksum
computations caused by the flags are unnecessary for Linux, but only affect
destinations through the vswitch.
(cherry picked from commit 3839694e54df457997025775894f954ea3185aff)

drivers/net/ethernet/sun/sunvnet.c

index 161343fb6ac24a979923569667be3a44b86f5289..e061166f47cd95ea5ebad641587cab4e0b8d8007 100644 (file)
@@ -1369,6 +1369,20 @@ static int vnet_start_xmit(struct sk_buff *skb, struct net_device *dev)
                        dext->ipv4_lso_mss = skb_shinfo(port->tx_bufs[txi].skb)
                                             ->gso_size;
                        dext->flags |= VNET_PKT_IPV4_LSO;
+
+                       /*
+                        * HACK: packets going out a physical NIC are dropped
+                        * by Solaris unless all of these are set. We:
+                        * 1) have already generated fullcksum
+                        * 2) have already generated IPv4 header cksum
+                        * 3) are not generating a hash
+                        * ...which is why these flags should NOT be set.
+                        */
+                       if (port->switch_port) {
+                               dext->flags |= VNET_PKT_HCK_FULLCKSUM;
+                               dext->flags |= VNET_PKT_HCK_IPV4_HDRCKSUM;
+                               dext->flags |= VNET_PKT_HASH;
+                       }
                }
                if (vio_version_after_eq(&port->vio, 1, 8) &&
                    !port->switch_port) {