Skip to content

Instantly share code, notes, and snippets.

@pbiernacki
Created August 23, 2016 11:42
Show Gist options
  • Save pbiernacki/eb94b4e664f088625e3e33b09c22ccfd to your computer and use it in GitHub Desktop.
Save pbiernacki/eb94b4e664f088625e3e33b09c22ccfd to your computer and use it in GitHub Desktop.
Index: dev/xen/netback/netback.c
===================================================================
--- dev/xen/netback/netback.c (revision 304674)
+++ dev/xen/netback/netback.c (working copy)
@@ -116,7 +116,7 @@
#define GNTTAB_LEN (64)
/* Features supported by all backends. TSO and LRO can be negotiated */
-#define XNB_CSUM_FEATURES (CSUM_TCP | CSUM_UDP)
+#define XNB_CSUM_FEATURES (0)
#define NET_TX_RING_SIZE __RING_SIZE((netif_tx_sring_t *)0, PAGE_SIZE)
#define NET_RX_RING_SIZE __RING_SIZE((netif_rx_sring_t *)0, PAGE_SIZE)
@@ -2247,6 +2247,7 @@
#endif
break;
case SIOCSIFCAP:
+/*
mtx_lock(&xnb->sc_lock);
if (ifr->ifr_reqcap & IFCAP_TXCSUM) {
ifp->if_capenable |= IFCAP_TXCSUM;
@@ -2259,7 +2260,7 @@
ifp->if_capenable |= IFCAP_RXCSUM;
} else {
ifp->if_capenable &= ~(IFCAP_RXCSUM);
- }
+ }*/
/*
* TODO enable TSO4 and LRO once we no longer need
* to calculate checksums in software
@@ -2285,7 +2286,7 @@
ifp->if_capenable &= ~(IFCAP_LRO);
}
#endif
- mtx_unlock(&xnb->sc_lock);
+// mtx_unlock(&xnb->sc_lock);
break;
case SIOCSIFMTU:
ifp->if_mtu = ifr->ifr_mtu;
Index: dev/xen/netfront/netfront.c
===================================================================
--- dev/xen/netfront/netfront.c (revision 304674)
+++ dev/xen/netfront/netfront.c (working copy)
@@ -93,7 +93,7 @@
#include "xenbus_if.h"
/* Features supported by all backends. TSO and LRO can be negotiated */
-#define XN_CSUM_FEATURES (CSUM_TCP | CSUM_UDP)
+#define XN_CSUM_FEATURES (0)
#define NET_TX_RING_SIZE __RING_SIZE((netif_tx_sring_t *)0, PAGE_SIZE)
#define NET_RX_RING_SIZE __RING_SIZE((netif_rx_sring_t *)0, PAGE_SIZE)
@@ -105,7 +105,7 @@
* interface must be reset (down/up) for it
* to take effect.
*/
-static int xn_enable_lro = 1;
+static int xn_enable_lro = 0;
TUNABLE_INT("hw.xn.enable_lro", &xn_enable_lro);
#else
@@ -1997,11 +1997,11 @@
"feature-gso-tcpv4", NULL, "%d", &val) < 0)
val = 0;
- np->xn_ifp->if_capabilities &= ~(IFCAP_TSO4|IFCAP_LRO);
+/* np->xn_ifp->if_capabilities &= ~(IFCAP_TSO4|IFCAP_LRO);
if (val) {
np->xn_ifp->if_capabilities |= IFCAP_TSO4|IFCAP_LRO;
printf(" feature-gso-tcp4");
- }
+ }*/
printf("\n");
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment