From owner-svn-src-stable-10@freebsd.org Thu Jun 16 04:21:28 2016 Return-Path: Delivered-To: svn-src-stable-10@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 79E33A5349F; Thu, 16 Jun 2016 04:21:28 +0000 (UTC) (envelope-from sephe@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 47C371653; Thu, 16 Jun 2016 04:21:28 +0000 (UTC) (envelope-from sephe@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id u5G4LROR074329; Thu, 16 Jun 2016 04:21:27 GMT (envelope-from sephe@FreeBSD.org) Received: (from sephe@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u5G4LRx2074327; Thu, 16 Jun 2016 04:21:27 GMT (envelope-from sephe@FreeBSD.org) Message-Id: <201606160421.u5G4LRx2074327@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: sephe set sender to sephe@FreeBSD.org using -f From: Sepherosa Ziehau Date: Thu, 16 Jun 2016 04:21:27 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r301949 - stable/10/sys/netinet X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable-10@freebsd.org X-Mailman-Version: 2.1.22 Precedence: list List-Id: SVN commit messages for only the 10-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 16 Jun 2016 04:21:28 -0000 Author: sephe Date: Thu Jun 16 04:21:27 2016 New Revision: 301949 URL: https://svnweb.freebsd.org/changeset/base/301949 Log: MFC 297265 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: stable/10/sys/netinet/tcp_lro.c stable/10/sys/netinet/tcp_lro.h Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/netinet/tcp_lro.c ============================================================================== --- stable/10/sys/netinet/tcp_lro.c Thu Jun 16 03:25:26 2016 (r301948) +++ stable/10/sys/netinet/tcp_lro.c Thu Jun 16 04:21:27 2016 (r301949) @@ -570,7 +570,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: stable/10/sys/netinet/tcp_lro.h ============================================================================== --- stable/10/sys/netinet/tcp_lro.h Thu Jun 16 03:25:26 2016 (r301948) +++ stable/10/sys/netinet/tcp_lro.h Thu Jun 16 04:21:27 2016 (r301949) @@ -90,6 +90,7 @@ void tcp_lro_flush_inactive(struct lro_c void tcp_lro_flush(struct lro_ctrl *, struct lro_entry *); int tcp_lro_rx(struct lro_ctrl *, struct mbuf *, uint32_t); +#define TCP_LRO_NO_ENTRIES -2 #define TCP_LRO_CANNOT -1 #define TCP_LRO_NOT_SUPPORTED 1