sunvnet: Do not ask for an ACK for every dring transmit
authorSowmini Varadhan <sowmini.varadhan@oracle.com>
Tue, 12 Aug 2014 14:27:24 +0000 (10:27 -0400)
committerDavid S. Miller <davem@davemloft.net>
Thu, 14 Aug 2014 03:04:46 +0000 (20:04 -0700)
No need to ask for an ack with every vnet_start_xmit()- the single
ACK with DRING_STOPPED is sufficient for the protocol, and we free
the sk_buff in vnet_start_xmit itself, so we dont need an ACK back.

Signed-off-by: Sowmini Varadhan <sowmini.varadhan@oracle.com>
Acked-by: Raghuram Kothakota <raghuram.kothakota@oracle.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/ethernet/sun/sunvnet.c

index d813bfb1a847b527d27db6709eac8baac96a2513..238434dcfe02dc65aa86c0edfe071b8f93ac7c2c 100644 (file)
@@ -691,7 +691,15 @@ static int vnet_start_xmit(struct sk_buff *skb, struct net_device *dev)
                memset(tx_buf+VNET_PACKET_SKIP+skb->len, 0, len - skb->len);
        }
 
-       d->hdr.ack = VIO_ACK_ENABLE;
+       /* We don't rely on the ACKs to free the skb in vnet_start_xmit(),
+        * thus it is safe to not set VIO_ACK_ENABLE for each transmission:
+        * the protocol itself does not require it as long as the peer
+        * sends a VIO_SUBTYPE_ACK for VIO_DRING_STOPPED.
+        *
+        * An ACK for every packet in the ring is expensive as the
+        * sending of LDC messages is slow and affects performance.
+        */
+       d->hdr.ack = VIO_ACK_DISABLE;
        d->size = len;
        d->ncookies = port->tx_bufs[dr->prod].ncookies;
        for (i = 0; i < d->ncookies; i++)