The branch main has been updated by tuexen:

URL: 
https://cgit.FreeBSD.org/src/commit/?id=dc6ab77d66f892566de926274e6a58a637975510

commit dc6ab77d66f892566de926274e6a58a637975510
Author:     Michael Tuexen <tue...@freebsd.org>
AuthorDate: 2021-08-25 15:09:25 +0000
Commit:     Michael Tuexen <tue...@freebsd.org>
CommitDate: 2021-08-25 15:12:36 +0000

    tcp: make network epoch expectations of LRO explicit
    
    Reviewed by:            gallatin, hselasky
    MFC after:              3 days
    Sponsored by:           Netflix, Inc.
    Differential Revision:  https://reviews.freebsd.org/D31648
---
 sys/netinet/tcp_lro.c | 8 ++++++--
 1 file changed, 6 insertions(+), 2 deletions(-)

diff --git a/sys/netinet/tcp_lro.c b/sys/netinet/tcp_lro.c
index cb548d457bb3..cb9681559777 100644
--- a/sys/netinet/tcp_lro.c
+++ b/sys/netinet/tcp_lro.c
@@ -598,6 +598,7 @@ tcp_lro_flush_inactive(struct lro_ctrl *lc, const struct 
timeval *timeout)
        uint64_t now, tov;
        struct bintime bt;
 
+       NET_EPOCH_ASSERT();
        if (LIST_EMPTY(&lc->lro_active))
                return;
 
@@ -1177,8 +1178,6 @@ tcp_lro_lookup(struct ifnet *ifp, struct lro_parser *pa)
 {
        struct inpcb *inp;
 
-       NET_EPOCH_ASSERT();
-
        switch (pa->data.lro_type) {
 #ifdef INET6
        case LRO_TYPE_IPV6_TCP:
@@ -1368,7 +1367,10 @@ tcp_lro_flush(struct lro_ctrl *lc, struct lro_entry *le)
        /* Only optimise if there are multiple packets waiting. */
 #ifdef TCPHPTS
        int error;
+#endif
 
+       NET_EPOCH_ASSERT();
+#ifdef TCPHPTS
        CURVNET_SET(lc->ifp->if_vnet);
        error = tcp_lro_flush_tcphpts(lc, le);
        CURVNET_RESTORE();
@@ -1479,6 +1481,7 @@ tcp_lro_flush_all(struct lro_ctrl *lc)
        uint64_t nseq;
        unsigned x;
 
+       NET_EPOCH_ASSERT();
        /* check if no mbufs to flush */
        if (lc->lro_mbuf_count == 0)
                goto done;
@@ -1919,6 +1922,7 @@ tcp_lro_rx(struct lro_ctrl *lc, struct mbuf *m, uint32_t 
csum)
 void
 tcp_lro_queue_mbuf(struct lro_ctrl *lc, struct mbuf *mb)
 {
+       NET_EPOCH_ASSERT();
        /* sanity checks */
        if (__predict_false(lc->ifp == NULL || lc->lro_mbuf_data == NULL ||
            lc->lro_mbuf_max == 0)) {
_______________________________________________
dev-commits-src-main@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/dev-commits-src-main
To unsubscribe, send any mail to "dev-commits-src-main-unsubscr...@freebsd.org"

Reply via email to