[Differential] D1777: Associated fix for arp/nd6 timer usage.
hselasky added a subscriber: glebius. hselasky added a comment. @oleg : Beware of the callout return value differences between FreeBSD 9-10-11 and 12 ! @glebius REVISION DETAIL https://reviews.freebsd.org/D1777 EMAIL PREFERENCES https://reviews.freebsd.org/settings/panel/emailpreferences/ To: rrs, kib, jhb, imp, lstewart, gnn, sbruno, bz, adrian, rwatson Cc: glebius, oleg, ae, bz, freebsd-net-list, emaste, hiren, julian, hselasky ___ freebsd-net@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/freebsd-net To unsubscribe, send any mail to "freebsd-net-unsubscr...@freebsd.org"
[Differential] D8685: Fix a false positive in a buf_ring assert
hselasky accepted this revision. hselasky added a reviewer: hselasky. hselasky added a comment. This revision has a positive review. Looks good to me. REVISION DETAIL https://reviews.freebsd.org/D8685 EMAIL PREFERENCES https://reviews.freebsd.org/settings/panel/emailpreferences/ To: rstone, hselasky Cc: hselasky, freebsd-net-list, emaste ___ freebsd-net@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/freebsd-net To unsubscribe, send any mail to "freebsd-net-unsubscr...@freebsd.org"
[Differential] D8685: Fix a false positive in a buf_ring assert
hselasky added inline comments. INLINE COMMENTS > buf_ring.h:71 > + if (br->br_cons_head != br->br_prod_head) { > + for (i = br->br_cons_head + 1; i != br->br_prod_head; > + i = ((i + 1) & br->br_cons_mask)) should "br->br_cons_head + 1" be masked by br->br_cons_mask ?? REVISION DETAIL https://reviews.freebsd.org/D8685 EMAIL PREFERENCES https://reviews.freebsd.org/settings/panel/emailpreferences/ To: rstone Cc: hselasky, freebsd-net-list, emaste ___ freebsd-net@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/freebsd-net To unsubscribe, send any mail to "freebsd-net-unsubscr...@freebsd.org"
[Differential] D7710: net/vlan: Shift for pri is 13 (pri mask 0xe000) not 1.
hselasky accepted this revision. hselasky added a reviewer: hselasky. hselasky added a comment. Don't forget to MFC. REVISION DETAIL https://reviews.freebsd.org/D7710 EMAIL PREFERENCES https://reviews.freebsd.org/settings/panel/emailpreferences/ To: sepherosa_gmail.com, glebius, bz, gnn, rwatson, bms, araujo, hselasky Cc: hselasky, freebsd-net-list ___ freebsd-net@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/freebsd-net To unsubscribe, send any mail to "freebsd-net-unsubscr...@freebsd.org"
[Differential] D7593: net/rndis: Add canonical RNDIS major/minor version as of today.
hselasky accepted this revision. This revision has a positive review. REVISION DETAIL https://reviews.freebsd.org/D7593 EMAIL PREFERENCES https://reviews.freebsd.org/settings/panel/emailpreferences/ To: sepherosa_gmail.com, glebius, bz, gnn, rwatson, hselasky Cc: freebsd-net-list ___ freebsd-net@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/freebsd-net To unsubscribe, send any mail to "freebsd-net-unsubscr...@freebsd.org"
[Differential] D7592: net: Split RNDIS protocol structs/macros out of dev/usb/net/if_urndisreg.h
hselasky accepted this revision. hselasky added a comment. This revision has a positive review. Just make sure the code builds, amd64, i386, arm. --HPS REVISION DETAIL https://reviews.freebsd.org/D7592 EMAIL PREFERENCES https://reviews.freebsd.org/settings/panel/emailpreferences/ To: sepherosa_gmail.com, glebius, rwatson, bz, gnn, adrian, hselasky Cc: freebsd-net-list ___ freebsd-net@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/freebsd-net To unsubscribe, send any mail to "freebsd-net-unsubscr...@freebsd.org"
[Differential] D7499: tcp/lro: Make # of LRO entries tunable
hselasky accepted this revision. REVISION DETAIL https://reviews.freebsd.org/D7499 EMAIL PREFERENCES https://reviews.freebsd.org/settings/panel/emailpreferences/ To: sepherosa_gmail.com, rrs, gallatin, np, #transport, hselasky Cc: freebsd-net-list ___ freebsd-net@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/freebsd-net To unsubscribe, send any mail to "freebsd-net-unsubscr...@freebsd.org"
[Differential] D7499: tcp/lro: Make # of LRO entries tunable
hselasky added inline comments. INLINE COMMENTS > tcp_lro.c:79 > + > +static unsigned tcp_lro_entries = TCP_LRO_ENTRIES; > +SYSCTL_UINT(_net_inet_tcp_lro, OID_AUTO, entries, Maybe you should use a procedure type and range check the argument. REVISION DETAIL https://reviews.freebsd.org/D7499 EMAIL PREFERENCES https://reviews.freebsd.org/settings/panel/emailpreferences/ To: sepherosa_gmail.com, rrs, gallatin, hselasky, np, #transport Cc: freebsd-net-list ___ freebsd-net@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/freebsd-net To unsubscribe, send any mail to "freebsd-net-unsubscr...@freebsd.org"
[Differential] D7415: tcp/lro: If timestamps mismatch or it's a FIN, force flush.
hselasky accepted this revision. hselasky added a comment. Looks good to me. --HPS REVISION DETAIL https://reviews.freebsd.org/D7415 EMAIL PREFERENCES https://reviews.freebsd.org/settings/panel/emailpreferences/ To: sepherosa_gmail.com, rrs, gallatin, np, glebius, hiren, bz, #transport, hselasky Cc: freebsd-net-list ___ freebsd-net@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/freebsd-net To unsubscribe, send any mail to "freebsd-net-unsubscr...@freebsd.org"
[Differential] D7415: tcp/lro: If timestamps mismatch or it's a FIN, force flush.
hselasky added inline comments. INLINE COMMENTS > tcp_lro.c:852 > } > > /* Try to find an empty slot. */ Should there be added: if (force_flush) return (TCP_LRO_CANNOT); If no match is found in the list? REVISION DETAIL https://reviews.freebsd.org/D7415 EMAIL PREFERENCES https://reviews.freebsd.org/settings/panel/emailpreferences/ To: sepherosa_gmail.com, rrs, gallatin, hselasky, np, glebius, #transport, hiren, bz Cc: freebsd-net-list ___ freebsd-net@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/freebsd-net To unsubscribe, send any mail to "freebsd-net-unsubscr...@freebsd.org"
[Differential] D6689: tcp/lro: Implement hash table for LRO entries.
hselasky added a comment. @sepherosa_gmail.com Regarding performance. Is it possible to get the Hyper-V to sort the IP-packets before they enter the FreeBSD network stack in the VM? REVISION DETAIL https://reviews.freebsd.org/D6689 EMAIL PREFERENCES https://reviews.freebsd.org/settings/panel/emailpreferences/ To: sepherosa_gmail.com, rrs, glebius, gnn, bz, rwatson, #transport, hselasky, gallatin Cc: freebsd-net-list ___ freebsd-net@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/freebsd-net To unsubscribe, send any mail to "freebsd-net-unsubscr...@freebsd.org"
[Differential] D6689: tcp/lro: Implement hash table for LRO entries.
hselasky added a comment. Hi, Were you able to test the performance using tcp_lro_queue_mbuf() ? Better name for function?? tcp_lro_rx2() -> tcp_lro_rx_sub() --HPS REVISION DETAIL https://reviews.freebsd.org/D6689 EMAIL PREFERENCES https://reviews.freebsd.org/settings/panel/emailpreferences/ To: sepherosa_gmail.com, rrs, glebius, gnn, bz, rwatson, #transport, hselasky, gallatin Cc: freebsd-net-list ___ freebsd-net@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/freebsd-net To unsubscribe, send any mail to "freebsd-net-unsubscr...@freebsd.org"
[Differential] D6689: tcp/lro: Implement hash table for LRO entries.
___ freebsd-net@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/freebsd-net To unsubscribe, send any mail to "freebsd-net-unsubscr...@freebsd.org"
[Differential] D6688: net: Use M_HASHTYPE_OPAQUE_HASH if the mbuf flowid has hash properties
___ freebsd-net@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/freebsd-net To unsubscribe, send any mail to "freebsd-net-unsubscr...@freebsd.org"
[Differential] D6689: tcp/lro: Implement hash table for LRO entries.
___ freebsd-net@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/freebsd-net To unsubscribe, send any mail to "freebsd-net-unsubscr...@freebsd.org"
[Differential] D6689: tcp/lro: Implement hash table for LRO entries.
___ freebsd-net@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/freebsd-net To unsubscribe, send any mail to "freebsd-net-unsubscr...@freebsd.org"
[Differential] D6406: mbuf: Add a flag for M_HASHTYPE_ to indicate the type has hash properties
___ freebsd-net@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/freebsd-net To unsubscribe, send any mail to "freebsd-net-unsubscr...@freebsd.org"
[Differential] D6406: mbuf: Add a flag for M_HASHTYPE_ to indicate the type has hash properties
___ freebsd-net@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/freebsd-net To unsubscribe, send any mail to "freebsd-net-unsubscr...@freebsd.org"
[Differential] D6406: mbuf: Add a flag for M_HASHTYPE_ to indicate the type has hash properties
___ freebsd-net@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/freebsd-net To unsubscribe, send any mail to "freebsd-net-unsubscr...@freebsd.org"
[Differential] D6406: mbuf: Add a flag for M_HASHTYPE_ to indicate the type has hash properties
___ freebsd-net@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/freebsd-net To unsubscribe, send any mail to "freebsd-net-unsubscr...@freebsd.org"
[Differential] D6406: mbuf: Add a flag for M_HASHTYPE_ to indicate the type has hash properties
___ freebsd-net@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/freebsd-net To unsubscribe, send any mail to "freebsd-net-unsubscr...@freebsd.org"
[Differential] D6406: mbuf: Add a flag for M_HASHTYPE_ to indicate the type has hash properties
hselasky added a comment. What is the advantage of this bit versus a hash-type range check? REVISION DETAIL https://reviews.freebsd.org/D6406 EMAIL PREFERENCES https://reviews.freebsd.org/settings/panel/emailpreferences/ To: sepherosa_gmail.com, #network, adrian, delphij, rwatson, gnn, glebius, rrs, gallatin, bz Cc: hselasky, freebsd-net-list ___ freebsd-net@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/freebsd-net To unsubscribe, send any mail to "freebsd-net-unsubscr...@freebsd.org"
[Differential] D6120: tcp/syncache: Set flowid and hash type properly for SYN|ACK
hselasky added a comment. Basically what you're doing is to loop back the flowid of the received packet - right? Maybe you could put that in a code comment. REVISION DETAIL https://reviews.freebsd.org/D6120 EMAIL PREFERENCES https://reviews.freebsd.org/settings/panel/emailpreferences/ To: sepherosa_gmail.com, adrian, rwatson, gnn, lstewart, glebius, delphij, mike-karels.net, jtl, network, transport, hiren, sbruno Cc: hselasky, freebsd-net-list ___ freebsd-net@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/freebsd-net To unsubscribe, send any mail to "freebsd-net-unsubscr...@freebsd.org"
[Differential] [Updated] D5185: tcp/lro: Allow network drivers to set the limit for TCP ACK/data segment aggregation limit
hselasky added a comment. The size of lro_ctrl already changed when the statistics was made 64-bit. Just remember to bump the FreeBSD_version. Might not be possible to MFC. REVISION DETAIL https://reviews.freebsd.org/D5185 EMAIL PREFERENCES https://reviews.freebsd.org/settings/panel/emailpreferences/ To: sepherosa_gmail.com, delphij, royger, decui_microsoft.com, honzhan_microsoft.com, howard0su_gmail.com, np, transport, gallatin, adrian, network, hselasky Cc: freebsd-virtualization-list, freebsd-net-list ___ freebsd-net@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/freebsd-net To unsubscribe, send any mail to "freebsd-net-unsubscr...@freebsd.org"
[Differential] [Commented On] D5185: tcp/lro: Allow network drivers to set the limit for TCP ACK/data segment aggregation limit
hselasky added inline comments. INLINE COMMENTS sys/netinet/tcp_lro.h:94 Might be worth set this limit to unsigned instead of unsigned short. Technically we can LRO more than 64KBytes worth of data! REVISION DETAIL https://reviews.freebsd.org/D5185 EMAIL PREFERENCES https://reviews.freebsd.org/settings/panel/emailpreferences/ To: sepherosa_gmail.com, delphij, royger, decui_microsoft.com, honzhan_microsoft.com, howard0su_gmail.com, hselasky, np, transport, gallatin, adrian, network Cc: freebsd-virtualization-list, freebsd-net-list ___ freebsd-net@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/freebsd-net To unsubscribe, send any mail to "freebsd-net-unsubscr...@freebsd.org"
[Differential] [Updated] D4825: tcp/lro: Add network driver configurable LRO entry depth
hselasky added a comment. FYI https://reviews.freebsd.org/D1761 might be related to this one. Should you check that "lc->lro_hiwat" is greater or equal to "lc->ifp->if_mtu" ? --HPS REVISION DETAIL https://reviews.freebsd.org/D4825 EMAIL PREFERENCES https://reviews.freebsd.org/settings/panel/emailpreferences/ To: sepherosa_gmail.com, network, transport, adrian, delphij, decui_microsoft.com, honzhan_microsoft.com, howard0su_gmail.com, glebius Cc: hselasky, np, freebsd-net-list ___ freebsd-net@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/freebsd-net To unsubscribe, send any mail to "freebsd-net-unsubscr...@freebsd.org"
[Differential] [Commented On] D1761: Extend LRO support to accumulate more than 65535 bytes
hselasky added a comment. lstewart: We can generate a paper documenting the benefits of enlarging the IP-packet input payload, so that we can fully understand what is going on. Going the multipacket approach seems a bit more tricky, hence it involves changing the TCP and posibly also if_output() calls needs to handle this aswell, though not impossible. lstewart: What should an mbuf accessor that computes the total pktheader payload for multiple mbufs be called? m_pkthdr_chain_length(m) ?? REPOSITORY rS FreeBSD src repository REVISION DETAIL https://reviews.freebsd.org/D1761 EMAIL PREFERENCES https://reviews.freebsd.org/settings/panel/emailpreferences/ To: hselasky, rrs, glebius, gnn, emaste, rwatson, bz, imp, np, jfv, adrian, lstewart Cc: imp, freebsd-net-list ___ freebsd-net@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-net To unsubscribe, send any mail to freebsd-net-unsubscr...@freebsd.org
[Differential] [Commented On] D1761: Extend LRO support to accumulate more than 65535 bytes
hselasky added a comment. lawrence: It is someone well known to be using FreeBSD. This patch makes such a big difference when applied to +10Gbit/s connections that we can run 2 TCP streams totalling 37.5 GBit/s on a single 2.x GHz CPU core instead of only one. REPOSITORY rS FreeBSD src repository REVISION DETAIL https://reviews.freebsd.org/D1761 EMAIL PREFERENCES https://reviews.freebsd.org/settings/panel/emailpreferences/ To: hselasky, rrs, glebius, gnn, emaste, rwatson, bz, imp, np, jfv, adrian, lstewart Cc: imp, freebsd-net-list ___ freebsd-net@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-net To unsubscribe, send any mail to freebsd-net-unsubscr...@freebsd.org
[Differential] [Commented On] D1761: Extend LRO support to accumulate more than 65535 bytes
hselasky added a comment. lstewart: OK, just don't delete this patch, because some people are using it. REPOSITORY rS FreeBSD src repository REVISION DETAIL https://reviews.freebsd.org/D1761 EMAIL PREFERENCES https://reviews.freebsd.org/settings/panel/emailpreferences/ To: hselasky, rrs, glebius, gnn, emaste, rwatson, bz, imp, np, jfv, adrian, lstewart Cc: imp, freebsd-net-list ___ freebsd-net@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-net To unsubscribe, send any mail to freebsd-net-unsubscr...@freebsd.org
[Differential] [Updated, 87 lines] D1761: Extend LRO support to accumulate more than 65535 bytes
hselasky updated this revision to Diff 5720. hselasky added a comment. Herald added a subscriber: imp. Minor fix for computing correct ip6_plen in ip6_input(). Previously only the first 64K of the payload was consumed. REPOSITORY rS FreeBSD src repository CHANGES SINCE LAST UPDATE https://reviews.freebsd.org/D1761?vs=3630id=5720 REVISION DETAIL https://reviews.freebsd.org/D1761 AFFECTED FILES sys/conf/options sys/netinet/ip_input.c sys/netinet/ip_output.c sys/netinet/tcp_input.c sys/netinet/tcp_lro.c sys/netinet6/ip6_input.c sys/sys/mbuf.h EMAIL PREFERENCES https://reviews.freebsd.org/settings/panel/emailpreferences/ To: hselasky, rrs, glebius, gnn, emaste, lstewart, rwatson, bz, imp, np, jfv, adrian Cc: imp, freebsd-net diff --git a/sys/sys/mbuf.h b/sys/sys/mbuf.h --- a/sys/sys/mbuf.h +++ b/sys/sys/mbuf.h @@ -306,6 +306,7 @@ #define M_HASHTYPE_RSS_UDP_IPV6 9 /* IPv6 UDP 4-tuple */ #define M_HASHTYPE_RSS_UDP_IPV6_EX 10 /* IPv6 UDP 4-tuple + ext hdrs */ +#define M_HASHTYPE_LRO_TCP 254 /* TCP large receive offload */ #define M_HASHTYPE_OPAQUE 255 /* ordering, not affinity */ #define M_HASHTYPE_CLEAR(m) ((m)-m_pkthdr.rsstype = 0) diff --git a/sys/netinet6/ip6_input.c b/sys/netinet6/ip6_input.c --- a/sys/netinet6/ip6_input.c +++ b/sys/netinet6/ip6_input.c @@ -694,7 +694,13 @@ * m may be modified in ip6_hopopts_input(). * If a JumboPayload option is included, plen will also be modified. */ - plen = (u_int32_t)ntohs(ip6-ip6_plen); + if (M_HASHTYPE_GET(m) == M_HASHTYPE_LRO_TCP) { + if (m-m_pkthdr.len sizeof(struct ip6_hdr)) + plen = 0; + else + plen = m-m_pkthdr.len - sizeof(struct ip6_hdr); + } else + plen = (u_int32_t)ntohs(ip6-ip6_plen); if (ip6-ip6_nxt == IPPROTO_HOPOPTS) { if (ip6_input_hbh(m, plen, rtalert, off, nxt, ours) != 0) return; diff --git a/sys/netinet/tcp_lro.c b/sys/netinet/tcp_lro.c --- a/sys/netinet/tcp_lro.c +++ b/sys/netinet/tcp_lro.c @@ -32,6 +32,7 @@ #include sys/cdefs.h __FBSDID($FreeBSD$); +#include opt_lro.h #include opt_inet.h #include opt_inet6.h @@ -62,6 +63,14 @@ #define LRO_ENTRIES 8 /* # of LRO entries per RX queue. */ #endif +#ifndef LRO_PAYLOAD_MAX +#define LRO_PAYLOAD_MAX IP_MAXPACKET +#endif + +#if (LRO_PAYLOAD_MAX 65535) +#error LRO_PAYLOAD_MAX must be at least 65535 bytes +#endif + #define TCP_LRO_UPDATE_CSUM 1 #ifndef TCP_LRO_UPDATE_CSUM #define TCP_LRO_INVALID_CSUM 0x @@ -219,8 +228,20 @@ if (le-append_cnt 0) { struct tcphdr *th; uint16_t p_len; - - p_len = htons(le-p_len); + /* + * The TCP/IP stack should use the m_pkthdr.len + * field instead of the IP-payload length field to + * compute the total TCP payload length when it + * recognizes the M_HASHTYPE_LRO_TCP hash type. This + * allows accumulation of more than 64Kbytes worth of + * payload data. + */ + if (le-p_len IP_MAXPACKET) { + M_HASHTYPE_SET(le-m_head, M_HASHTYPE_LRO_TCP); + p_len = htons(IP_MAXPACKET); + } else { + p_len = htons(le-p_len); + } switch (le-eh_type) { #ifdef INET6 case ETHERTYPE_IPV6: @@ -501,7 +522,7 @@ } /* Flush now if appending will result in overflow. */ - if (le-p_len (65535 - tcp_data_len)) { + if (le-p_len (LRO_PAYLOAD_MAX - tcp_data_len)) { SLIST_REMOVE(lc-lro_active, le, lro_entry, next); tcp_lro_flush(lc, le); break; @@ -559,7 +580,7 @@ * If a possible next full length packet would cause an * overflow, pro-actively flush now. */ - if (le-p_len (65535 - lc-ifp-if_mtu)) { + if (le-p_len (LRO_PAYLOAD_MAX - lc-ifp-if_mtu)) { SLIST_REMOVE(lc-lro_active, le, lro_entry, next); tcp_lro_flush(lc, le); } else diff --git a/sys/netinet/tcp_input.c b/sys/netinet/tcp_input.c --- a/sys/netinet/tcp_input.c +++ b/sys/netinet/tcp_input.c @@ -644,7 +644,10 @@ ip6 = mtod(m, struct ip6_hdr *); th = (struct tcphdr *)((caddr_t)ip6 + off0); - tlen = sizeof(*ip6) + ntohs(ip6-ip6_plen) - off0; + if (M_HASHTYPE_GET(m) == M_HASHTYPE_LRO_TCP) + tlen = m-m_pkthdr.len - off0; + else + tlen = sizeof(*ip6) + ntohs(ip6-ip6_plen) - off0; if (m-m_pkthdr.csum_flags CSUM_DATA_VALID_IPV6) { if (m-m_pkthdr.csum_flags CSUM_PSEUDO_HDR) th-th_sum = m-m_pkthdr.csum_data; @@ -695,8 +698,10 @@ } ip = mtod(m, struct ip *); th = (struct tcphdr *)((caddr_t)ip + off0); - tlen = ntohs(ip-ip_len) - off0; - + if (M_HASHTYPE_GET(m) == M_HASHTYPE_LRO_TCP) + tlen = m-m_pkthdr.len - off0; + else + tlen = ntohs(ip-ip_len) - off0; if (m-m_pkthdr.csum_flags CSUM_DATA_VALID) { if (m-m_pkthdr.csum_flags CSUM_PSEUDO_HDR) th-th_sum = m-m_pkthdr.csum_data; diff --git a/sys/netinet/ip_output.c b/sys/netinet/ip_output.c --- a/sys/netinet/ip_output.c +++ b/sys/netinet/ip_output.c @@ -124,13 +124,14 @@ struct ifnet *ifp = NULL; /* keep compiler happy */ struct mbuf *m0; int hlen = sizeof (struct ip); + int ip_len; int mtu; int error = 0; struct sockaddr_in *dst; const struct sockaddr_in *gw; struct
[Differential] [Closed] D1438: FreeBSD callout rewrite and cleanup
This revision was automatically updated to reflect the committed changes. Closed by commit rS282414: Major callout subsystem cleanup and rewrite: (authored by hselasky). CHANGED PRIOR TO COMMIT https://reviews.freebsd.org/D1438?vs=4870id=5170#toc REPOSITORY rS FreeBSD src repository REVISION DETAIL https://reviews.freebsd.org/D1438 AFFECTED FILES projects/hps_head/share/man/man9/Makefile projects/hps_head/share/man/man9/timeout.9 projects/hps_head/sys/kern/init_main.c projects/hps_head/sys/kern/kern_clocksource.c projects/hps_head/sys/kern/kern_condvar.c projects/hps_head/sys/kern/kern_lock.c projects/hps_head/sys/kern/kern_switch.c projects/hps_head/sys/kern/kern_synch.c projects/hps_head/sys/kern/kern_thread.c projects/hps_head/sys/kern/kern_timeout.c projects/hps_head/sys/kern/subr_sleepqueue.c projects/hps_head/sys/ofed/include/linux/completion.h projects/hps_head/sys/ofed/include/linux/linux_compat.c projects/hps_head/sys/sys/_callout.h projects/hps_head/sys/sys/callout.h projects/hps_head/sys/sys/proc.h EMAIL PREFERENCES https://reviews.freebsd.org/settings/panel/emailpreferences/ To: hselasky, jhb, adrian, markj, emaste, sbruno, imp, lstewart, rwatson, gnn, rrs, kostikbel, delphij, neel, erj Cc: avg, jch, wblock, freebsd-net diff --git a/projects/hps_head/sys/sys/callout.h b/projects/hps_head/sys/sys/callout.h --- a/projects/hps_head/sys/sys/callout.h +++ b/projects/hps_head/sys/sys/callout.h @@ -45,10 +45,12 @@ #define CALLOUT_PENDING 0x0004 /* callout is waiting for timeout */ #define CALLOUT_MPSAFE 0x0008 /* callout handler is mp safe */ #define CALLOUT_RETURNUNLOCKED 0x0010 /* handler returns with mtx unlocked */ -#define CALLOUT_SHAREDLOCK 0x0020 /* callout lock held in shared mode */ -#define CALLOUT_DFRMIGRATION 0x0040 /* callout in deferred migration mode */ +#define CALLOUT_UNUSED_5 0x0020 /* --available-- */ +#define CALLOUT_DEFRESTART 0x0040 /* callout restart is deferred */ #define CALLOUT_PROCESSED 0x0080 /* callout in wheel or processing list? */ #define CALLOUT_DIRECT 0x0100 /* allow exec from hw int context */ +#define CALLOUT_SET_LC(x) (((x) 7) 16) /* set lock class */ +#define CALLOUT_GET_LC(x) (((x) 16) 7) /* get lock class */ #define C_DIRECT_EXEC 0x0001 /* direct execution of callout */ #define C_PRELBITS 7 @@ -63,25 +65,10 @@ }; #ifdef _KERNEL -/* - * Note the flags field is actually *two* fields. The c_flags - * field is the one that caller operations that may, or may not have - * a lock touches i.e. callout_deactivate(). The other, the c_iflags, - * is the internal flags that *must* be kept correct on which the - * callout system depend on e.g. callout_pending(). - * The c_iflag is used internally by the callout system to determine which - * list the callout is on and track internal state. Callers *should not* - * use the c_flags field directly but should use the macros provided. - * - * The c_iflags field holds internal flags that are protected by internal - * locks of the callout subsystem. The c_flags field holds external flags. - * The caller must hold its own lock while manipulating or reading external - * flags via callout_active(), callout_deactivate(), callout_reset*(), or - * callout_stop() to avoid races. - */ #define callout_active(c) ((c)-c_flags CALLOUT_ACTIVE) #define callout_deactivate(c) ((c)-c_flags = ~CALLOUT_ACTIVE) -#define callout_drain(c) _callout_stop_safe(c, 1) +int callout_drain(struct callout *); +int callout_drain_async(struct callout *, callout_func_t *, void *); void callout_init(struct callout *, int); void _callout_init_lock(struct callout *, struct lock_object *, int); #define callout_init_mtx(c, mtx, flags) \ @@ -93,9 +80,9 @@ #define callout_init_rw(c, rw, flags) \ _callout_init_lock((c), ((rw) != NULL) ? (rw)-lock_object : \ NULL, (flags)) -#define callout_pending(c) ((c)-c_iflags CALLOUT_PENDING) +#define callout_pending(c) ((c)-c_flags CALLOUT_PENDING) int callout_reset_sbt_on(struct callout *, sbintime_t, sbintime_t, - void (*)(void *), void *, int, int); + callout_func_t *, void *, int, int); #define callout_reset_sbt(c, sbt, pr, fn, arg, flags) \ callout_reset_sbt_on((c), (sbt), (pr), (fn), (arg), -1, (flags)) #define callout_reset_sbt_curcpu(c, sbt, pr, fn, arg, flags) \ @@ -119,8 +106,7 @@ int callout_schedule_on(struct callout *, int, int); #define callout_schedule_curcpu(c, on_tick)\ callout_schedule_on((c), (on_tick), PCPU_GET(cpuid)) -#define callout_stop(c) _callout_stop_safe(c, 0) -int _callout_stop_safe(struct callout *, int); +int callout_stop(struct callout *); void callout_process(sbintime_t now); #endif diff --git a/projects/hps_head/sys/sys/_callout.h b/projects/hps_head/sys/sys/_callout.h --- a/projects/hps_head/sys/sys/_callout.h +++ b/projects/hps_head/sys/sys/_callout.h @@ -46,6 +46,8 @@ SLIST_HEAD(callout_slist, callout); TAILQ_HEAD(callout_tailq, callout); +typedef void
[Differential] [Abandoned] D1893: Fix special case in ip_fragment() to produce a more sensible chain of packets
hselasky abandoned this revision. hselasky added a comment. Committed to FreeBSD-head in r279281. REVISION DETAIL https://reviews.freebsd.org/D1893 EMAIL PREFERENCES https://reviews.freebsd.org/settings/panel/emailpreferences/ To: hselasky, glebius, ken, eri, nitroboost-gmail.com, pluknet, ae, np, melifaro, hrs, wollman, bryanv, rpaulo, adrian, bz, gnn, hiren, rwatson Cc: freebsd-net ___ freebsd-net@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-net To unsubscribe, send any mail to freebsd-net-unsubscr...@freebsd.org
[Differential] [Updated, 2, 422 lines] D1438: FreeBSD callout rewrite and cleanup
hselasky set the repository for this revision to rS (FreeBSD src repository). hselasky updated this revision to Diff 4869. hselasky added a comment. Rebase patch to latest FreeBSD-current. CHANGES SINCE LAST UPDATE https://reviews.freebsd.org/D1438?vs=3956id=4869 REVISION DETAIL https://reviews.freebsd.org/D1438 AFFECTED FILES share/man/man9/Makefile share/man/man9/timeout.9 sys/kern/init_main.c sys/kern/kern_clocksource.c sys/kern/kern_condvar.c sys/kern/kern_lock.c sys/kern/kern_switch.c sys/kern/kern_synch.c sys/kern/kern_thread.c sys/kern/kern_timeout.c sys/kern/subr_sleepqueue.c sys/ofed/include/linux/completion.h sys/ofed/include/linux/linux_compat.c sys/sys/_callout.h sys/sys/callout.h sys/sys/proc.h To: hselasky, jhb, adrian, markj, emaste, sbruno, imp, lstewart, rwatson, gnn, rrs, kostikbel, delphij, neel, erj, mat, remkolodder, bcr, brueffer, brd, allanjude, wblock Cc: jch, wblock, freebsd-net ___ freebsd-net@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-net To unsubscribe, send any mail to freebsd-net-unsubscr...@freebsd.org
[Differential] [Updated] D1438: FreeBSD callout rewrite and cleanup
hselasky set the repository for this revision to rS (FreeBSD src repository). REVISION DETAIL https://reviews.freebsd.org/D1438 To: hselasky, jhb, adrian, markj, emaste, sbruno, imp, lstewart, rwatson, gnn, rrs, kostikbel, delphij, neel, erj, mat, remkolodder, bcr, brueffer, brd, allanjude, wblock Cc: jch, wblock, freebsd-net ___ freebsd-net@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-net To unsubscribe, send any mail to freebsd-net-unsubscr...@freebsd.org
[Differential] [Updated, 2, 444 lines] D1438: FreeBSD callout rewrite and cleanup
hselasky updated this revision to Diff 4870. hselasky added a comment. Revert more chunks as part of integration latest 11-current changes. CHANGES SINCE LAST UPDATE https://reviews.freebsd.org/D1438?vs=4869id=4870 REVISION DETAIL https://reviews.freebsd.org/D1438 AFFECTED FILES share/man/man9/Makefile share/man/man9/timeout.9 sys/kern/init_main.c sys/kern/kern_clocksource.c sys/kern/kern_condvar.c sys/kern/kern_lock.c sys/kern/kern_switch.c sys/kern/kern_synch.c sys/kern/kern_thread.c sys/kern/kern_timeout.c sys/kern/subr_sleepqueue.c sys/ofed/include/linux/completion.h sys/ofed/include/linux/linux_compat.c sys/sys/_callout.h sys/sys/callout.h sys/sys/proc.h To: hselasky, jhb, adrian, markj, emaste, sbruno, imp, lstewart, rwatson, gnn, rrs, kostikbel, delphij, neel, erj, mat, remkolodder, bcr, brueffer, brd, allanjude, wblock Cc: jch, wblock, freebsd-net ___ freebsd-net@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-net To unsubscribe, send any mail to freebsd-net-unsubscr...@freebsd.org
[Differential] [Changed Subscribers] D1965: Add extended media types to if_media.h and ifconfig
hselasky added a subscriber: hselasky. BRANCH /head INLINE COMMENTS sys/net/if_media.h:182 Style nit. tab after define. REVISION DETAIL https://reviews.freebsd.org/D1965 To: erj, adrian, jfvogel, gnn Cc: hselasky, mike-karels.net, glebius, freebsd-net ___ freebsd-net@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-net To unsubscribe, send any mail to freebsd-net-unsubscr...@freebsd.org
[Differential] [Updated] D1987: Factor out MBUF hashing code for Ethernet and TCP/IP.
hselasky set the repository for this revision to rS (FreeBSD src repository). REVISION DETAIL https://reviews.freebsd.org/D1987 To: hselasky, glebius, ken, adrian, ae Cc: freebsd-net ___ freebsd-net@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-net To unsubscribe, send any mail to freebsd-net-unsubscr...@freebsd.org
[Differential] [Updated] D1987: Factor out MBUF hashing code for Ethernet and TCP/IP.
hselasky added a reviewer: ae. REVISION DETAIL https://reviews.freebsd.org/D1987 To: hselasky, glebius, ken, adrian, ae Cc: freebsd-net ___ freebsd-net@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-net To unsubscribe, send any mail to freebsd-net-unsubscr...@freebsd.org
[Differential] [Updated, 532 lines] D1987: Factor out MBUF hashing code for Ethernet and TCP/IP.
hselasky updated this revision to Diff 4084. hselasky added a comment. Build fix. CHANGES SINCE LAST UPDATE https://reviews.freebsd.org/D1987?vs=4082id=4084 REVISION DETAIL https://reviews.freebsd.org/D1987 AFFECTED FILES sys/conf/files sys/kern/uipc_mbufhash.c sys/modules/mlxen/Makefile sys/net/ieee8023ad_lacp.c sys/net/if_lagg.c sys/net/if_lagg.h sys/ofed/drivers/net/mlx4/en_tx.c sys/ofed/drivers/net/mlx4/utils.c sys/ofed/drivers/net/mlx4/utils.h sys/sys/mbuf.h To: hselasky, glebius, ken, adrian Cc: freebsd-net ___ freebsd-net@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-net To unsubscribe, send any mail to freebsd-net-unsubscr...@freebsd.org
[Differential] [Updated, 529 lines] D1987: Factor out MBUF hashing code for Ethernet and TCP/IP.
hselasky updated this revision to Diff 4081. hselasky added a comment. Update patch to latest FreeBSD-11 code and fix some build issues. CHANGES SINCE LAST UPDATE https://reviews.freebsd.org/D1987?vs=4033id=4081 REVISION DETAIL https://reviews.freebsd.org/D1987 AFFECTED FILES conf/files kern/uipc_mbufhash.c modules/mlxen/Makefile net/ieee8023ad_lacp.c net/if_lagg.c net/if_lagg.h ofed/drivers/net/mlx4/en_tx.c ofed/drivers/net/mlx4/utils.c ofed/drivers/net/mlx4/utils.h sys/mbuf.h To: hselasky, glebius, ken, adrian Cc: freebsd-net ___ freebsd-net@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-net To unsubscribe, send any mail to freebsd-net-unsubscr...@freebsd.org
[Differential] [Updated, 529 lines] D1987: Factor out MBUF hashing code for Ethernet and TCP/IP.
hselasky updated this revision to Diff 4082. hselasky added a comment. Get the directory layout correct. CHANGES SINCE LAST UPDATE https://reviews.freebsd.org/D1987?vs=4081id=4082 REVISION DETAIL https://reviews.freebsd.org/D1987 AFFECTED FILES sys/conf/files sys/kern/uipc_mbufhash.c sys/modules/mlxen/Makefile sys/net/ieee8023ad_lacp.c sys/net/if_lagg.c sys/net/if_lagg.h sys/ofed/drivers/net/mlx4/en_tx.c sys/ofed/drivers/net/mlx4/utils.c sys/ofed/drivers/net/mlx4/utils.h sys/sys/mbuf.h To: hselasky, glebius, ken, adrian Cc: freebsd-net ___ freebsd-net@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-net To unsubscribe, send any mail to freebsd-net-unsubscr...@freebsd.org
[Differential] [Updated] D1761: Extend LRO support to accumulate more than 65535 bytes
hselasky added a reviewer: jfvogel. REVISION DETAIL https://reviews.freebsd.org/D1761 To: hselasky, rrs, glebius, gnn, emaste, lstewart, rwatson, bz, imp, np, adrian, jfvogel Cc: freebsd-net ___ freebsd-net@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-net To unsubscribe, send any mail to freebsd-net-unsubscr...@freebsd.org
[Differential] [Updated] D1987: Factor out MBUF hashing code for Ethernet and TCP/IP.
hselasky set the repository for this revision to rS (FreeBSD src repository). REVISION DETAIL https://reviews.freebsd.org/D1987 To: hselasky, glebius, ken, adrian Cc: freebsd-net ___ freebsd-net@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-net To unsubscribe, send any mail to freebsd-net-unsubscr...@freebsd.org
[Differential] [Updated] D1761: Extend LRO support to accumulate more than 65535 bytes
hselasky set the repository for this revision to rS (FreeBSD src repository). REVISION DETAIL https://reviews.freebsd.org/D1761 To: hselasky, rrs, glebius, gnn, emaste, lstewart, rwatson, bz, imp, np, adrian, jfvogel Cc: freebsd-net ___ freebsd-net@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-net To unsubscribe, send any mail to freebsd-net-unsubscr...@freebsd.org
[Differential] [Commented On] D1761: Extend LRO support to accumulate more than 65535 bytes
hselasky added a comment. Hi, Adrian: Would a set of macros hiding how we set and clear the LRO_TCP flag be acceptable, then we can later resolve that minor detail, exactly how the bit is encoded? #define M_SET_LRO_TCP(m) ... #define M_CLR_LRO_TCP(m) ... #define M_GET_LRO_TCP(m) ... --HPS REVISION DETAIL https://reviews.freebsd.org/D1761 To: hselasky, rrs, glebius, gnn, emaste, lstewart, rwatson, bz, imp, np, adrian Cc: freebsd-net ___ freebsd-net@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-net To unsubscribe, send any mail to freebsd-net-unsubscr...@freebsd.org
[Differential] [Updated, 518 lines] D1987: Factor out MBUF hashing code for Ethernet and TCP/IP.
hselasky updated this revision to Diff 4033. hselasky added a comment. Remove patches not belonging to this issue. CHANGES SINCE LAST UPDATE https://reviews.freebsd.org/D1987?vs=4032id=4033 REVISION DETAIL https://reviews.freebsd.org/D1987 AFFECTED FILES sys/conf/files sys/kern/uipc_mbufhash.c sys/net/if_lagg.c sys/ofed/drivers/net/mlx4/en_tx.c sys/ofed/drivers/net/mlx4/utils.c sys/ofed/drivers/net/mlx4/utils.h sys/sys/mbuf.h To: hselasky, glebius, ken, adrian Cc: freebsd-net ___ freebsd-net@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-net To unsubscribe, send any mail to freebsd-net-unsubscr...@freebsd.org
[Differential] [Request, 513 lines] D1987: Factor out MBUF hashing code for Ethernet and TCP/IP.
hselasky created this revision. hselasky added reviewers: glebius, ken, adrian. hselasky added a subscriber: freebsd-net. hselasky set the repository for this revision to rS (FreeBSD src repository). REVISION SUMMARY Factor out mbuf hashing code instead of copying it around. REVISION DETAIL https://reviews.freebsd.org/D1987 AFFECTED FILES sys/conf/files sys/kern/uipc_mbufhash.c sys/net/if_lagg.c sys/ofed/drivers/net/mlx4/en_tx.c sys/ofed/drivers/net/mlx4/utils.c sys/ofed/drivers/net/mlx4/utils.h sys/sys/mbuf.h To: hselasky, glebius, ken, adrian Cc: freebsd-net ___ freebsd-net@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-net To unsubscribe, send any mail to freebsd-net-unsubscr...@freebsd.org
[Differential] [Updated, 513 lines] D1987: Factor out MBUF hashing code for Ethernet and TCP/IP.
hselasky updated this revision to Diff 4030. hselasky added a comment. Add full patch context. CHANGES SINCE LAST UPDATE https://reviews.freebsd.org/D1987?vs=4029id=4030 REVISION DETAIL https://reviews.freebsd.org/D1987 AFFECTED FILES sys/conf/files sys/kern/uipc_mbufhash.c sys/net/if_lagg.c sys/ofed/drivers/net/mlx4/en_tx.c sys/ofed/drivers/net/mlx4/utils.c sys/ofed/drivers/net/mlx4/utils.h sys/sys/mbuf.h To: hselasky, glebius, ken, adrian Cc: freebsd-net ___ freebsd-net@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-net To unsubscribe, send any mail to freebsd-net-unsubscr...@freebsd.org
[Differential] [Updated, 1, 385 lines] D1987: Factor out MBUF hashing code for Ethernet and TCP/IP.
hselasky updated this revision to Diff 4032. hselasky added a comment. Factor out more code. CHANGES SINCE LAST UPDATE https://reviews.freebsd.org/D1987?vs=4030id=4032 REVISION DETAIL https://reviews.freebsd.org/D1987 AFFECTED FILES share/man/man9/Makefile share/man/man9/timeout.9 sys/conf/files sys/kern/uipc_mbufhash.c sys/net/if_lagg.c sys/ofed/drivers/net/mlx4/en_tx.c sys/ofed/drivers/net/mlx4/utils.c sys/ofed/drivers/net/mlx4/utils.h sys/sys/mbuf.h To: hselasky, glebius, ken, adrian Cc: freebsd-net ___ freebsd-net@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-net To unsubscribe, send any mail to freebsd-net-unsubscr...@freebsd.org
[Differential] [Updated, 2, 445 lines] D1438: FreeBSD callout rewrite and cleanup
hselasky updated this revision to Diff 3951. hselasky added a comment. MPSAFE callouts do not support CPU migration with this implementation CHANGES SINCE LAST UPDATE https://reviews.freebsd.org/D1438?vs=3922id=3951 REVISION DETAIL https://reviews.freebsd.org/D1438 AFFECTED FILES share/man/man9/Makefile share/man/man9/timeout.9 sys/kern/init_main.c sys/kern/kern_clocksource.c sys/kern/kern_condvar.c sys/kern/kern_lock.c sys/kern/kern_switch.c sys/kern/kern_synch.c sys/kern/kern_thread.c sys/kern/kern_timeout.c sys/kern/subr_sleepqueue.c sys/ofed/include/linux/completion.h sys/sys/_callout.h sys/sys/callout.h sys/sys/proc.h To: hselasky, jhb, adrian, markj, emaste, sbruno, imp, lstewart, rwatson, gnn, rrs, kostikbel, delphij, neel, erj, remkolodder, bcr, brueffer, brd, allanjude, wblock Cc: wblock, freebsd-net ___ freebsd-net@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-net To unsubscribe, send any mail to freebsd-net-unsubscr...@freebsd.org
[Differential] [Updated, 2, 367 lines] D1438: FreeBSD callout rewrite and cleanup
hselasky updated the summary for this revision. hselasky updated this revision to Diff 3956. hselasky added a comment. Restore how callout_lock() worked, so that a callout can migrate at any time regardless of callout type. Update manual page to reflect this change. Use an unsigned integer for callout buckets. The temporary LIST used by the callout code only needs to be initialized once at startup. CHANGES SINCE LAST UPDATE https://reviews.freebsd.org/D1438?vs=3951id=3956 REVISION DETAIL https://reviews.freebsd.org/D1438 AFFECTED FILES share/man/man9/Makefile share/man/man9/timeout.9 sys/kern/init_main.c sys/kern/kern_clocksource.c sys/kern/kern_condvar.c sys/kern/kern_lock.c sys/kern/kern_switch.c sys/kern/kern_synch.c sys/kern/kern_thread.c sys/kern/kern_timeout.c sys/kern/subr_sleepqueue.c sys/ofed/include/linux/completion.h sys/sys/_callout.h sys/sys/callout.h sys/sys/proc.h To: hselasky, jhb, adrian, markj, emaste, sbruno, imp, lstewart, rwatson, gnn, rrs, kostikbel, delphij, neel, erj, remkolodder, bcr, brueffer, brd, allanjude, wblock Cc: wblock, freebsd-net ___ freebsd-net@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-net To unsubscribe, send any mail to freebsd-net-unsubscr...@freebsd.org
[Differential] [Updated, 2, 452 lines] D1438: FreeBSD callout rewrite and cleanup
hselasky updated this revision to Diff 3922. hselasky added a comment. Replace spinlock_enter/exit with KASSERT's. CHANGES SINCE LAST UPDATE https://reviews.freebsd.org/D1438?vs=3897id=3922 REVISION DETAIL https://reviews.freebsd.org/D1438 AFFECTED FILES share/man/man9/Makefile share/man/man9/timeout.9 sys/kern/init_main.c sys/kern/kern_clocksource.c sys/kern/kern_condvar.c sys/kern/kern_lock.c sys/kern/kern_switch.c sys/kern/kern_synch.c sys/kern/kern_thread.c sys/kern/kern_timeout.c sys/kern/subr_sleepqueue.c sys/ofed/include/linux/completion.h sys/sys/_callout.h sys/sys/callout.h sys/sys/proc.h To: hselasky, jhb, adrian, markj, emaste, sbruno, imp, lstewart, rwatson, gnn, rrs, kostikbel, delphij, neel, erj, remkolodder, bcr, brueffer, brd, allanjude, wblock Cc: wblock, freebsd-net ___ freebsd-net@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-net To unsubscribe, send any mail to freebsd-net-unsubscr...@freebsd.org
[Differential] [Updated, 2, 481 lines] D1438: FreeBSD callout rewrite and cleanup
hselasky updated this revision to Diff 3897. hselasky added a comment. Add context to diff. CHANGES SINCE LAST UPDATE https://reviews.freebsd.org/D1438?vs=3896id=3897 REVISION DETAIL https://reviews.freebsd.org/D1438 AFFECTED FILES share/man/man9/Makefile share/man/man9/timeout.9 sys/kern/init_main.c sys/kern/kern_clocksource.c sys/kern/kern_condvar.c sys/kern/kern_lock.c sys/kern/kern_switch.c sys/kern/kern_synch.c sys/kern/kern_thread.c sys/kern/kern_timeout.c sys/kern/subr_sleepqueue.c sys/ofed/include/linux/completion.h sys/sys/_callout.h sys/sys/callout.h sys/sys/proc.h To: hselasky, jhb, adrian, markj, emaste, sbruno, imp, lstewart, rwatson, gnn, rrs, kostikbel, delphij, neel, erj, remkolodder, bcr, brueffer, brd, allanjude, wblock Cc: wblock, freebsd-net ___ freebsd-net@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-net To unsubscribe, send any mail to freebsd-net-unsubscr...@freebsd.org
[Differential] [Updated, 2, 475 lines] D1438: FreeBSD callout rewrite and cleanup
hselasky updated this revision to Diff 3896. hselasky added a comment. Disallow task switching during hard tick interrupts. CHANGES SINCE LAST UPDATE https://reviews.freebsd.org/D1438?vs=3868id=3896 REVISION DETAIL https://reviews.freebsd.org/D1438 AFFECTED FILES share/man/man9/Makefile share/man/man9/timeout.9 sys/kern/init_main.c sys/kern/kern_clocksource.c sys/kern/kern_condvar.c sys/kern/kern_lock.c sys/kern/kern_switch.c sys/kern/kern_synch.c sys/kern/kern_thread.c sys/kern/kern_timeout.c sys/kern/subr_sleepqueue.c sys/ofed/include/linux/completion.h sys/sys/_callout.h sys/sys/callout.h sys/sys/proc.h To: hselasky, jhb, adrian, markj, emaste, sbruno, imp, lstewart, rwatson, gnn, rrs, kostikbel, delphij, neel, erj, remkolodder, bcr, brueffer, brd, allanjude, wblock Cc: wblock, freebsd-net ___ freebsd-net@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-net To unsubscribe, send any mail to freebsd-net-unsubscr...@freebsd.org
[Differential] [Updated, 2, 449 lines] D1438: FreeBSD callout rewrite and cleanup
hselasky updated this revision to Diff 3868. hselasky added a comment. Integrate manual page comments from Warren Block. CHANGES SINCE LAST UPDATE https://reviews.freebsd.org/D1438?vs=3840id=3868 REVISION DETAIL https://reviews.freebsd.org/D1438 AFFECTED FILES share/man/man9/Makefile share/man/man9/timeout.9 sys/kern/init_main.c sys/kern/kern_condvar.c sys/kern/kern_lock.c sys/kern/kern_switch.c sys/kern/kern_synch.c sys/kern/kern_thread.c sys/kern/kern_timeout.c sys/kern/subr_sleepqueue.c sys/ofed/include/linux/completion.h sys/sys/_callout.h sys/sys/callout.h sys/sys/proc.h To: hselasky, jhb, adrian, markj, emaste, sbruno, imp, lstewart, rwatson, gnn, rrs, kostikbel, delphij, neel, erj, remkolodder, bcr, brueffer, brd, allanjude, wblock Cc: wblock, freebsd-net ___ freebsd-net@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-net To unsubscribe, send any mail to freebsd-net-unsubscr...@freebsd.org
[Differential] [Commented On] D1711: Changes to the callout code to restore active semantics and also add a test-framework and test to validate thecallout code (and potentially for use by other tests)
hselasky added a comment. Randall: Shooting again: Thread 1 is executing in softclock_call_cc() in the new_cc = callout_cpu_switch(c, cc, new_cpu) it has set c-c_cpu = CPUBLOCK; Thread 2 is now executing callout_reset(). As you can see in the implementation detail, it is reading c_cpu without CC_LOCK() locked and without checking if it was reading the c_cpu while it was equal to CPUBLOCK ! #define callout_reset(c, on_tick, fn, arg) \ callout_reset_on((c), (on_tick), (fn), (arg), (c)-c_cpu) This results in migrating the callout to CPUBLOCK, and subsequent calls will hang in callout_lock() like in hirens panic. --HPS REVISION DETAIL https://reviews.freebsd.org/D1711 To: rrs, gnn, rwatson, lstewart, jhb, kostikbel, sbruno, imp, adrian, hselasky Cc: julian, hiren, jhb, kostikbel, emaste, delphij, neel, erj, freebsd-net ___ freebsd-net@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-net To unsubscribe, send any mail to freebsd-net-unsubscr...@freebsd.org
[Differential] [Updated, 4 lines] D1893: Fix special case in ip_fragment() to produce a more sensible chain of packets
hselasky added reviewers: network, glebius. hselasky added a subscriber: freebsd-net. hselasky set the repository for this revision to rS (FreeBSD src repository). hselasky updated this revision to Diff 3838. hselasky added a comment. Add full context. CHANGES SINCE LAST UPDATE https://reviews.freebsd.org/D1893?vs=3837id=3838 REVISION DETAIL https://reviews.freebsd.org/D1893 AFFECTED FILES sys/netinet/ip_output.c To: hselasky, pluknet, ae, np, melifaro, glebius, hrs, wollman, bryanv, rpaulo, adrian, bz, gnn, hiren, rwatson Cc: freebsd-net ___ freebsd-net@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-net To unsubscribe, send any mail to freebsd-net-unsubscr...@freebsd.org
[Differential] [Updated, 4 lines] D1893: Fix special case in ip_fragment() to produce a more sensible chain of packets
hselasky updated this revision to Diff 3839. hselasky added a comment. Use MIN() macro. CHANGES SINCE LAST UPDATE https://reviews.freebsd.org/D1893?vs=3838id=3839 REVISION DETAIL https://reviews.freebsd.org/D1893 AFFECTED FILES sys/netinet/ip_output.c To: hselasky, pluknet, ae, np, melifaro, glebius, hrs, wollman, bryanv, rpaulo, adrian, bz, gnn, hiren, rwatson Cc: freebsd-net ___ freebsd-net@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-net To unsubscribe, send any mail to freebsd-net-unsubscr...@freebsd.org
[Differential] [Commented On] D1711: Changes to the callout code to restore active semantics and also add a test-framework and test to validate thecallout code (and potentially for use by other tests)
hselasky added a comment. Let me re-phrase if I was unclear: I see nothing preventing the callout_reset() macro from reading (c)-c_cpu lock when it is equal to CPUBLOCK while another CPU is calling callout_cpu_switch() on the same callout. Especially in the case of a migration case done by the callout_process(), because there is no common c-c_lock so-to-speak for the two pieces of code. REVISION DETAIL https://reviews.freebsd.org/D1711 To: rrs, gnn, rwatson, lstewart, jhb, kostikbel, sbruno, imp, adrian, hselasky Cc: julian, hiren, jhb, kostikbel, emaste, delphij, neel, erj, freebsd-net ___ freebsd-net@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-net To unsubscribe, send any mail to freebsd-net-unsubscr...@freebsd.org
[Differential] [Updated, 2, 449 lines] D1438: FreeBSD callout rewrite and cleanup
hselasky updated this revision to Diff 3840. hselasky added a comment. Integrate manual page comments from Warren Block. CHANGES SINCE LAST UPDATE https://reviews.freebsd.org/D1438?vs=3809id=3840 REVISION DETAIL https://reviews.freebsd.org/D1438 AFFECTED FILES share/man/man9/Makefile share/man/man9/timeout.9 sys/kern/init_main.c sys/kern/kern_condvar.c sys/kern/kern_lock.c sys/kern/kern_switch.c sys/kern/kern_synch.c sys/kern/kern_thread.c sys/kern/kern_timeout.c sys/kern/subr_sleepqueue.c sys/ofed/include/linux/completion.h sys/sys/_callout.h sys/sys/callout.h sys/sys/proc.h To: hselasky, jhb, adrian, markj, emaste, sbruno, imp, lstewart, rwatson, gnn, rrs, kostikbel, delphij, neel, erj, remkolodder, bcr, brueffer, brd, allanjude, wblock Cc: wblock, freebsd-net ___ freebsd-net@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-net To unsubscribe, send any mail to freebsd-net-unsubscr...@freebsd.org
[Differential] [Commented On] D1711: Changes to the callout code to restore active semantics and also add a test-framework and test to validate thecallout code (and potentially for use by other tests)
hselasky added a comment. Hi, rrs + hiren: I think the problem is this: In _callout_stop_safe() we sometimes exit having cc_migration_cpu(cc, direct) = CPUBLOCK;. Now if a second call to _callout_stop_safe() happens before the pending callback has returned, which is using a mutex, we are deadlocked, because _callout_stop_safe() is called having the same lock locked which the callback needs to aquire aswell. Because the callout subsystem cannot aquire the mutex during the callback function, it can neither reach the migration code which resets the cc_migration_cpu() variable. hiren: Can you backtrace all the softclock processes in your dump? --HPS REVISION DETAIL https://reviews.freebsd.org/D1711 To: rrs, gnn, rwatson, lstewart, jhb, kostikbel, sbruno, imp, adrian, hselasky Cc: julian, hiren, jhb, kostikbel, emaste, delphij, neel, erj, freebsd-net ___ freebsd-net@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-net To unsubscribe, send any mail to freebsd-net-unsubscr...@freebsd.org
[Differential] [Commented On] D1711: Changes to the callout code to restore active semantics and also add a test-framework and test to validate thecallout code (and potentially for use by other tests)
hselasky added a comment. randall: Let me try to explain a bit slower: Assume that a callout has been cancelled and is now migrating to another CPU. c-c_cpu = CPUBLOCK. Upon calling _callout_stop_safe() we will enter the callout_lock() function which will wait for the condition c-c_cpu == CPUBLOCK to disappear. Thread 1: mtx_lock(xxx); _callout_stop_safe(struct callout *c, int safe) callout_lock(); while(c-c_cpu == CPUBLOCK) ; mtx_unlock(xxx); Thread 2: softclock_call_cc() if (c_lock != NULL) class-lc_lock(xxx); /* stuck forever */ In softclock_call_cc() c-c_cpu is only updated _after_ that class-lc_lock() has been locked / unlocked. Especially this is critical if the callback function locks and unlocks the xxx lock multiple times. Do you get it? Or do you want me to explain more. Sorry I am not so good communicating with you. --HPS REVISION DETAIL https://reviews.freebsd.org/D1711 To: rrs, gnn, rwatson, lstewart, jhb, kostikbel, sbruno, imp, adrian, hselasky Cc: julian, hiren, jhb, kostikbel, emaste, delphij, neel, erj, freebsd-net ___ freebsd-net@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-net To unsubscribe, send any mail to freebsd-net-unsubscr...@freebsd.org
[Differential] [Commented On] D1711: Changes to the callout code to restore active semantics and also add a test-framework and test to validate thecallout code (and potentially for use by other tests)
hselasky added a comment. randall: You are right I confused the two c_cpu values. Let my try to shoot again: static struct callout_cpu * callout_cpu_switch(struct callout *c, struct callout_cpu *cc, int new_cpu) { struct callout_cpu *new_cc; MPASS(c != NULL cc != NULL); CC_LOCK_ASSERT(cc); /* * Avoid interrupts and preemption firing after the callout cpu * is blocked in order to avoid deadlocks as the new thread * may be willing to acquire the callout cpu lock. */ c-c_cpu = CPUBLOCK; spinlock_enter(); CC_UNLOCK(cc); new_cc = CC_CPU(new_cpu); CC_LOCK(new_cc); spinlock_exit(); c-c_cpu = new_cpu; return (new_cc); } spinlock_enter() is not an SMP lock. It only protects the executing CPU from interrupts and task switching. Basically that means two threads can be stuck at: new_cc = CC_CPU(new_cpu), meaning a single callout can be switched to multiple different CPU's at the same time? Or am I wrong? --HPS REVISION DETAIL https://reviews.freebsd.org/D1711 To: rrs, gnn, rwatson, lstewart, jhb, kostikbel, sbruno, imp, adrian, hselasky Cc: julian, hiren, jhb, kostikbel, emaste, delphij, neel, erj, freebsd-net ___ freebsd-net@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-net To unsubscribe, send any mail to freebsd-net-unsubscr...@freebsd.org
[Differential] [Updated, 2, 470 lines] D1438: FreeBSD callout rewrite and cleanup
hselasky updated this revision to Diff 3809. hselasky added a comment. Update diff after r278623. No other changes. CHANGES SINCE LAST UPDATE https://reviews.freebsd.org/D1438?vs=3734id=3809 REVISION DETAIL https://reviews.freebsd.org/D1438 AFFECTED FILES share/man/man9/Makefile share/man/man9/timeout.9 sys/kern/init_main.c sys/kern/kern_condvar.c sys/kern/kern_lock.c sys/kern/kern_switch.c sys/kern/kern_synch.c sys/kern/kern_thread.c sys/kern/kern_timeout.c sys/kern/subr_sleepqueue.c sys/ofed/include/linux/completion.h sys/sys/_callout.h sys/sys/callout.h sys/sys/proc.h To: hselasky, jhb, adrian, markj, emaste, sbruno, imp, lstewart, rwatson, gnn, rrs, kostikbel, delphij, neel, erj Cc: freebsd-net ___ freebsd-net@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-net To unsubscribe, send any mail to freebsd-net-unsubscr...@freebsd.org
[Differential] [Commented On] D1711: Changes to the callout code to restore active semantics and also add a test-framework and test to validate thecallout code (and potentially for use by other tests)
hselasky added a comment. If you change how cc_migration_cpu(cc, direct) works, the cc_cce_migrating() checks become invalid. I think you need to introduce yet another callout flag REVISION DETAIL https://reviews.freebsd.org/D1711 To: rrs, gnn, rwatson, lstewart, jhb, kostikbel, sbruno, imp, adrian, hselasky Cc: julian, hiren, jhb, kostikbel, emaste, delphij, neel, erj, freebsd-net ___ freebsd-net@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-net To unsubscribe, send any mail to freebsd-net-unsubscr...@freebsd.org
[Differential] [Updated, 2, 464 lines] D1438: FreeBSD callout rewrite and cleanup
hselasky updated this revision to Diff 3734. hselasky added a comment. Integrate changes after r278469. CHANGES SINCE LAST UPDATE https://reviews.freebsd.org/D1438?vs=3607id=3734 REVISION DETAIL https://reviews.freebsd.org/D1438 AFFECTED FILES share/man/man9/Makefile share/man/man9/timeout.9 sys/kern/init_main.c sys/kern/kern_condvar.c sys/kern/kern_lock.c sys/kern/kern_switch.c sys/kern/kern_synch.c sys/kern/kern_thread.c sys/kern/kern_timeout.c sys/kern/subr_sleepqueue.c sys/ofed/include/linux/completion.h sys/sys/_callout.h sys/sys/callout.h sys/sys/proc.h To: hselasky, jhb, adrian, markj, emaste, sbruno, imp, lstewart, rwatson, gnn, rrs, kostikbel, delphij, neel, erj Cc: freebsd-net ___ freebsd-net@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-net To unsubscribe, send any mail to freebsd-net-unsubscr...@freebsd.org
[Differential] [Commented On] D1711: Changes to the callout code to restore active semantics and also add a test-framework and test to validate thecallout code (and potentially for use by other tests)
hselasky added a comment. Don't forget to add the MFC after tag. REVISION DETAIL https://reviews.freebsd.org/D1711 To: rrs, gnn, rwatson, lstewart, jhb, kostikbel, sbruno, imp, adrian, hselasky Cc: julian, hiren, jhb, kostikbel, emaste, delphij, neel, erj, freebsd-net ___ freebsd-net@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-net To unsubscribe, send any mail to freebsd-net-unsubscr...@freebsd.org
[Differential] [Commented On] D1761: Extend LRO support to accumulate more than 65535 bytes
hselasky added a comment. Adrian: We do have one bit left after M_FLOWID was removed. Should I use it for this? And what would be an appropriate name. M_LENGTH_OK ? REVISION DETAIL https://reviews.freebsd.org/D1761 To: hselasky, rrs, glebius, gnn, emaste, lstewart, rwatson, bz, imp, np, adrian Cc: freebsd-net ___ freebsd-net@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-net To unsubscribe, send any mail to freebsd-net-unsubscr...@freebsd.org
[Differential] [Updated, 79 lines] D1761: Extend LRO support to accumulate more than 65535 bytes
hselasky edited reviewers, added: np; removed: rmacklem hselasky removed a subscriber: np. hselasky updated this revision to Diff 3630. hselasky added a comment. Address comments from imp and np: - Update patch to use IP_MAXPACKET as default for LRO which preserves existing behaviour. - Add to new configuration options to configure VLRO. CHANGES SINCE LAST UPDATE https://reviews.freebsd.org/D1761?vs=3606id=3630 REVISION DETAIL https://reviews.freebsd.org/D1761 AFFECTED FILES sys/conf/options sys/netinet/ip_input.c sys/netinet/ip_output.c sys/netinet/tcp_input.c sys/netinet/tcp_lro.c sys/sys/mbuf.h To: hselasky, rrs, glebius, gnn, emaste, lstewart, rwatson, bz, adrian, imp, np Cc: freebsd-net ___ freebsd-net@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-net To unsubscribe, send any mail to freebsd-net-unsubscr...@freebsd.org
[Differential] [Commented On] D1711: Changes to the callout code to restore active semantics and also add a test-framework and test to validate thecallout code (and potentially for use by other tests)
hselasky added a comment. julian: What do you mean by wait a bit. Spinning or sleeping? REVISION DETAIL https://reviews.freebsd.org/D1711 To: rrs, gnn, rwatson, lstewart, jhb, kostikbel, hselasky, adrian, imp, sbruno Cc: julian, hiren, jhb, kostikbel, emaste, delphij, neel, erj, freebsd-net ___ freebsd-net@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-net To unsubscribe, send any mail to freebsd-net-unsubscr...@freebsd.org
[Differential] [Commented On] D1711: Changes to the callout code to restore active semantics and also add a test-framework and test to validate thecallout code (and potentially for use by other tests)
hselasky added a comment. julian: Hence a lock is used, the callback won't be called when callout_stop() returns 1. Only the mutex will still be used. Maybe a callout_reset() having 1 tick as timeout will work instead of callout_stop(). If the callout_reset() returns 0 we add a ref instead of grabbing one. REVISION DETAIL https://reviews.freebsd.org/D1711 To: rrs, gnn, rwatson, lstewart, jhb, kostikbel, hselasky, adrian, imp, sbruno Cc: julian, hiren, jhb, kostikbel, emaste, delphij, neel, erj, freebsd-net ___ freebsd-net@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-net To unsubscribe, send any mail to freebsd-net-unsubscr...@freebsd.org
[Differential] [Commented On] D1711: Changes to the callout code to restore active semantics and also add a test-framework and test to validate thecallout code (and potentially for use by other tests)
hselasky added a comment. Hi, There is only one or two likely consumers of callout_init_rw() at the present moment, and one of them is: ./netinet6/nd6.c: canceled = callout_stop(ln-ln_timer_ch); ./netinet6/nd6.c: canceled = callout_reset(ln-ln_timer_ch, INT_MAX, ./netinet6/nd6.c: canceled = callout_reset(ln-ln_timer_ch, tick, ./netinet6/in6.c: callout_init_rw(lle-base.ln_timer_ch, lle-base.lle_lock, hiren: Is this box configured for IPv6 ? static void in_lltable_free(struct lltable *llt, struct llentry *lle) { LLE_WUNLOCK(lle); LLE_LOCK_DESTROY(lle); free(lle, M_LLTABLE); } ln_lltable_free() does not drain the callout associated with it and I am not sure if we have a sleeping context for that. Even if the refcount is zero, it doesn't mean that the callback is finished using the RW mutex. This is another example where we really need a callout_drain_async_function(). REVISION DETAIL https://reviews.freebsd.org/D1711 To: rrs, gnn, rwatson, lstewart, jhb, kostikbel, hselasky, adrian, imp, sbruno Cc: hiren, jhb, kostikbel, emaste, delphij, neel, erj, freebsd-net ___ freebsd-net@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-net To unsubscribe, send any mail to freebsd-net-unsubscr...@freebsd.org
[Differential] [Updated, 68 lines] D1761: Extend LRO support to accumulate more than 65535 bytes
hselasky updated this revision to Diff 3606. hselasky added a comment. Add context to patch. CHANGES SINCE LAST UPDATE https://reviews.freebsd.org/D1761?vs=3601id=3606 REVISION DETAIL https://reviews.freebsd.org/D1761 AFFECTED FILES sys/netinet/ip_input.c sys/netinet/ip_output.c sys/netinet/tcp_input.c sys/netinet/tcp_lro.c sys/sys/mbuf.h To: hselasky, rmacklem, rrs, glebius, gnn, emaste, bz, adrian, rwatson, imp Cc: freebsd-net ___ freebsd-net@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-net To unsubscribe, send any mail to freebsd-net-unsubscr...@freebsd.org
[Differential] [Updated, 2, 384 lines] D1438: FreeBSD callout rewrite and cleanup
hselasky updated this revision to Diff 3607. hselasky added a comment. Add full context to patch. CHANGES SINCE LAST UPDATE https://reviews.freebsd.org/D1438?vs=3574id=3607 REVISION DETAIL https://reviews.freebsd.org/D1438 AFFECTED FILES share/man/man9/Makefile share/man/man9/timeout.9 sys/kern/init_main.c sys/kern/kern_condvar.c sys/kern/kern_lock.c sys/kern/kern_switch.c sys/kern/kern_synch.c sys/kern/kern_thread.c sys/kern/kern_timeout.c sys/kern/subr_sleepqueue.c sys/ofed/include/linux/completion.h sys/sys/_callout.h sys/sys/callout.h sys/sys/proc.h To: hselasky, jhb, adrian, markj, emaste, sbruno, imp, lstewart, rwatson, gnn, rrs, kostikbel, delphij, neel, erj Cc: freebsd-net ___ freebsd-net@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-net To unsubscribe, send any mail to freebsd-net-unsubscr...@freebsd.org
[Differential] [Accepted] D1711: Changes to the callout code to restore active semantics and also add a test-framework and test to validate thecallout code (and potentially for use by other tests).
hselasky accepted this revision. This revision is now accepted and ready to land. REVISION DETAIL https://reviews.freebsd.org/D1711 To: rrs, gnn, rwatson, sbruno, lstewart, imp, jhb, adrian, kostikbel, hselasky Cc: jhb, kostikbel, emaste, delphij, neel, erj, freebsd-net ___ freebsd-net@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-net To unsubscribe, send any mail to freebsd-net-unsubscr...@freebsd.org
[Differential] [Commented On] D1761: Extend LRO support to accumulate more than 65535 bytes
hselasky added a comment. See comments added. INLINE COMMENTS sys/netinet/ip_output.c:129 Because the variable is later on compared to the mtu which is also an int. Else you will get a compile warning about signed comparison mismatch. Same goes for other location where int is used. sys/netinet/tcp_lro.c:233 This is a dummy value which should not be used in the new LRO implementation. 65535 is chosen to make the packet drop as invalid in case some code that is not updated, if any, decides to check the p_len with m_pkthdr.len. REVISION DETAIL https://reviews.freebsd.org/D1761 To: hselasky, rmacklem, rrs, glebius, gnn, emaste, imp, adrian, bz, rwatson Cc: freebsd-net ___ freebsd-net@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-net To unsubscribe, send any mail to freebsd-net-unsubscr...@freebsd.org
[Differential] [Commented On] D1761: Extend LRO support to accumulate more than 65535 bytes
hselasky added a comment. rwatson: The LRO code ensures that all trailing and padding is stripped. This happens both before and after my change. REVISION DETAIL https://reviews.freebsd.org/D1761 To: hselasky, rmacklem, rrs, glebius, gnn, emaste, imp, adrian, bz, rwatson Cc: freebsd-net ___ freebsd-net@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-net To unsubscribe, send any mail to freebsd-net-unsubscr...@freebsd.org
[Differential] [Commented On] D1761: Extend LRO support to accumulate more than 65535 bytes
hselasky added a comment. adrian: I'm not in a position to change the IP header structure to support 32-bit payload length. That's why m_pkthdr.len was chosen. REVISION DETAIL https://reviews.freebsd.org/D1761 To: hselasky, rmacklem, rrs, glebius, gnn, emaste, imp, adrian, bz, rwatson Cc: freebsd-net ___ freebsd-net@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-net To unsubscribe, send any mail to freebsd-net-unsubscr...@freebsd.org
[Differential] [Request, 68 lines] D1761: Extend LRO support to accumulate more than 65535 bytes
hselasky created this revision. hselasky added reviewers: rmacklem, rrs, glebius, gnn, emaste, bz, adrian, rwatson. hselasky added a subscriber: freebsd-net. hselasky set the repository for this revision to rS (FreeBSD src repository). REVISION SUMMARY To be able to handle the transfer rates of tomorrow we need to reduce the number of requests to the TCP stack when receiving packets. Currently there is a limitation of 65535 bytes, which is due to using the 16-bit IP payload field in the IP header when accumulating LRO data. Instead use the 32-bit m_len field of the mbuf when doing data accumulation. TEST PLAN Test IPv4 Test IPv6 Test ip_fragment() REVISION DETAIL https://reviews.freebsd.org/D1761 AFFECTED FILES sys/netinet/ip_input.c sys/netinet/ip_output.c sys/netinet/tcp_input.c sys/netinet/tcp_lro.c sys/sys/mbuf.h To: hselasky, rmacklem, rrs, glebius, gnn, emaste, bz, adrian, rwatson Cc: freebsd-net ___ freebsd-net@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-net To unsubscribe, send any mail to freebsd-net-unsubscr...@freebsd.org
[Differential] [Updated] D1761: Extend LRO support to accumulate more than 65535 bytes
hselasky set the repository for this revision to rS (FreeBSD src repository). REVISION DETAIL https://reviews.freebsd.org/D1761 To: hselasky, rmacklem, rrs, glebius, gnn, emaste, bz, adrian, rwatson, imp Cc: freebsd-net ___ freebsd-net@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-net To unsubscribe, send any mail to freebsd-net-unsubscr...@freebsd.org
[Differential] [Updated] D1761: Extend LRO support to accumulate more than 65535 bytes
hselasky added a reviewer: imp. REVISION DETAIL https://reviews.freebsd.org/D1761 To: hselasky, rmacklem, rrs, glebius, gnn, emaste, bz, adrian, rwatson, imp Cc: freebsd-net ___ freebsd-net@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-net To unsubscribe, send any mail to freebsd-net-unsubscr...@freebsd.org
[Differential] [Accepted] D1711: Changes to the callout code to restore active semantics and also add a test-framework and test to validate thecallout code (and potentially for use by other tests).
hselasky accepted this revision. hselasky added a comment. Looks good. There are some non-related changes still, like the definition of access macros to improve readability. REVISION DETAIL https://reviews.freebsd.org/D1711 To: rrs, gnn, rwatson, sbruno, lstewart, imp, adrian, hselasky Cc: jhb, kostikbel, emaste, delphij, neel, erj, freebsd-net ___ freebsd-net@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-net To unsubscribe, send any mail to freebsd-net-unsubscr...@freebsd.org
[Differential] [Changed Subscribers] D1438: FreeBSD callout rewrite and cleanup
hselasky added a subscriber: freebsd-net. REVISION DETAIL https://reviews.freebsd.org/D1438 To: hselasky, jhb, adrian, markj, emaste, sbruno, imp, lstewart, rwatson, gnn, rrs, kostikbel, delphij, neel, erj Cc: freebsd-net ___ freebsd-net@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-net To unsubscribe, send any mail to freebsd-net-unsubscr...@freebsd.org
[Differential] [Commented On] D1438: FreeBSD callout rewrite and cleanup
hselasky added a comment. The last patch also corrects the first argument for the cpu_new_callout() function. REVISION DETAIL https://reviews.freebsd.org/D1438 To: hselasky, jhb, adrian, markj, emaste, sbruno, imp, lstewart, rwatson, gnn, rrs, kostikbel, delphij, neel, erj Cc: freebsd-net ___ freebsd-net@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-net To unsubscribe, send any mail to freebsd-net-unsubscr...@freebsd.org
[Differential] [Commented On] D1711: Changes to the callout code to restore active semantics and also add a test-framework and test to validate thecallout code (and potentially for use by other tests)
hselasky added a comment. Did you upload the correct patch? INLINE COMMENTS sys/kern/kern_timeout.c:674 I don't mean inside the if (c_lock != NULL) { } There should be an else case after it. if (c_lock != NULL) { ... } else { /* The callout cannot be stopped now */ cc_exec_cancel(cc, direct) = true; /* XXX this piece is missing */ } Because else callout_stop() will return (1) when cancel() == false, which is a lie. It cannot stop the MPSAFE callout in this case and has to let it run ??? REVISION DETAIL https://reviews.freebsd.org/D1711 To: rrs, gnn, rwatson, imp, adrian, sbruno, lstewart, hselasky Cc: neel, erj, freebsd-net ___ freebsd-net@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-net To unsubscribe, send any mail to freebsd-net-unsubscr...@freebsd.org
[Differential] [Accepted] D1711: Changes to the callout code to restore active semantics and also add a test-framework and test to validate thecallout code (and potentially for use by other tests).
hselasky accepted this revision. hselasky added a comment. This revision is now accepted and ready to land. This looks usable. REVISION DETAIL https://reviews.freebsd.org/D1711 To: rrs, gnn, rwatson, adrian, sbruno, lstewart, imp, hselasky Cc: emaste, delphij, neel, erj, freebsd-net ___ freebsd-net@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-net To unsubscribe, send any mail to freebsd-net-unsubscr...@freebsd.org
[Differential] [Updated] D1711: Changes to the callout code to restore active semantics and also add a test-framework and test to validate thecallout code (and potentially for use by other tests).
hselasky added a comment. Hi, Should the callout_test module be put in a separate directory? sys/modules/test_frwk sys/modules/test_frwk/callout When more tests are added that makes it easy exclude them from the build. --HPS REVISION DETAIL https://reviews.freebsd.org/D1711 To: rrs, gnn, rwatson, imp, adrian, sbruno, lstewart, hselasky Cc: neel, erj, freebsd-net ___ freebsd-net@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-net To unsubscribe, send any mail to freebsd-net-unsubscr...@freebsd.org
[Differential] [Requested Changes To] D1711: Changes to the callout code to restore active semantics and also add a test-framework and test to validate thecallout code (and potentially for use by othe
hselasky requested changes to this revision. hselasky added a comment. This revision now requires changes to proceed. See comments given. INLINE COMMENTS sys/kern/kern_timeout.c:674 cc_exec_cancel(cc, direct) should be true when c_lock == NULL, because the callback cannot be stopped then. sys/kern/kern_timeout.c:1059 Is this comment be properly formatted with regard to filling lines till end of line? ALT+Q in emacs?? sys/modules/callout_test/callout_test.c:58 Should these variables all be static? sys/modules/callout_test/callout_test.c:69 Possibly this define is redundant. sys/modules/callout_test/callout_test.c:254 Is this check really needed? sys/sys/callout_test.h:1 Upper case inclusion guard. sys/sys/callout_test.h:1 Missing copyright for header file. sys/sys/kern_testfrwk.h:43 Should this function be typedefed: typedef void (kern_testframework_func_t)(struct kern_test *); REVISION DETAIL https://reviews.freebsd.org/D1711 To: rrs, gnn, rwatson, imp, adrian, sbruno, lstewart, hselasky Cc: neel, erj, freebsd-net ___ freebsd-net@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-net To unsubscribe, send any mail to freebsd-net-unsubscr...@freebsd.org
[Differential] [Accepted] D1279: Fix crash when VIMAGE + Infiniband is compiled into the kernel
hselasky accepted this revision. hselasky added a comment. This revision is now accepted and ready to land. Looks good. Thank you! REVISION DETAIL https://reviews.freebsd.org/D1279 To: rodrigc, bz, hselasky Cc: freebsd-net ___ freebsd-net@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-net To unsubscribe, send any mail to freebsd-net-unsubscr...@freebsd.org