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
This commit is contained in:
Sepherosa Ziehau 2016-03-25 02:54:13 +00:00
parent c94c8223bd
commit 489f0c3c17
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=297265
2 changed files with 2 additions and 1 deletions

View File

@ -690,7 +690,7 @@ tcp_lro_rx(struct lro_ctrl *lc, struct mbuf *m, uint32_t csum)
/* 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);

View File

@ -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