svn commit: r297265 - head/sys/netinet

Sepherosa Ziehau sephe at FreeBSD.org
Fri Mar 25 02:54:15 UTC 2016


Author: sephe
Date: Fri Mar 25 02:54:13 2016
New Revision: 297265
URL: https://svnweb.freebsd.org/changeset/base/297265

Log:
  tcp/lro: Return TCP_LRO_NO_ENTRIES if we are short of LRO entries.
  
  So that callers could react accordingly.
  
  Reviewed by:	gallatin (no objection)
  MFC after:	1 week
  Sponsored by:	Microsoft OSTC
  Differential Revision:	https://reviews.freebsd.org/D5695

Modified:
  head/sys/netinet/tcp_lro.c
  head/sys/netinet/tcp_lro.h

Modified: head/sys/netinet/tcp_lro.c
==============================================================================
--- head/sys/netinet/tcp_lro.c	Fri Mar 25 01:02:12 2016	(r297264)
+++ head/sys/netinet/tcp_lro.c	Fri Mar 25 02:54:13 2016	(r297265)
@@ -690,7 +690,7 @@ tcp_lro_rx(struct lro_ctrl *lc, struct m
 
 	/* Try to find an empty slot. */
 	if (SLIST_EMPTY(&lc->lro_free))
-		return (TCP_LRO_CANNOT);
+		return (TCP_LRO_NO_ENTRIES);
 
 	/* Start a new segment chain. */
 	le = SLIST_FIRST(&lc->lro_free);

Modified: head/sys/netinet/tcp_lro.h
==============================================================================
--- head/sys/netinet/tcp_lro.h	Fri Mar 25 01:02:12 2016	(r297264)
+++ head/sys/netinet/tcp_lro.h	Fri Mar 25 02:54:13 2016	(r297265)
@@ -110,6 +110,7 @@ void tcp_lro_flush_all(struct lro_ctrl *
 int tcp_lro_rx(struct lro_ctrl *, struct mbuf *, uint32_t);
 void tcp_lro_queue_mbuf(struct lro_ctrl *, struct mbuf *);
 
+#define	TCP_LRO_NO_ENTRIES	-2
 #define	TCP_LRO_CANNOT		-1
 #define	TCP_LRO_NOT_SUPPORTED	1
 


More information about the svn-src-head mailing list