Page Menu
Home
FreeBSD
Search
Configure Global Search
Log In
Files
F108296453
D43167.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Flag For Later
Award Token
Size
2 KB
Referenced Files
None
Subscribers
None
D43167.diff
View Options
diff --git a/sys/dev/virtio/network/if_vtnet.c b/sys/dev/virtio/network/if_vtnet.c
--- a/sys/dev/virtio/network/if_vtnet.c
+++ b/sys/dev/virtio/network/if_vtnet.c
@@ -2398,8 +2398,6 @@
vtnet_txq_offload_tso(struct vtnet_txq *txq, struct mbuf *m, int eth_type,
int offset, struct virtio_net_hdr *hdr)
{
- static struct timeval lastecn;
- static int curecn;
struct vtnet_softc *sc;
struct tcphdr *tcp, tcphdr;
@@ -2416,22 +2414,6 @@
hdr->gso_type = eth_type == ETHERTYPE_IP ? VIRTIO_NET_HDR_GSO_TCPV4 :
VIRTIO_NET_HDR_GSO_TCPV6;
- if (__predict_false(tcp->th_flags & TH_CWR)) {
- /*
- * Drop if VIRTIO_NET_F_HOST_ECN was not negotiated. In
- * FreeBSD, ECN support is not on a per-interface basis,
- * but globally via the net.inet.tcp.ecn.enable sysctl
- * knob. The default is off.
- */
- if ((sc->vtnet_flags & VTNET_FLAG_TSO_ECN) == 0) {
- if (ppsratecheck(&lastecn, &curecn, 1))
- if_printf(sc->vtnet_ifp,
- "TSO with ECN not negotiated with host\n");
- return (ENOTSUP);
- }
- hdr->gso_type |= VIRTIO_NET_HDR_GSO_ECN;
- }
-
txq->vtntx_stats.vtxs_tso++;
return (0);
diff --git a/sys/dev/virtio/network/virtio_net.h b/sys/dev/virtio/network/virtio_net.h
--- a/sys/dev/virtio/network/virtio_net.h
+++ b/sys/dev/virtio/network/virtio_net.h
@@ -466,8 +466,6 @@
virtio_net_tx_offload_tso(if_t ifp, struct mbuf *m, int eth_type,
int offset, bool allow_ecn, struct virtio_net_hdr *hdr)
{
- static struct timeval lastecn;
- static int curecn;
struct tcphdr *tcp, tcphdr;
if (__predict_false(m->m_len < offset + sizeof(struct tcphdr))) {
@@ -481,21 +479,6 @@
hdr->gso_type = eth_type == ETHERTYPE_IP ? VIRTIO_NET_HDR_GSO_TCPV4 :
VIRTIO_NET_HDR_GSO_TCPV6;
- if (tcp->th_flags & TH_CWR) {
- /*
- * Drop if VIRTIO_NET_F_HOST_ECN was not negotiated. In FreeBSD,
- * ECN support is not on a per-interface basis, but globally via
- * the net.inet.tcp.ecn.enable sysctl knob. The default is off.
- */
- if (!allow_ecn) {
- if (ppsratecheck(&lastecn, &curecn, 1))
- if_printf(ifp,
- "TSO with ECN not negotiated with host\n");
- return (ENOTSUP);
- }
- hdr->gso_type |= VIRTIO_NET_HDR_GSO_ECN;
- }
-
/* Here we should increment tx_tso counter. */
return (0);
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Fri, Jan 24, 3:38 PM (16 h, 57 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
16090703
Default Alt Text
D43167.diff (2 KB)
Attached To
Mode
D43167: virtio-network: no bail-out on CWR even without host support
Attached
Detach File
Event Timeline
Log In to Comment