From owner-svn-src-stable-10@freebsd.org Sun Jun 14 05:33:26 2020 Return-Path: Delivered-To: svn-src-stable-10@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 8697F32F71F; Sun, 14 Jun 2020 05:33:26 +0000 (UTC) (envelope-from hselasky@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 49l35y31cvz3gtZ; Sun, 14 Jun 2020 05:33:26 +0000 (UTC) (envelope-from hselasky@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 mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 62E03275CC; Sun, 14 Jun 2020 05:33:26 +0000 (UTC) (envelope-from hselasky@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id 05E5XQVc067293; Sun, 14 Jun 2020 05:33:26 GMT (envelope-from hselasky@FreeBSD.org) Received: (from hselasky@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 05E5XQQ8067292; Sun, 14 Jun 2020 05:33:26 GMT (envelope-from hselasky@FreeBSD.org) Message-Id: <202006140533.05E5XQQ8067292@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: hselasky set sender to hselasky@FreeBSD.org using -f From: Hans Petter Selasky Date: Sun, 14 Jun 2020 05:33:26 +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: r362168 - stable/10/sys/dev/usb/net X-SVN-Group: stable-10 X-SVN-Commit-Author: hselasky X-SVN-Commit-Paths: stable/10/sys/dev/usb/net X-SVN-Commit-Revision: 362168 X-SVN-Commit-Repository: base 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.33 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: Sun, 14 Jun 2020 05:33:26 -0000 Author: hselasky Date: Sun Jun 14 05:33:25 2020 New Revision: 362168 URL: https://svnweb.freebsd.org/changeset/base/362168 Log: MFC r362056: Add missing range checks when receiving USB ethernet packets. Found by: Ilja Van Sprundel, IOActive Sponsored by: Mellanox Technologies Modified: stable/10/sys/dev/usb/net/if_smsc.c Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/dev/usb/net/if_smsc.c ============================================================================== --- stable/10/sys/dev/usb/net/if_smsc.c Sun Jun 14 05:27:37 2020 (r362167) +++ stable/10/sys/dev/usb/net/if_smsc.c Sun Jun 14 05:33:25 2020 (r362168) @@ -949,7 +949,7 @@ smsc_bulk_read_callback(struct usb_xfer *xfer, usb_err struct mbuf *m; struct usb_page_cache *pc; uint32_t rxhdr; - uint16_t pktlen; + int pktlen; int off; int actlen; @@ -975,6 +975,9 @@ smsc_bulk_read_callback(struct usb_xfer *xfer, usb_err /* The frame header is always aligned on a 4 byte boundary */ off = ((off + 0x3) & ~0x3); + if ((off + sizeof(rxhdr)) > actlen) + goto tr_setup; + usbd_copy_out(pc, off, &rxhdr, sizeof(rxhdr)); off += (sizeof(rxhdr) + ETHER_ALIGN); rxhdr = le32toh(rxhdr); @@ -1003,7 +1006,13 @@ smsc_bulk_read_callback(struct usb_xfer *xfer, usb_err ifp->if_iqdrops++; goto tr_setup; } - + if (pktlen > m->m_len) { + smsc_dbg_printf(sc, "buffer too small %d vs %d bytes", + pktlen, m->m_len); + if_inc_counter(ifp, IFCOUNTER_IQDROPS, 1); + m_freem(m); + goto tr_setup; + } usbd_copy_out(pc, off, mtod(m, uint8_t *), pktlen); /* Check if RX TCP/UDP checksumming is being offloaded */ From owner-svn-src-stable-10@freebsd.org Sun Jun 14 08:33:32 2020 Return-Path: Delivered-To: svn-src-stable-10@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 3F84B333BA0 for ; Sun, 14 Jun 2020 08:33:32 +0000 (UTC) (envelope-from info@hwinfotech.net) Received: from shi.hwinfotech.net (shi.hwinfotech.net [192.99.237.17]) (using TLSv1 with cipher ECDHE-RSA-AES256-SHA (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 49l75l5Wd3z47Pf for ; Sun, 14 Jun 2020 08:33:31 +0000 (UTC) (envelope-from info@hwinfotech.net) DKIM-Signature: v=1; a=rsa-sha1; c=relaxed/relaxed; s=dkim; d=hwinfotech.net; h=Message-ID:Date:Subject:From:Reply-To:To:MIME-Version:Content-Type:List-Unsubscribe:List-Id; i=info@hwinfotech.net; bh=TuN41fl59hKcyqr2TAzfetzO6jU=; b=Va+zvfaWRdn+Fc2iKPTlk2XUr36n4Z7E26AGuTilhIp75DEHm9dI6cYRcm7hGj2tL7o7HuaHruhE HK/1Zgpja5tgjq6CEPdpAVwv2BJL6LX5AtzMpC6ybAYSjcH6Tq2wyKY/Rf7k5+Ntg+oXmMVm3JqG PodhfTYO6Ku/e8yvBcI= DomainKey-Signature: a=rsa-sha1; c=nofws; q=dns; s=dkim; d=hwinfotech.net; b=bVMnLORBAjpqFDuzmcBCS8qUPNWVeiZK3bFs3jgDrn3wYuWZ83Fdbeyg2C1J6S23pi90u6ceX8CI gmxm3hyxPbPKVouDgbWRkWuBEfbzClUTlMh9VZJcMOHOhKrwmuTu5NXlwgWPAtAn+XkL14qe3cOb kRQwP5kiNcN84PMJA7g=; Message-ID: <742533a75ddacdc42c22afe6142748b5@hwinfotech.net> Date: Sun, 14 Jun 2020 08:33:30 +0000 Subject: Website and Mobile App Development From: HW Infotech Reply-To: HW Infotech To: "svn-src-stable-10@freebsd.org" MIME-Version: 1.0 X-Sender: info@hwinfotech.net X-Report-Abuse: Please report abuse for this campaign here: http://app.hwinfotech.net/index.php/campaigns/ok072mq8cc88f/report-abuse/dd296hm0jzd67/ez768dmgbb743 X-Receiver: svn-src-stable-10@freebsd.org X-Fxyn-Tracking-Did: 0 X-Fxyn-Subscriber-Uid: ez768dmgbb743 X-Fxyn-Mailer: SwiftMailer - 5.4.x X-Fxyn-EBS: http://app.hwinfotech.net/index.php/lists/block-address X-Fxyn-Delivery-Sid: 3 X-Fxyn-Customer-Uid: pp359780cbfd3 X-Fxyn-Customer-Gid: 0 X-Fxyn-Campaign-Uid: ok072mq8cc88f Precedence: bulk Feedback-ID: ok072mq8cc88f:ez768dmgbb743:dd296hm0jzd67:pp359780cbfd3 X-Rspamd-Queue-Id: 49l75l5Wd3z47Pf X-Spamd-Bar: ---- Authentication-Results: mx1.freebsd.org; dkim=pass header.d=hwinfotech.net header.s=dkim header.b=Va+zvfaW; dmarc=pass (policy=none) header.from=hwinfotech.net; spf=pass (mx1.freebsd.org: domain of info@hwinfotech.net designates 192.99.237.17 as permitted sender) smtp.mailfrom=info@hwinfotech.net X-Spamd-Result: default: False [-4.22 / 15.00]; ARC_NA(0.00)[]; HAS_REPLYTO(0.00)[info@hwinfotech.net]; R_DKIM_ALLOW(-0.20)[hwinfotech.net:s=dkim]; REPLYTO_EQ_FROM(0.00)[]; FROM_HAS_DN(0.00)[]; R_SPF_ALLOW(-0.20)[+ip4:192.99.237.17:c]; PRECEDENCE_BULK(0.00)[]; MIME_GOOD(-0.10)[multipart/alternative,text/plain]; TO_MATCH_ENVRCPT_ALL(0.00)[]; NEURAL_HAM_LONG(-0.97)[-0.972]; HAS_LIST_UNSUB(-0.01)[]; RCPT_COUNT_ONE(0.00)[1]; MANY_INVISIBLE_PARTS(0.05)[1]; NEURAL_HAM_MEDIUM(-0.93)[-0.928]; DKIM_TRACE(0.00)[hwinfotech.net:+]; DMARC_POLICY_ALLOW(-0.50)[hwinfotech.net,none]; NEURAL_HAM_SHORT(-1.36)[-1.360]; TO_DN_EQ_ADDR_ALL(0.00)[]; RCVD_COUNT_ZERO(0.00)[0]; FROM_EQ_ENVFROM(0.00)[]; MIME_TRACE(0.00)[0:+,1:+,2:~]; ASN(0.00)[asn:16276, ipnet:192.99.0.0/16, country:FR]; MID_RHS_MATCH_FROM(0.00)[] Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-Content-Filtered-By: Mailman/MimeDel 2.1.33 X-BeenThere: svn-src-stable-10@freebsd.org X-Mailman-Version: 2.1.33 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: Sun, 14 Jun 2020 08:33:32 -0000 We have =E2=9C=85 500+ clone ScriptHi, I am Waseem From HW Infotech. = =C2=A0 Please share your phone number or Skype id, Whatsapp if you are = looking to develop a clone of any website. Work in the following area := =E2=9C=85 Clone Script for any Website and Mobile APP -Development and= Digital Marketing for App, Web, Software Clone Scripts =E2=9C=85Readym= ade Script for useful product -Shop Website Templates, Clone Scripts, & M= arketplace Software | HW Infotech =E2=9C=85Software Requirement Specifica= tion Documentation =E2=9C=85A wireframe design for Website, ERP, Product = &Mobile app =E2=9C=85PHP Framework & MYSQL, HTML5, CSS3, JavaScript, jQue= ry, XML, JSON. =E2=9C=85eCommerce, WordPress,Magento,Open Cart, Joomla, M= agento 2, Prestashop =E2=9C=85Mobile APP- Android, IOS, Phone Gap and F= lutter =E2=9C=85SEO, SMO, and PPC =E2=9C=85Install and config the proje= ct =E2=9C=85Plugin: Customize and create a new plugin =E2=9C=85Migrate = & Upgrade: sustainable development and long-term =E2=9C=85WHM Panel serve= r configuration =E2=9C=85Server Optimization =E2=9C=85Website and Serve= r Penetration testing =E2=9C=85Load Balancing and Failover clustering Ser= ver =E2=9C=85Mail Server configuration for bulk emailing Contact us - H= ire A Developer | Web and App Development Services | HW Infotech Regard= s Waseem www.hwinfotech.com=C2=A0=C2=A0Gurugram | California |London|Va= ncouver|Abuja | Melbourne http://app.hwinfotech.net/index.php/lists/dd2= 96hm0jzd67/unsubscribe/ez768dmgbb743/ok072mq8cc88f From owner-svn-src-stable-10@freebsd.org Tue Jun 16 12:21:57 2020 Return-Path: Delivered-To: svn-src-stable-10@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 27673336D84; Tue, 16 Jun 2020 12:21:57 +0000 (UTC) (envelope-from kevans@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 49mS4P0Ckkz3bfC; Tue, 16 Jun 2020 12:21:57 +0000 (UTC) (envelope-from kevans@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 mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 0293EED57; Tue, 16 Jun 2020 12:21:57 +0000 (UTC) (envelope-from kevans@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id 05GCLu5O052526; Tue, 16 Jun 2020 12:21:56 GMT (envelope-from kevans@FreeBSD.org) Received: (from kevans@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 05GCLu7V052522; Tue, 16 Jun 2020 12:21:56 GMT (envelope-from kevans@FreeBSD.org) Message-Id: <202006161221.05GCLu7V052522@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: kevans set sender to kevans@FreeBSD.org using -f From: Kyle Evans Date: Tue, 16 Jun 2020 12:21:56 +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: r362224 - in stable: 10/lib/libusb 11/lib/libusb 12/lib/libusb 9/lib/libusb X-SVN-Group: stable-10 X-SVN-Commit-Author: kevans X-SVN-Commit-Paths: in stable: 10/lib/libusb 11/lib/libusb 12/lib/libusb 9/lib/libusb X-SVN-Commit-Revision: 362224 X-SVN-Commit-Repository: base 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.33 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: Tue, 16 Jun 2020 12:21:57 -0000 Author: kevans Date: Tue Jun 16 12:21:55 2020 New Revision: 362224 URL: https://svnweb.freebsd.org/changeset/base/362224 Log: MFC r361977: libusb: improve compatibility Specifically, add LIBUSB_CLASS_PHYSICAL and the libusb_has_capability API. Descriptions and functionality for these derived from the documentation at [0]. The current set of capabilities are all supported by libusb. These were detected as missing after updating net/freerdp to 2.1.1, which attempted to use both. [0] http://libusb.sourceforge.net/api-1.0/group__libusb__misc.html Modified: stable/10/lib/libusb/Makefile stable/10/lib/libusb/libusb.3 stable/10/lib/libusb/libusb.h stable/10/lib/libusb/libusb10.c Directory Properties: stable/10/ (props changed) Changes in other areas also in this revision: Modified: stable/11/lib/libusb/Makefile stable/11/lib/libusb/libusb.3 stable/11/lib/libusb/libusb.h stable/11/lib/libusb/libusb10.c stable/12/lib/libusb/Makefile stable/12/lib/libusb/libusb.3 stable/12/lib/libusb/libusb.h stable/12/lib/libusb/libusb10.c stable/9/lib/libusb/Makefile stable/9/lib/libusb/libusb.3 stable/9/lib/libusb/libusb.h stable/9/lib/libusb/libusb10.c Directory Properties: stable/11/ (props changed) stable/12/ (props changed) stable/9/ (props changed) stable/9/lib/ (props changed) stable/9/lib/libusb/ (props changed) Modified: stable/10/lib/libusb/Makefile ============================================================================== --- stable/10/lib/libusb/Makefile Tue Jun 16 12:16:35 2020 (r362223) +++ stable/10/lib/libusb/Makefile Tue Jun 16 12:21:55 2020 (r362224) @@ -71,6 +71,7 @@ CFLAGS+= -I ../../sys MLINKS += libusb.3 libusb_get_version.3 MLINKS += libusb.3 libusb_init.3 MLINKS += libusb.3 libusb_exit.3 +MLINKS += libusb.3 libusb_has_capability.3 MLINKS += libusb.3 libusb_strerror.3 MLINKS += libusb.3 libusb_error_name.3 MLINKS += libusb.3 libusb_set_debug.3 Modified: stable/10/lib/libusb/libusb.3 ============================================================================== --- stable/10/lib/libusb/libusb.3 Tue Jun 16 12:16:35 2020 (r362223) +++ stable/10/lib/libusb/libusb.3 Tue Jun 16 12:21:55 2020 (r362224) @@ -26,7 +26,7 @@ .\" .\" $FreeBSD$ .\" -.Dd June 23, 2016 +.Dd June 16, 2020 .Dt LIBUSB 3 .Os .Sh NAME @@ -60,6 +60,33 @@ failure. Deinitialise libusb. Must be called at the end of the application. Other libusb routines may not be called after this function. +.Pp +.Ft int +.Fn libusb_has_capability "uint32_t capability" +This function checks the runtime capabilities of +.Nm . +This function will return non-zero if the given +.Fa capability +is supported, 0 if it is not supported. +The valid values for +.Fa capability +are: +.Bl -tag -width LIBUSB_CAP -offset indent +.It Va LIBUSB_CAP_HAS_CAPABILITY +.Nm +supports +.Fn libusb_has_capability . +.It Va LIBUSB_CAP_HAS_HOTPLUG +.Nm +supports hotplug notifications. +.It Va LIBUSB_CAP_HAS_HID_ACCESS +.Nm +can access HID devices without requiring user intervention. +.It Va LIBUSB_CAP_SUPPORTS_DETACH_KERNEL_DRIVER +.Nm +supports detaching of the default USB driver with +.Fn libusb_detach_kernel_driver . +.El .Pp .Ft const char * .Fn libusb_strerror "int code" Modified: stable/10/lib/libusb/libusb.h ============================================================================== --- stable/10/lib/libusb/libusb.h Tue Jun 16 12:16:35 2020 (r362223) +++ stable/10/lib/libusb/libusb.h Tue Jun 16 12:21:55 2020 (r362224) @@ -52,6 +52,7 @@ enum libusb_class_code { LIBUSB_CLASS_AUDIO = 1, LIBUSB_CLASS_COMM = 2, LIBUSB_CLASS_HID = 3, + LIBUSB_CLASS_PHYSICAL = 5, LIBUSB_CLASS_PTP = 6, LIBUSB_CLASS_IMAGE = 6, LIBUSB_CLASS_PRINTER = 7, @@ -176,6 +177,21 @@ enum libusb_bos_type { LIBUSB_BT_CONTAINER_ID = 4, }; +enum libusb_capability { + /* libusb supports libusb_has_capability(). */ + LIBUSB_CAP_HAS_CAPABILITY = 0, + /* Hotplug support is available. */ + LIBUSB_CAP_HAS_HOTPLUG, + /* Can access HID devices without requiring user intervention. */ + LIBUSB_CAP_HAS_HID_ACCESS, + + /* + * Supports detaching of the default USB driver with + * libusb_detach_kernel_driver(). + */ + LIBUSB_CAP_SUPPORTS_DETACH_KERNEL_DRIVER, +}; + enum libusb_error { LIBUSB_SUCCESS = 0, LIBUSB_ERROR_IO = -1, @@ -447,6 +463,7 @@ const char *libusb_strerror(int code); const char *libusb_error_name(int code); int libusb_init(libusb_context ** context); void libusb_exit(struct libusb_context *ctx); +int libusb_has_capability(uint32_t capability); /* Device handling and enumeration */ Modified: stable/10/lib/libusb/libusb10.c ============================================================================== --- stable/10/lib/libusb/libusb10.c Tue Jun 16 12:16:35 2020 (r362223) +++ stable/10/lib/libusb/libusb10.c Tue Jun 16 12:21:55 2020 (r362224) @@ -1706,3 +1706,18 @@ libusb_error_name(int code) return ("LIBUSB_ERROR_UNKNOWN"); } } + +int +libusb_has_capability(uint32_t capability) +{ + + switch (capability) { + case LIBUSB_CAP_HAS_CAPABILITY: + case LIBUSB_CAP_HAS_HOTPLUG: + case LIBUSB_CAP_HAS_HID_ACCESS: + case LIBUSB_CAP_SUPPORTS_DETACH_KERNEL_DRIVER: + return (1); + default: + return (0); + } +} From owner-svn-src-stable-10@freebsd.org Thu Jun 18 10:17:37 2020 Return-Path: Delivered-To: svn-src-stable-10@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 1709C34AF48; Thu, 18 Jun 2020 10:17:37 +0000 (UTC) (envelope-from hselasky@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 49ndD06ngjz4RrW; Thu, 18 Jun 2020 10:17:36 +0000 (UTC) (envelope-from hselasky@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 mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id CB2902FE1E; Thu, 18 Jun 2020 10:17:36 +0000 (UTC) (envelope-from hselasky@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id 05IAHaQ2063275; Thu, 18 Jun 2020 10:17:36 GMT (envelope-from hselasky@FreeBSD.org) Received: (from hselasky@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 05IAHadO063274; Thu, 18 Jun 2020 10:17:36 GMT (envelope-from hselasky@FreeBSD.org) Message-Id: <202006181017.05IAHadO063274@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: hselasky set sender to hselasky@FreeBSD.org using -f From: Hans Petter Selasky Date: Thu, 18 Jun 2020 10:17:36 +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: r362307 - stable/10/sys/dev/mlx5/mlx5_en X-SVN-Group: stable-10 X-SVN-Commit-Author: hselasky X-SVN-Commit-Paths: stable/10/sys/dev/mlx5/mlx5_en X-SVN-Commit-Revision: 362307 X-SVN-Commit-Repository: base 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.33 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, 18 Jun 2020 10:17:37 -0000 Author: hselasky Date: Thu Jun 18 10:17:36 2020 New Revision: 362307 URL: https://svnweb.freebsd.org/changeset/base/362307 Log: MFC r362043: Use const keyword when parsing the TCP/IP header in the fast path in mlx5en(4). When parsing the TCP/IP header in the fast path, make it clear by using the const keyword, no fields are to be modified inside the transmitted packet. No functional change. Sponsored by: Mellanox Technologies Modified: stable/10/sys/dev/mlx5/mlx5_en/mlx5_en_tx.c Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/dev/mlx5/mlx5_en/mlx5_en_tx.c ============================================================================== --- stable/10/sys/dev/mlx5/mlx5_en/mlx5_en_tx.c Thu Jun 18 10:12:17 2020 (r362306) +++ stable/10/sys/dev/mlx5/mlx5_en/mlx5_en_tx.c Thu Jun 18 10:17:36 2020 (r362307) @@ -176,18 +176,26 @@ mlx5e_get_inline_hdr_size(struct mlx5e_sq *sq, struct return (MIN(sq->max_inline, mb->m_pkthdr.len)); } +/* + * This function parse IPv4 and IPv6 packets looking for TCP and UDP + * headers. + * + * The return value indicates the number of bytes from the beginning + * of the packet until the first byte after the TCP or UDP header. If + * this function returns zero, the parsing failed. + */ static int -mlx5e_get_header_size(struct mbuf *mb) +mlx5e_get_header_size(const struct mbuf *mb) { - struct ether_vlan_header *eh; - struct tcphdr *th; - struct ip *ip; + const struct ether_vlan_header *eh; + const struct tcphdr *th; + const struct ip *ip; int ip_hlen, tcp_hlen; - struct ip6_hdr *ip6; + const struct ip6_hdr *ip6; uint16_t eth_type; int eth_hdr_len; - eh = mtod(mb, struct ether_vlan_header *); + eh = mtod(mb, const struct ether_vlan_header *); if (mb->m_len < ETHER_HDR_LEN) return (0); if (eh->evl_encap_proto == htons(ETHERTYPE_VLAN)) { @@ -201,7 +209,7 @@ mlx5e_get_header_size(struct mbuf *mb) return (0); switch (eth_type) { case ETHERTYPE_IP: - ip = (struct ip *)(mb->m_data + eth_hdr_len); + ip = (const struct ip *)(mb->m_data + eth_hdr_len); if (mb->m_len < eth_hdr_len + sizeof(*ip)) return (0); if (ip->ip_p != IPPROTO_TCP) @@ -210,7 +218,7 @@ mlx5e_get_header_size(struct mbuf *mb) eth_hdr_len += ip_hlen; break; case ETHERTYPE_IPV6: - ip6 = (struct ip6_hdr *)(mb->m_data + eth_hdr_len); + ip6 = (const struct ip6_hdr *)(mb->m_data + eth_hdr_len); if (mb->m_len < eth_hdr_len + sizeof(*ip6)) return (0); if (ip6->ip6_nxt != IPPROTO_TCP) @@ -222,7 +230,7 @@ mlx5e_get_header_size(struct mbuf *mb) } if (mb->m_len < eth_hdr_len + sizeof(*th)) return (0); - th = (struct tcphdr *)(mb->m_data + eth_hdr_len); + th = (const struct tcphdr *)(mb->m_data + eth_hdr_len); tcp_hlen = th->th_off << 2; eth_hdr_len += tcp_hlen; if (mb->m_len < eth_hdr_len) From owner-svn-src-stable-10@freebsd.org Thu Jun 18 10:31:22 2020 Return-Path: Delivered-To: svn-src-stable-10@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 4EE1934B660; Thu, 18 Jun 2020 10:31:22 +0000 (UTC) (envelope-from hselasky@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 49ndWt1RYGz4Sqc; Thu, 18 Jun 2020 10:31:22 +0000 (UTC) (envelope-from hselasky@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 mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 138D48327; Thu, 18 Jun 2020 10:31:22 +0000 (UTC) (envelope-from hselasky@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id 05IAVLS3069913; Thu, 18 Jun 2020 10:31:21 GMT (envelope-from hselasky@FreeBSD.org) Received: (from hselasky@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 05IAVLrG069912; Thu, 18 Jun 2020 10:31:21 GMT (envelope-from hselasky@FreeBSD.org) Message-Id: <202006181031.05IAVLrG069912@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: hselasky set sender to hselasky@FreeBSD.org using -f From: Hans Petter Selasky Date: Thu, 18 Jun 2020 10:31:21 +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: r362310 - stable/10/sys/dev/mlx5/mlx5_en X-SVN-Group: stable-10 X-SVN-Commit-Author: hselasky X-SVN-Commit-Paths: stable/10/sys/dev/mlx5/mlx5_en X-SVN-Commit-Revision: 362310 X-SVN-Commit-Repository: base 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.33 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, 18 Jun 2020 10:31:22 -0000 Author: hselasky Date: Thu Jun 18 10:31:21 2020 New Revision: 362310 URL: https://svnweb.freebsd.org/changeset/base/362310 Log: MFC r362044: Extend use of unlikely() in the fast path, in mlx5en(4). Typically the TCP/IP headers fit within the first mbuf and should not trigger any of the error cases. Use unlikely() for these cases. No functional change. Sponsored by: Mellanox Technologies Modified: stable/10/sys/dev/mlx5/mlx5_en/mlx5_en_tx.c Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/dev/mlx5/mlx5_en/mlx5_en_tx.c ============================================================================== --- stable/10/sys/dev/mlx5/mlx5_en/mlx5_en_tx.c Thu Jun 18 10:20:16 2020 (r362309) +++ stable/10/sys/dev/mlx5/mlx5_en/mlx5_en_tx.c Thu Jun 18 10:31:21 2020 (r362310) @@ -196,21 +196,21 @@ mlx5e_get_header_size(const struct mbuf *mb) int eth_hdr_len; eh = mtod(mb, const struct ether_vlan_header *); - if (mb->m_len < ETHER_HDR_LEN) + if (unlikely(mb->m_len < ETHER_HDR_LEN)) return (0); if (eh->evl_encap_proto == htons(ETHERTYPE_VLAN)) { + if (unlikely(mb->m_len < (ETHER_HDR_LEN + ETHER_VLAN_ENCAP_LEN))) + return (0); eth_type = ntohs(eh->evl_proto); eth_hdr_len = ETHER_HDR_LEN + ETHER_VLAN_ENCAP_LEN; } else { eth_type = ntohs(eh->evl_encap_proto); eth_hdr_len = ETHER_HDR_LEN; } - if (mb->m_len < eth_hdr_len) - return (0); switch (eth_type) { case ETHERTYPE_IP: ip = (const struct ip *)(mb->m_data + eth_hdr_len); - if (mb->m_len < eth_hdr_len + sizeof(*ip)) + if (unlikely(mb->m_len < eth_hdr_len + sizeof(*ip))) return (0); if (ip->ip_p != IPPROTO_TCP) return (0); @@ -219,7 +219,7 @@ mlx5e_get_header_size(const struct mbuf *mb) break; case ETHERTYPE_IPV6: ip6 = (const struct ip6_hdr *)(mb->m_data + eth_hdr_len); - if (mb->m_len < eth_hdr_len + sizeof(*ip6)) + if (unlikely(mb->m_len < eth_hdr_len + sizeof(*ip6))) return (0); if (ip6->ip6_nxt != IPPROTO_TCP) return (0); @@ -228,12 +228,17 @@ mlx5e_get_header_size(const struct mbuf *mb) default: return (0); } - if (mb->m_len < eth_hdr_len + sizeof(*th)) + if (unlikely(mb->m_len < eth_hdr_len + sizeof(*th))) return (0); th = (const struct tcphdr *)(mb->m_data + eth_hdr_len); tcp_hlen = th->th_off << 2; eth_hdr_len += tcp_hlen; - if (mb->m_len < eth_hdr_len) + /* + * m_copydata() will be used on the remaining header which + * does not need to reside within the first m_len bytes of + * data: + */ + if (unlikely(mb->m_pkthdr.len < eth_hdr_len)) return (0); return (eth_hdr_len); } From owner-svn-src-stable-10@freebsd.org Thu Jun 18 10:41:52 2020 Return-Path: Delivered-To: svn-src-stable-10@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 1C04834BBEF; Thu, 18 Jun 2020 10:41:52 +0000 (UTC) (envelope-from hselasky@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 49ndlz73ZLz4Tb2; Thu, 18 Jun 2020 10:41:51 +0000 (UTC) (envelope-from hselasky@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 mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id ED706842D; Thu, 18 Jun 2020 10:41:51 +0000 (UTC) (envelope-from hselasky@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id 05IAfpJZ080975; Thu, 18 Jun 2020 10:41:51 GMT (envelope-from hselasky@FreeBSD.org) Received: (from hselasky@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 05IAfpoC080974; Thu, 18 Jun 2020 10:41:51 GMT (envelope-from hselasky@FreeBSD.org) Message-Id: <202006181041.05IAfpoC080974@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: hselasky set sender to hselasky@FreeBSD.org using -f From: Hans Petter Selasky Date: Thu, 18 Jun 2020 10:41:51 +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: r362313 - stable/10/sys/dev/mlx5/mlx5_en X-SVN-Group: stable-10 X-SVN-Commit-Author: hselasky X-SVN-Commit-Paths: stable/10/sys/dev/mlx5/mlx5_en X-SVN-Commit-Revision: 362313 X-SVN-Commit-Repository: base 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.33 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, 18 Jun 2020 10:41:52 -0000 Author: hselasky Date: Thu Jun 18 10:41:51 2020 New Revision: 362313 URL: https://svnweb.freebsd.org/changeset/base/362313 Log: MFC r362045: Make sure packets generated by raw IP code is let through by mlx5en(4). Allow the TCP header to reside in the mbuf following the IP header. Else such packets will get dropped. Backtrace: mlx5e_sq_xmit() mlx5e_xmit() ether_output_frame() ether_output() ip_output_send() ip_output() rip_output() sosend_generic() sosend() kern_sendit() sendit() sys_sendto() amd64_syscall() fast_syscall_common() Sponsored by: Mellanox Technologies Modified: stable/10/sys/dev/mlx5/mlx5_en/mlx5_en_tx.c Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/dev/mlx5/mlx5_en/mlx5_en_tx.c ============================================================================== --- stable/10/sys/dev/mlx5/mlx5_en/mlx5_en_tx.c Thu Jun 18 10:40:16 2020 (r362312) +++ stable/10/sys/dev/mlx5/mlx5_en/mlx5_en_tx.c Thu Jun 18 10:41:51 2020 (r362313) @@ -228,9 +228,15 @@ mlx5e_get_header_size(const struct mbuf *mb) default: return (0); } - if (unlikely(mb->m_len < eth_hdr_len + sizeof(*th))) - return (0); - th = (const struct tcphdr *)(mb->m_data + eth_hdr_len); + if (unlikely(mb->m_len < eth_hdr_len + sizeof(*th))) { + const struct mbuf *m_th = mb->m_next; + if (unlikely(mb->m_len != eth_hdr_len || + m_th == NULL || m_th->m_len < sizeof(*th))) + return (0); + th = (const struct tcphdr *)(m_th->m_data); + } else { + th = (const struct tcphdr *)(mb->m_data + eth_hdr_len); + } tcp_hlen = th->th_off << 2; eth_hdr_len += tcp_hlen; /* From owner-svn-src-stable-10@freebsd.org Fri Jun 19 07:07:11 2020 Return-Path: Delivered-To: svn-src-stable-10@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id E6B39342018; Fri, 19 Jun 2020 07:07:11 +0000 (UTC) (envelope-from rpokala@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 49p8xq5tSRz4fSq; Fri, 19 Jun 2020 07:07:11 +0000 (UTC) (envelope-from rpokala@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 mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id C535516C6B; Fri, 19 Jun 2020 07:07:11 +0000 (UTC) (envelope-from rpokala@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id 05J77BPr038397; Fri, 19 Jun 2020 07:07:11 GMT (envelope-from rpokala@FreeBSD.org) Received: (from rpokala@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 05J77BRx038395; Fri, 19 Jun 2020 07:07:11 GMT (envelope-from rpokala@FreeBSD.org) Message-Id: <202006190707.05J77BRx038395@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: rpokala set sender to rpokala@FreeBSD.org using -f From: Ravi Pokala Date: Fri, 19 Jun 2020 07:07:11 +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: r362368 - in stable/10: sbin/ifconfig sys/net X-SVN-Group: stable-10 X-SVN-Commit-Author: rpokala X-SVN-Commit-Paths: in stable/10: sbin/ifconfig sys/net X-SVN-Commit-Revision: 362368 X-SVN-Commit-Repository: base 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.33 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: Fri, 19 Jun 2020 07:07:12 -0000 Author: rpokala Date: Fri Jun 19 07:07:10 2020 New Revision: 362368 URL: https://svnweb.freebsd.org/changeset/base/362368 Log: MFC r362078: Decode the "LACP Fast Timeout" LAGG option flag r286700 added the "lacp_fast_timeout" option to `ifconfig', but we forgot to include the new option in the string used to decode the option bits. Add "LACP_FAST_TIMO" to LAGG_OPT_BITS. Also, s/LAGG_OPT_LACP_TIMEOUT/LAGG_OPT_LACP_FAST_TIMO/g , to be clearer that the flag indicates "Fast Timeout" mode. Modified: stable/10/sbin/ifconfig/iflagg.c stable/10/sys/net/if_lagg.c stable/10/sys/net/if_lagg.h Directory Properties: stable/10/ (props changed) Modified: stable/10/sbin/ifconfig/iflagg.c ============================================================================== --- stable/10/sbin/ifconfig/iflagg.c Fri Jun 19 06:48:16 2020 (r362367) +++ stable/10/sbin/ifconfig/iflagg.c Fri Jun 19 07:07:10 2020 (r362368) @@ -115,8 +115,8 @@ setlaggsetopt(const char *val, int d, int s, const str case -LAGG_OPT_LACP_TXTEST: case LAGG_OPT_LACP_RXTEST: case -LAGG_OPT_LACP_RXTEST: - case LAGG_OPT_LACP_TIMEOUT: - case -LAGG_OPT_LACP_TIMEOUT: + case LAGG_OPT_LACP_FAST_TIMO: + case -LAGG_OPT_LACP_FAST_TIMO: break; default: err(1, "Invalid lagg option"); @@ -286,8 +286,8 @@ static struct cmd lagg_cmds[] = { DEF_CMD("-lacp_txtest", -LAGG_OPT_LACP_TXTEST, setlaggsetopt), DEF_CMD("lacp_rxtest", LAGG_OPT_LACP_RXTEST, setlaggsetopt), DEF_CMD("-lacp_rxtest", -LAGG_OPT_LACP_RXTEST, setlaggsetopt), - DEF_CMD("lacp_fast_timeout", LAGG_OPT_LACP_TIMEOUT, setlaggsetopt), - DEF_CMD("-lacp_fast_timeout", -LAGG_OPT_LACP_TIMEOUT, setlaggsetopt), + DEF_CMD("lacp_fast_timeout", LAGG_OPT_LACP_FAST_TIMO, setlaggsetopt), + DEF_CMD("-lacp_fast_timeout", -LAGG_OPT_LACP_FAST_TIMO, setlaggsetopt), DEF_CMD_ARG("flowid_shift", setlaggflowidshift), }; static struct afswtch af_lagg = { Modified: stable/10/sys/net/if_lagg.c ============================================================================== --- stable/10/sys/net/if_lagg.c Fri Jun 19 06:48:16 2020 (r362367) +++ stable/10/sys/net/if_lagg.c Fri Jun 19 07:07:10 2020 (r362368) @@ -1100,7 +1100,7 @@ lagg_ioctl(struct ifnet *ifp, u_long cmd, caddr_t data if (lsc->lsc_strict_mode != 0) ro->ro_opts |= LAGG_OPT_LACP_STRICT; if (lsc->lsc_fast_timeout != 0) - ro->ro_opts |= LAGG_OPT_LACP_TIMEOUT; + ro->ro_opts |= LAGG_OPT_LACP_FAST_TIMO; ro->ro_active = sc->sc_active; } else { @@ -1136,8 +1136,8 @@ lagg_ioctl(struct ifnet *ifp, u_long cmd, caddr_t data case -LAGG_OPT_LACP_RXTEST: case LAGG_OPT_LACP_STRICT: case -LAGG_OPT_LACP_STRICT: - case LAGG_OPT_LACP_TIMEOUT: - case -LAGG_OPT_LACP_TIMEOUT: + case LAGG_OPT_LACP_FAST_TIMO: + case -LAGG_OPT_LACP_FAST_TIMO: valid = lacp = 1; break; default: @@ -1189,14 +1189,14 @@ lagg_ioctl(struct ifnet *ifp, u_long cmd, caddr_t data case -LAGG_OPT_LACP_STRICT: lsc->lsc_strict_mode = 0; break; - case LAGG_OPT_LACP_TIMEOUT: + case LAGG_OPT_LACP_FAST_TIMO: LACP_LOCK(lsc); LIST_FOREACH(lp, &lsc->lsc_ports, lp_next) lp->lp_state |= LACP_STATE_TIMEOUT; LACP_UNLOCK(lsc); lsc->lsc_fast_timeout = 1; break; - case -LAGG_OPT_LACP_TIMEOUT: + case -LAGG_OPT_LACP_FAST_TIMO: LACP_LOCK(lsc); LIST_FOREACH(lp, &lsc->lsc_ports, lp_next) lp->lp_state &= ~LACP_STATE_TIMEOUT; Modified: stable/10/sys/net/if_lagg.h ============================================================================== --- stable/10/sys/net/if_lagg.h Fri Jun 19 06:48:16 2020 (r362367) +++ stable/10/sys/net/if_lagg.h Fri Jun 19 07:07:10 2020 (r362368) @@ -148,7 +148,7 @@ struct lagg_reqopts { #define LAGG_OPT_LACP_STRICT 0x10 /* LACP strict mode */ #define LAGG_OPT_LACP_TXTEST 0x20 /* LACP debug: txtest */ #define LAGG_OPT_LACP_RXTEST 0x40 /* LACP debug: rxtest */ -#define LAGG_OPT_LACP_TIMEOUT 0x80 /* LACP timeout */ +#define LAGG_OPT_LACP_FAST_TIMO 0x80 /* LACP fast timeout */ u_int ro_count; /* number of ports */ u_int ro_active; /* active port count */ u_int ro_flapping; /* number of flapping */ @@ -159,7 +159,8 @@ struct lagg_reqopts { #define SIOCSLAGGOPTS _IOW('i', 153, struct lagg_reqopts) #define LAGG_OPT_BITS "\020\001USE_FLOWID\005LACP_STRICT" \ - "\006LACP_TXTEST\007LACP_RXTEST" + "\006LACP_TXTEST\007LACP_RXTEST" \ + "\010LACP_FAST_TIMO" #ifdef _KERNEL