From gjb at FreeBSD.org Fri Jun 14 00:03:50 2019 From: gjb at FreeBSD.org (Glen Barber) Date: Fri, 14 Jun 2019 00:03:48 +0000 (UTC) Subject: svn commit: r349026 - in releng/11.3: release/pkg_repos sys/conf sys/sys Message-ID: <201906140003.x5E03m2c041623@repo.freebsd.org> Author: gjb Date: Fri Jun 14 00:03:48 2019 New Revision: 349026 URL: https://svnweb.freebsd.org/changeset/base/349026 Log: Copy stable/11 at r349022 to releng/11.3 as part of the 11.3-RELEASE cycle. Update releng/11.3 from BETA3 to RC1. Switch the default dvd1.iso pkg(8) repository from latest to quarterly. Bump __FreeBSD_version. Prune vestigial svn:mergeinfo from the new branch. Approved by: re (implicit) Sponsored by: The FreeBSD Foundation Added: - copied from r349022, stable/11/ Directory Properties: releng/11.3/ (props changed) Modified: releng/11.3/release/pkg_repos/release-dvd.conf releng/11.3/sys/conf/newvers.sh releng/11.3/sys/sys/param.h Modified: releng/11.3/release/pkg_repos/release-dvd.conf ============================================================================== --- stable/11/release/pkg_repos/release-dvd.conf Thu Jun 13 19:51:48 2019 (r349022) +++ releng/11.3/release/pkg_repos/release-dvd.conf Fri Jun 14 00:03:48 2019 (r349026) @@ -1,6 +1,6 @@ # $FreeBSD$ release: { - url: "pkg+http://pkg.FreeBSD.org/${ABI}/latest", + url: "pkg+http://pkg.FreeBSD.org/${ABI}/quarterly", mirror_type: "srv", signature_type: "fingerprints", fingerprints: "/usr/share/keys/pkg", Modified: releng/11.3/sys/conf/newvers.sh ============================================================================== --- stable/11/sys/conf/newvers.sh Thu Jun 13 19:51:48 2019 (r349022) +++ releng/11.3/sys/conf/newvers.sh Fri Jun 14 00:03:48 2019 (r349026) @@ -44,7 +44,7 @@ TYPE="FreeBSD" REVISION="11.3" -BRANCH="BETA3" +BRANCH="RC1" if [ -n "${BRANCH_OVERRIDE}" ]; then BRANCH=${BRANCH_OVERRIDE} fi Modified: releng/11.3/sys/sys/param.h ============================================================================== --- stable/11/sys/sys/param.h Thu Jun 13 19:51:48 2019 (r349022) +++ releng/11.3/sys/sys/param.h Fri Jun 14 00:03:48 2019 (r349026) @@ -58,7 +58,7 @@ * in the range 5 to 9. */ #undef __FreeBSD_version -#define __FreeBSD_version 1102510 /* Master, propagated to newvers */ +#define __FreeBSD_version 1103000 /* Master, propagated to newvers */ /* * __FreeBSD_kernel__ indicates that this system uses the kernel of FreeBSD, From gjb at FreeBSD.org Fri Jun 14 00:30:54 2019 From: gjb at FreeBSD.org (Glen Barber) Date: Fri, 14 Jun 2019 00:30:52 +0000 (UTC) Subject: svn commit: r349028 - in releng/11.3/release/doc: en_US.ISO8859-1/errata en_US.ISO8859-1/hardware en_US.ISO8859-1/installation en_US.ISO8859-1/readme share/xml Message-ID: <201906140030.x5E0UquG059342@repo.freebsd.org> Author: gjb Date: Fri Jun 14 00:30:52 2019 New Revision: 349028 URL: https://svnweb.freebsd.org/changeset/base/349028 Log: Post-branch updates to release-related documentation: - Bump copyright years. - Note in parenthesis 11.3 may be the last 11.x release. - Prune stale errata items from 11.2-RELEASE. - Fix mailing list in the readme page. - Bump version numbers accordingly. This has no effect or impact on the in-progress 11.3-RC1 build. Approved by: re (implicit) Sponsored by: The FreeBSD Foundation Modified: releng/11.3/release/doc/en_US.ISO8859-1/errata/article.xml releng/11.3/release/doc/en_US.ISO8859-1/hardware/article.xml releng/11.3/release/doc/en_US.ISO8859-1/installation/article.xml releng/11.3/release/doc/en_US.ISO8859-1/readme/article.xml releng/11.3/release/doc/share/xml/release.ent Modified: releng/11.3/release/doc/en_US.ISO8859-1/errata/article.xml ============================================================================== --- releng/11.3/release/doc/en_US.ISO8859-1/errata/article.xml Fri Jun 14 00:09:12 2019 (r349027) +++ releng/11.3/release/doc/en_US.ISO8859-1/errata/article.xml Fri Jun 14 00:30:52 2019 (r349028) @@ -24,7 +24,7 @@ $FreeBSD$ - 2018 + 2019 The &os; Documentation Project @@ -49,7 +49,8 @@ &os;. This errata document for &os; &release; will be maintained - until the release of &os; &release.next;. + until the release of &os; &release.next; (if + applicable). @@ -96,157 +97,7 @@ - &os;/&arch.i386; installed on ZFS may crash during boot - when the ZFS pool mount is attempted while booting an - unmodified GENERIC kernel. - - A system tunable has been added as of revision - r286584 to make the - kern.kstack_pages tunable configurable - without recompiling the kernel. - - To mitigate system crashes with such configurations, - choose Escape to loader prompt in the - boot menu and enter the following lines from &man.loader.8; - prompt, after an OK: - - set kern.kstack_pages=4 -boot - - Add this line to - /boot/loader.conf for the change to - persist across reboots: - - kern.kstack_pages=4 - - - - [2017-07-25] &os;/&arch.arm64; currently lacks - EFI real-time clock - (RTC) support, which may cause the system - to boot with the wrong time set. - - As a workaround, either enable &man.ntpdate.8; or - include ntpd_sync_on_start="YES" in - &man.rc.conf.5;. - - - - [2017-07-25] A late issue was discovered with - &os;/&arch.arm64; and "root on - ZFS" installations where the root - ZFS pool would fail to be located. - - There currently is no workaround. - - - - [2017-11-06] An issue with &os; virtual machines with - vagrant was discovered that - affects the VirtualBox where the - virtual machine will not start on the initial boot invoked - with vagrant up. - - The issue is due to the virtual machine - MAC being unset, as &os; does not provide - a default Vagrantfile. - - It has been observed, however, that a subsequent - invocation of vagrant up will allow the - virtual machine to successfully boot, allowing access via - vagrant ssh. - - - - [2018-06-21] An issue had been discovered late in the - release cycle where removing ZFS vdevs - from a pool under certain conditions would cause a system - crash when &man.zfsd.8; is enabled in - &man.rc.conf.5;. - - At present, it is believed to be limited to removal of - a mirror vdev from a pool consisting of - multiple mirror vdevs. - - See PR 228750 - for more information and updates as the issue is - investigated. - - - - [2018-06-26] An issue had been discovered late in the - release cycle where a system crash could occur after - installing emulators/virtualbox-ose-kmod - from upstream package mirrors via &man.pkg.8;. - - Building emulators/virtualbox-ose-kmod - from the &man.ports.7; collection has been observed to work - around the crash. - - See PR 228535 - for more information. - - - - [2018-06-26] It was discovered after the releng/11.2 branch was tagged - for &os; 11.2-RELEASE that a few device drivers were - missing from the hardware - page. The missing drivers, &man.alc.4;, &man.cxgbev.4;, - &man.liquidio.4;, and &man.mos.4; were added to the - 11-STABLE hardware - page. - - - - [2018-06-26] The URL to the - instructions for source-based upgrades in - UPDATING incorrectly points to a page - that no longer exists. The correct URL is . - - - - [2018-06-27] The announcement email for &os; 11.2 - incorrectly states the ocs_fw(4) driver - had been added; this should have stated - &man.ocs.fc.4;. - - - - [2018-06-28] An issue had been reported after the - release of &os; 11.2 with x11/nvidia-driver installed from - the upstream package mirrors via &man.pkg.8;. - - Building x11/nvidia-driver from - the &man.ports.7; collection has been reported to resolve - the issue. - - See PR 228536 - for more information. - - - - [2018-10-18] A &os; system with a custom kernel - configuration excluding NFS on 10.x did - not explicitly require the krpc option to - be included when booting via ZFS-on-root - and, for example, setting - MODULES_OVERRIDE="zfs opensolaris" in the - kernel configuration. - - In 11.x, however, krpc is explicitly - required if the kernel configuration excludes - NFS. + No open issues at this time. Modified: releng/11.3/release/doc/en_US.ISO8859-1/hardware/article.xml ============================================================================== --- releng/11.3/release/doc/en_US.ISO8859-1/hardware/article.xml Fri Jun 14 00:09:12 2019 (r349027) +++ releng/11.3/release/doc/en_US.ISO8859-1/hardware/article.xml Fri Jun 14 00:30:52 2019 (r349028) @@ -40,6 +40,7 @@ 2016 2017 2018 + 2019 The &os; Documentation Project Modified: releng/11.3/release/doc/en_US.ISO8859-1/installation/article.xml ============================================================================== --- releng/11.3/release/doc/en_US.ISO8859-1/installation/article.xml Fri Jun 14 00:09:12 2019 (r349027) +++ releng/11.3/release/doc/en_US.ISO8859-1/installation/article.xml Fri Jun 14 00:30:52 2019 (r349028) @@ -22,7 +22,7 @@ $FreeBSD$ - 2018 + 2019 The &os; Documentation Project Modified: releng/11.3/release/doc/en_US.ISO8859-1/readme/article.xml ============================================================================== --- releng/11.3/release/doc/en_US.ISO8859-1/readme/article.xml Fri Jun 14 00:09:12 2019 (r349027) +++ releng/11.3/release/doc/en_US.ISO8859-1/readme/article.xml Fri Jun 14 00:30:52 2019 (r349028) @@ -44,6 +44,7 @@ 2016 2017 2018 + 2019 The &os; Documentation Project @@ -231,7 +232,7 @@ please send mail to the &a.questions;. If you are tracking the &release.branch; development - efforts, you must join the &a.current;, + efforts, you must join the &a.stable;, in order to keep abreast of recent developments and changes that may affect the way you use and maintain the system. Modified: releng/11.3/release/doc/share/xml/release.ent ============================================================================== --- releng/11.3/release/doc/share/xml/release.ent Fri Jun 14 00:09:12 2019 (r349027) +++ releng/11.3/release/doc/share/xml/release.ent Fri Jun 14 00:30:52 2019 (r349028) @@ -6,7 +6,7 @@ - + - + - + - + - + @@ -37,10 +37,10 @@ or "release" --> - + - - + + From erj at FreeBSD.org Wed Jun 19 00:37:57 2019 From: erj at FreeBSD.org (Eric Joyner) Date: Wed, 19 Jun 2019 00:37:55 +0000 (UTC) Subject: svn commit: r349181 - releng/11.3/sys/dev/ixl Message-ID: <201906190037.x5J0btwW014921@repo.freebsd.org> Author: erj Date: Wed Jun 19 00:37:54 2019 New Revision: 349181 URL: https://svnweb.freebsd.org/changeset/base/349181 Log: MFS r349163: ixl(4)/ixlv(4): Update Intel XL710 PF and VF drivers to ixl-1.11.9 and ixlv-1.5.8 Update the legacy (non-iflib) drivers in stable/11 with recent changes from the Intel out-of-tree version. Major changes: - Support for new BASE-T device with additional link speeds (2.5G and 5G) and EEE - Additional I2C access methods backported from ixl-iflib - FW LLDP Agent control with sysctl added for X722 devices (this already existed for 710 devices) - MAC/VLAN filters handling has been refactored - Building and loading if_ixlv as a KLD has been fixed This commit is not from CURRENT since the driver in 12/13 uses iflib, and the decision was made to not use iflib in FreeBSD 11 releases. Submitted by: Krzysztof Galazka Approved by: re@ (gjb@) Sponsored by: Intel Corporation Differential Revision: https://reviews.freebsd.org/D20290 Modified: releng/11.3/sys/dev/ixl/i40e_adminq.c releng/11.3/sys/dev/ixl/i40e_adminq.h releng/11.3/sys/dev/ixl/i40e_adminq_cmd.h releng/11.3/sys/dev/ixl/i40e_alloc.h releng/11.3/sys/dev/ixl/i40e_common.c releng/11.3/sys/dev/ixl/i40e_dcb.c releng/11.3/sys/dev/ixl/i40e_dcb.h releng/11.3/sys/dev/ixl/i40e_devids.h releng/11.3/sys/dev/ixl/i40e_hmc.c releng/11.3/sys/dev/ixl/i40e_hmc.h releng/11.3/sys/dev/ixl/i40e_lan_hmc.c releng/11.3/sys/dev/ixl/i40e_lan_hmc.h releng/11.3/sys/dev/ixl/i40e_nvm.c releng/11.3/sys/dev/ixl/i40e_osdep.c releng/11.3/sys/dev/ixl/i40e_osdep.h releng/11.3/sys/dev/ixl/i40e_prototype.h releng/11.3/sys/dev/ixl/i40e_register.h releng/11.3/sys/dev/ixl/i40e_status.h releng/11.3/sys/dev/ixl/i40e_type.h releng/11.3/sys/dev/ixl/if_ixl.c releng/11.3/sys/dev/ixl/if_ixlv.c releng/11.3/sys/dev/ixl/ixl.h releng/11.3/sys/dev/ixl/ixl_iw.c releng/11.3/sys/dev/ixl/ixl_iw.h releng/11.3/sys/dev/ixl/ixl_iw_int.h releng/11.3/sys/dev/ixl/ixl_pf.h releng/11.3/sys/dev/ixl/ixl_pf_i2c.c releng/11.3/sys/dev/ixl/ixl_pf_iov.c releng/11.3/sys/dev/ixl/ixl_pf_iov.h releng/11.3/sys/dev/ixl/ixl_pf_main.c releng/11.3/sys/dev/ixl/ixl_pf_qmgr.c releng/11.3/sys/dev/ixl/ixl_pf_qmgr.h releng/11.3/sys/dev/ixl/ixl_txrx.c releng/11.3/sys/dev/ixl/ixlv.h releng/11.3/sys/dev/ixl/ixlv_vc_mgr.h releng/11.3/sys/dev/ixl/ixlvc.c releng/11.3/sys/dev/ixl/virtchnl.h Directory Properties: releng/11.3/ (props changed) Modified: releng/11.3/sys/dev/ixl/i40e_adminq.c ============================================================================== --- releng/11.3/sys/dev/ixl/i40e_adminq.c Tue Jun 18 23:49:13 2019 (r349180) +++ releng/11.3/sys/dev/ixl/i40e_adminq.c Wed Jun 19 00:37:54 2019 (r349181) @@ -1,8 +1,8 @@ /****************************************************************************** - Copyright (c) 2013-2017, Intel Corporation + Copyright (c) 2013-2019, Intel Corporation All rights reserved. - + Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: @@ -125,6 +125,7 @@ enum i40e_status_code i40e_alloc_adminq_arq_ring(struc **/ void i40e_free_adminq_asq(struct i40e_hw *hw) { + i40e_free_virt_mem(hw, &hw->aq.asq.cmd_buf); i40e_free_dma_mem(hw, &hw->aq.asq.desc_buf); } @@ -404,7 +405,7 @@ enum i40e_status_code i40e_init_asq(struct i40e_hw *hw /* initialize base registers */ ret_code = i40e_config_asq_regs(hw); if (ret_code != I40E_SUCCESS) - goto init_adminq_free_rings; + goto init_config_regs; /* success! */ hw->aq.asq.count = hw->aq.num_asq_entries; @@ -412,7 +413,11 @@ enum i40e_status_code i40e_init_asq(struct i40e_hw *hw init_adminq_free_rings: i40e_free_adminq_asq(hw); + return ret_code; +init_config_regs: + i40e_free_asq_bufs(hw); + init_adminq_exit: return ret_code; } @@ -575,21 +580,22 @@ static void i40e_resume_aq(struct i40e_hw *hw) **/ enum i40e_status_code i40e_init_adminq(struct i40e_hw *hw) { + struct i40e_adminq_info *aq = &hw->aq; + enum i40e_status_code ret_code; u16 cfg_ptr, oem_hi, oem_lo; u16 eetrack_lo, eetrack_hi; - enum i40e_status_code ret_code; int retry = 0; /* verify input for valid configuration */ - if ((hw->aq.num_arq_entries == 0) || - (hw->aq.num_asq_entries == 0) || - (hw->aq.arq_buf_size == 0) || - (hw->aq.asq_buf_size == 0)) { + if (aq->num_arq_entries == 0 || + aq->num_asq_entries == 0 || + aq->arq_buf_size == 0 || + aq->asq_buf_size == 0) { ret_code = I40E_ERR_CONFIG; goto init_adminq_exit; } - i40e_init_spinlock(&hw->aq.asq_spinlock); - i40e_init_spinlock(&hw->aq.arq_spinlock); + i40e_init_spinlock(&aq->asq_spinlock); + i40e_init_spinlock(&aq->arq_spinlock); /* Set up register offsets */ i40e_adminq_init_regs(hw); @@ -616,11 +622,11 @@ enum i40e_status_code i40e_init_adminq(struct i40e_hw */ do { ret_code = i40e_aq_get_firmware_version(hw, - &hw->aq.fw_maj_ver, - &hw->aq.fw_min_ver, - &hw->aq.fw_build, - &hw->aq.api_maj_ver, - &hw->aq.api_min_ver, + &aq->fw_maj_ver, + &aq->fw_min_ver, + &aq->fw_build, + &aq->api_maj_ver, + &aq->api_min_ver, NULL); if (ret_code != I40E_ERR_ADMIN_QUEUE_TIMEOUT) break; @@ -643,26 +649,43 @@ enum i40e_status_code i40e_init_adminq(struct i40e_hw i40e_read_nvm_word(hw, (cfg_ptr + (I40E_NVM_OEM_VER_OFF + 1)), &oem_lo); hw->nvm.oem_ver = ((u32)oem_hi << 16) | oem_lo; - - /* The ability to RX (not drop) 802.1ad frames was added in API 1.7 */ - if ((hw->aq.api_maj_ver > 1) || - ((hw->aq.api_maj_ver == 1) && - (hw->aq.api_min_ver >= 7))) - hw->flags |= I40E_HW_FLAG_802_1AD_CAPABLE; - - if (hw->mac.type == I40E_MAC_XL710 && - hw->aq.api_maj_ver == I40E_FW_API_VERSION_MAJOR && - hw->aq.api_min_ver >= I40E_MINOR_VER_GET_LINK_INFO_XL710) { - hw->flags |= I40E_HW_FLAG_AQ_PHY_ACCESS_CAPABLE; + /* + * Some features were introduced in different FW API version + * for different MAC type. + */ + switch (hw->mac.type) { + case I40E_MAC_XL710: + if (aq->api_maj_ver > 1 || + (aq->api_maj_ver == 1 && + aq->api_min_ver >= I40E_MINOR_VER_GET_LINK_INFO_XL710)) { + hw->flags |= I40E_HW_FLAG_AQ_PHY_ACCESS_CAPABLE; + hw->flags |= I40E_HW_FLAG_FW_LLDP_STOPPABLE; + /* The ability to RX (not drop) 802.1ad frames */ + hw->flags |= I40E_HW_FLAG_802_1AD_CAPABLE; + } + break; + case I40E_MAC_X722: + if (aq->api_maj_ver > 1 || + (aq->api_maj_ver == 1 && + aq->api_min_ver >= I40E_MINOR_VER_FW_LLDP_STOPPABLE_X722)) + hw->flags |= I40E_HW_FLAG_FW_LLDP_STOPPABLE; + /* fall through */ + default: + break; } /* Newer versions of firmware require lock when reading the NVM */ - if ((hw->aq.api_maj_ver > 1) || - ((hw->aq.api_maj_ver == 1) && - (hw->aq.api_min_ver >= 5))) + if (aq->api_maj_ver > 1 || + (aq->api_maj_ver == 1 && + aq->api_min_ver >= 5)) hw->flags |= I40E_HW_FLAG_NVM_READ_REQUIRES_LOCK; - if (hw->aq.api_maj_ver > I40E_FW_API_VERSION_MAJOR) { + if (aq->api_maj_ver > 1 || + (aq->api_maj_ver == 1 && + aq->api_min_ver >= 8)) + hw->flags |= I40E_HW_FLAG_FW_LLDP_PERSISTENT; + + if (aq->api_maj_ver > I40E_FW_API_VERSION_MAJOR) { ret_code = I40E_ERR_FIRMWARE_API_VERSION; goto init_adminq_free_arq; } @@ -682,8 +705,8 @@ init_adminq_free_arq: init_adminq_free_asq: i40e_shutdown_asq(hw); init_adminq_destroy_spinlocks: - i40e_destroy_spinlock(&hw->aq.asq_spinlock); - i40e_destroy_spinlock(&hw->aq.arq_spinlock); + i40e_destroy_spinlock(&aq->asq_spinlock); + i40e_destroy_spinlock(&aq->arq_spinlock); init_adminq_exit: return ret_code; @@ -728,7 +751,7 @@ u16 i40e_clean_asq(struct i40e_hw *hw) desc = I40E_ADMINQ_DESC(*asq, ntc); details = I40E_ADMINQ_DETAILS(*asq, ntc); while (rd32(hw, hw->aq.asq.head) != ntc) { - i40e_debug(hw, I40E_DEBUG_AQ_MESSAGE, + i40e_debug(hw, I40E_DEBUG_AQ_COMMAND, "ntc %d head %d.\n", ntc, rd32(hw, hw->aq.asq.head)); if (details->callback) { @@ -808,7 +831,7 @@ enum i40e_status_code i40e_asq_send_command(struct i40 if (val >= hw->aq.num_asq_entries) { i40e_debug(hw, I40E_DEBUG_AQ_MESSAGE, "AQTX: head overrun at %d\n", val); - status = I40E_ERR_QUEUE_EMPTY; + status = I40E_ERR_ADMIN_QUEUE_FULL; goto asq_send_command_error; } @@ -896,7 +919,7 @@ enum i40e_status_code i40e_asq_send_command(struct i40 } /* bump the tail */ - i40e_debug(hw, I40E_DEBUG_AQ_MESSAGE, "AQTX: desc and buffer:\n"); + i40e_debug(hw, I40E_DEBUG_AQ_COMMAND, "AQTX: desc and buffer:\n"); i40e_debug_aq(hw, I40E_DEBUG_AQ_COMMAND, (void *)desc_on_ring, buff, buff_size); (hw->aq.asq.next_to_use)++; @@ -942,12 +965,14 @@ enum i40e_status_code i40e_asq_send_command(struct i40 cmd_completed = TRUE; if ((enum i40e_admin_queue_err)retval == I40E_AQ_RC_OK) status = I40E_SUCCESS; + else if ((enum i40e_admin_queue_err)retval == I40E_AQ_RC_EBUSY) + status = I40E_ERR_NOT_READY; else status = I40E_ERR_ADMIN_QUEUE_ERROR; hw->aq.asq_last_status = (enum i40e_admin_queue_err)retval; } - i40e_debug(hw, I40E_DEBUG_AQ_MESSAGE, + i40e_debug(hw, I40E_DEBUG_AQ_COMMAND, "AQTX: desc and buffer writeback:\n"); i40e_debug_aq(hw, I40E_DEBUG_AQ_COMMAND, (void *)desc, buff, buff_size); @@ -1063,7 +1088,7 @@ enum i40e_status_code i40e_clean_arq_element(struct i4 hw->aq.arq.r.arq_bi[desc_idx].va, e->msg_len, I40E_DMA_TO_NONDMA); - i40e_debug(hw, I40E_DEBUG_AQ_MESSAGE, "AQRX: desc and buffer:\n"); + i40e_debug(hw, I40E_DEBUG_AQ_COMMAND, "AQRX: desc and buffer:\n"); i40e_debug_aq(hw, I40E_DEBUG_AQ_COMMAND, (void *)desc, e->msg_buf, hw->aq.arq_buf_size); Modified: releng/11.3/sys/dev/ixl/i40e_adminq.h ============================================================================== --- releng/11.3/sys/dev/ixl/i40e_adminq.h Tue Jun 18 23:49:13 2019 (r349180) +++ releng/11.3/sys/dev/ixl/i40e_adminq.h Wed Jun 19 00:37:54 2019 (r349181) @@ -1,8 +1,8 @@ /****************************************************************************** - Copyright (c) 2013-2017, Intel Corporation + Copyright (c) 2013-2019, Intel Corporation All rights reserved. - + Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: Modified: releng/11.3/sys/dev/ixl/i40e_adminq_cmd.h ============================================================================== --- releng/11.3/sys/dev/ixl/i40e_adminq_cmd.h Tue Jun 18 23:49:13 2019 (r349180) +++ releng/11.3/sys/dev/ixl/i40e_adminq_cmd.h Wed Jun 19 00:37:54 2019 (r349181) @@ -1,8 +1,8 @@ /****************************************************************************** - Copyright (c) 2013-2017, Intel Corporation + Copyright (c) 2013-2019, Intel Corporation All rights reserved. - + Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: @@ -43,8 +43,8 @@ #define I40E_FW_API_VERSION_MAJOR 0x0001 -#define I40E_FW_API_VERSION_MINOR_X722 0x0005 -#define I40E_FW_API_VERSION_MINOR_X710 0x0007 +#define I40E_FW_API_VERSION_MINOR_X722 0x0008 +#define I40E_FW_API_VERSION_MINOR_X710 0x0008 #define I40E_FW_MINOR_VERSION(_h) ((_h)->mac.type == I40E_MAC_XL710 ? \ I40E_FW_API_VERSION_MINOR_X710 : \ @@ -52,6 +52,8 @@ /* API version 1.7 implements additional link and PHY-specific APIs */ #define I40E_MINOR_VER_GET_LINK_INFO_XL710 0x0007 +/* API version 1.6 for X722 devices adds ability to stop FW LLDP agent */ +#define I40E_MINOR_VER_FW_LLDP_STOPPABLE_X722 0x0006 struct i40e_aq_desc { __le16 flags; @@ -289,6 +291,7 @@ enum i40e_admin_queue_opc { i40e_aqc_opc_get_cee_dcb_cfg = 0x0A07, i40e_aqc_opc_lldp_set_local_mib = 0x0A08, i40e_aqc_opc_lldp_stop_start_spec_agent = 0x0A09, + i40e_aqc_opc_lldp_restore = 0x0A0A, /* Tunnel commands */ i40e_aqc_opc_add_udp_tunnel = 0x0B00, @@ -1782,6 +1785,8 @@ enum i40e_aq_phy_type { I40E_PHY_TYPE_25GBASE_LR = 0x22, I40E_PHY_TYPE_25GBASE_AOC = 0x23, I40E_PHY_TYPE_25GBASE_ACC = 0x24, + I40E_PHY_TYPE_2_5GBASE_T = 0x30, + I40E_PHY_TYPE_5GBASE_T = 0x31, I40E_PHY_TYPE_MAX, I40E_PHY_TYPE_NOT_SUPPORTED_HIGH_TEMP = 0xFD, I40E_PHY_TYPE_EMPTY = 0xFE, @@ -1823,19 +1828,25 @@ enum i40e_aq_phy_type { BIT_ULL(I40E_PHY_TYPE_25GBASE_SR) | \ BIT_ULL(I40E_PHY_TYPE_25GBASE_LR) | \ BIT_ULL(I40E_PHY_TYPE_25GBASE_AOC) | \ - BIT_ULL(I40E_PHY_TYPE_25GBASE_ACC)) + BIT_ULL(I40E_PHY_TYPE_25GBASE_ACC) | \ + BIT_ULL(I40E_PHY_TYPE_2_5GBASE_T) | \ + BIT_ULL(I40E_PHY_TYPE_5GBASE_T)) +#define I40E_LINK_SPEED_2_5GB_SHIFT 0x0 #define I40E_LINK_SPEED_100MB_SHIFT 0x1 #define I40E_LINK_SPEED_1000MB_SHIFT 0x2 #define I40E_LINK_SPEED_10GB_SHIFT 0x3 #define I40E_LINK_SPEED_40GB_SHIFT 0x4 #define I40E_LINK_SPEED_20GB_SHIFT 0x5 #define I40E_LINK_SPEED_25GB_SHIFT 0x6 +#define I40E_LINK_SPEED_5GB_SHIFT 0x7 enum i40e_aq_link_speed { I40E_LINK_SPEED_UNKNOWN = 0, I40E_LINK_SPEED_100MB = (1 << I40E_LINK_SPEED_100MB_SHIFT), I40E_LINK_SPEED_1GB = (1 << I40E_LINK_SPEED_1000MB_SHIFT), + I40E_LINK_SPEED_2_5GB = (1 << I40E_LINK_SPEED_2_5GB_SHIFT), + I40E_LINK_SPEED_5GB = (1 << I40E_LINK_SPEED_5GB_SHIFT), I40E_LINK_SPEED_10GB = (1 << I40E_LINK_SPEED_10GB_SHIFT), I40E_LINK_SPEED_40GB = (1 << I40E_LINK_SPEED_40GB_SHIFT), I40E_LINK_SPEED_20GB = (1 << I40E_LINK_SPEED_20GB_SHIFT), @@ -1865,12 +1876,15 @@ struct i40e_aq_get_phy_abilities_resp { #define I40E_AQ_PHY_FEC_ABILITY_KR 0x40 #define I40E_AQ_PHY_FEC_ABILITY_RS 0x80 __le16 eee_capability; +#define I40E_AQ_EEE_AUTO 0x0001 #define I40E_AQ_EEE_100BASE_TX 0x0002 #define I40E_AQ_EEE_1000BASE_T 0x0004 #define I40E_AQ_EEE_10GBASE_T 0x0008 #define I40E_AQ_EEE_1000BASE_KX 0x0010 #define I40E_AQ_EEE_10GBASE_KX4 0x0020 #define I40E_AQ_EEE_10GBASE_KR 0x0040 +#define I40E_AQ_EEE_2_5GBASE_T 0x0100 +#define I40E_AQ_EEE_5GBASE_T 0x0200 __le32 eeer_val; u8 d3_lpan; #define I40E_AQ_SET_PHY_D3_LPAN_ENA 0x01 @@ -1881,6 +1895,8 @@ struct i40e_aq_get_phy_abilities_resp { #define I40E_AQ_PHY_TYPE_EXT_25G_LR 0x08 #define I40E_AQ_PHY_TYPE_EXT_25G_AOC 0x10 #define I40E_AQ_PHY_TYPE_EXT_25G_ACC 0x20 +#define I40E_AQ_PHY_TYPE_EXT_2_5GBASE_T 0x40 +#define I40E_AQ_PHY_TYPE_EXT_5GBASE_T 0x80 u8 fec_cfg_curr_mod_ext_info; #define I40E_AQ_ENABLE_FEC_KR 0x01 #define I40E_AQ_ENABLE_FEC_RS 0x02 @@ -2122,15 +2138,29 @@ enum i40e_aq_phy_reg_type { I40E_AQC_PHY_REG_EXERNAL_MODULE = 0x3 }; +#pragma pack(1) /* Run PHY Activity (0x0626) */ struct i40e_aqc_run_phy_activity { - __le16 activity_id; - u8 flags; - u8 reserved1; - __le32 control; - __le32 data; - u8 reserved2[4]; + u8 cmd_flags; + __le16 activity_id; +#define I40E_AQ_RUN_PHY_ACTIVITY_ACTIVITY_ID_USER_DEFINED 0x10 + u8 reserved; + union { + struct { + __le32 dnl_opcode; +#define I40E_AQ_RUN_PHY_ACTIVITY_DNL_OPCODE_GET_EEE_STATISTICS 0x801b + __le32 data; + u8 reserved2[4]; + } cmd; + struct { + __le32 cmd_status; +#define I40E_AQ_RUN_PHY_ACTIVITY_CMD_STATUS_SUCCESS 0x4 + __le32 data0; + __le32 data1; + } resp; + } params; }; +#pragma pack() I40E_CHECK_CMD_LENGTH(i40e_aqc_run_phy_activity); @@ -2142,7 +2172,9 @@ struct i40e_aqc_phy_register_access { #define I40E_AQ_PHY_REG_ACCESS_EXTERNAL 1 #define I40E_AQ_PHY_REG_ACCESS_EXTERNAL_MODULE 2 u8 dev_addres; - u8 reserved1[2]; + u8 cmd_flags; +#define I40E_AQ_PHY_REG_ACCESS_DONT_CHANGE_QSFP_PAGE 1 + u8 reserved1; __le32 reg_address; __le32 reg_value; u8 reserved2[4]; @@ -2157,6 +2189,8 @@ I40E_CHECK_CMD_LENGTH(i40e_aqc_phy_register_access); struct i40e_aqc_nvm_update { u8 command_flags; #define I40E_AQ_NVM_LAST_CMD 0x01 +#define I40E_AQ_NVM_REARRANGE_TO_FLAT 0x20 +#define I40E_AQ_NVM_REARRANGE_TO_STRUCT 0x40 #define I40E_AQ_NVM_FLASH_ONLY 0x80 #define I40E_AQ_NVM_PRESERVATION_FLAGS_SHIFT 1 #define I40E_AQ_NVM_PRESERVATION_FLAGS_MASK 0x03 @@ -2404,18 +2438,19 @@ I40E_CHECK_CMD_LENGTH(i40e_aqc_lldp_update_tlv); /* Stop LLDP (direct 0x0A05) */ struct i40e_aqc_lldp_stop { u8 command; -#define I40E_AQ_LLDP_AGENT_STOP 0x0 -#define I40E_AQ_LLDP_AGENT_SHUTDOWN 0x1 +#define I40E_AQ_LLDP_AGENT_STOP 0x0 +#define I40E_AQ_LLDP_AGENT_SHUTDOWN 0x1 +#define I40E_AQ_LLDP_AGENT_STOP_PERSIST 0x2 u8 reserved[15]; }; I40E_CHECK_CMD_LENGTH(i40e_aqc_lldp_stop); /* Start LLDP (direct 0x0A06) */ - struct i40e_aqc_lldp_start { u8 command; -#define I40E_AQ_LLDP_AGENT_START 0x1 +#define I40E_AQ_LLDP_AGENT_START 0x1 +#define I40E_AQ_LLDP_AGENT_START_PERSIST 0x2 u8 reserved[15]; }; @@ -2534,6 +2569,16 @@ struct i40e_aqc_lldp_stop_start_specific_agent { }; I40E_CHECK_CMD_LENGTH(i40e_aqc_lldp_stop_start_specific_agent); + +/* Restore LLDP Agent factory settings (direct 0x0A0A) */ +struct i40e_aqc_lldp_restore { + u8 command; +#define I40E_AQ_LLDP_AGENT_RESTORE_NOT 0x0 +#define I40E_AQ_LLDP_AGENT_RESTORE 0x1 + u8 reserved[15]; +}; + +I40E_CHECK_CMD_LENGTH(i40e_aqc_lldp_restore); /* Add Udp Tunnel command and completion (direct 0x0B00) */ struct i40e_aqc_add_udp_tunnel { Modified: releng/11.3/sys/dev/ixl/i40e_alloc.h ============================================================================== --- releng/11.3/sys/dev/ixl/i40e_alloc.h Tue Jun 18 23:49:13 2019 (r349180) +++ releng/11.3/sys/dev/ixl/i40e_alloc.h Wed Jun 19 00:37:54 2019 (r349181) @@ -1,8 +1,8 @@ /****************************************************************************** - Copyright (c) 2013-2017, Intel Corporation + Copyright (c) 2013-2019, Intel Corporation All rights reserved. - + Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: Modified: releng/11.3/sys/dev/ixl/i40e_common.c ============================================================================== --- releng/11.3/sys/dev/ixl/i40e_common.c Tue Jun 18 23:49:13 2019 (r349180) +++ releng/11.3/sys/dev/ixl/i40e_common.c Wed Jun 19 00:37:54 2019 (r349181) @@ -1,8 +1,8 @@ /****************************************************************************** - Copyright (c) 2013-2017, Intel Corporation + Copyright (c) 2013-2019, Intel Corporation All rights reserved. - + Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: @@ -37,7 +37,6 @@ #include "i40e_prototype.h" #include "virtchnl.h" - /** * i40e_set_mac_type - Sets MAC type * @hw: pointer to the HW structure @@ -62,10 +61,15 @@ enum i40e_status_code i40e_set_mac_type(struct i40e_hw case I40E_DEV_ID_QSFP_C: case I40E_DEV_ID_10G_BASE_T: case I40E_DEV_ID_10G_BASE_T4: + case I40E_DEV_ID_10G_BASE_T_BC: + case I40E_DEV_ID_10G_B: + case I40E_DEV_ID_10G_SFP: case I40E_DEV_ID_20G_KR2: case I40E_DEV_ID_20G_KR2_A: case I40E_DEV_ID_25G_B: case I40E_DEV_ID_25G_SFP28: + case I40E_DEV_ID_X710_N3000: + case I40E_DEV_ID_XXV710_N3000: hw->mac.type = I40E_MAC_XL710; break; case I40E_DEV_ID_KX_X722: @@ -319,32 +323,37 @@ void i40e_debug_aq(struct i40e_hw *hw, enum i40e_debug void *buffer, u16 buf_len) { struct i40e_aq_desc *aq_desc = (struct i40e_aq_desc *)desc; + u32 effective_mask = hw->debug_mask & mask; u8 *buf = (u8 *)buffer; u16 len; - u16 i = 0; + u16 i; - if ((!(mask & hw->debug_mask)) || (desc == NULL)) + if (!effective_mask || !desc) return; len = LE16_TO_CPU(aq_desc->datalen); - i40e_debug(hw, mask, + i40e_debug(hw, mask & I40E_DEBUG_AQ_DESCRIPTOR, "AQ CMD: opcode 0x%04X, flags 0x%04X, datalen 0x%04X, retval 0x%04X\n", LE16_TO_CPU(aq_desc->opcode), LE16_TO_CPU(aq_desc->flags), LE16_TO_CPU(aq_desc->datalen), LE16_TO_CPU(aq_desc->retval)); - i40e_debug(hw, mask, "\tcookie (h,l) 0x%08X 0x%08X\n", + i40e_debug(hw, mask & I40E_DEBUG_AQ_DESCRIPTOR, + "\tcookie (h,l) 0x%08X 0x%08X\n", LE32_TO_CPU(aq_desc->cookie_high), LE32_TO_CPU(aq_desc->cookie_low)); - i40e_debug(hw, mask, "\tparam (0,1) 0x%08X 0x%08X\n", + i40e_debug(hw, mask & I40E_DEBUG_AQ_DESCRIPTOR, + "\tparam (0,1) 0x%08X 0x%08X\n", LE32_TO_CPU(aq_desc->params.internal.param0), LE32_TO_CPU(aq_desc->params.internal.param1)); - i40e_debug(hw, mask, "\taddr (h,l) 0x%08X 0x%08X\n", + i40e_debug(hw, mask & I40E_DEBUG_AQ_DESCRIPTOR, + "\taddr (h,l) 0x%08X 0x%08X\n", LE32_TO_CPU(aq_desc->params.external.addr_high), LE32_TO_CPU(aq_desc->params.external.addr_low)); - if ((buffer != NULL) && (aq_desc->datalen != 0)) { + if (buffer && (buf_len != 0) && (len != 0) && + (effective_mask & I40E_DEBUG_AQ_DESC_BUFFER)) { i40e_debug(hw, mask, "AQ CMD Buffer:\n"); if (buf_len < len) len = buf_len; @@ -1014,6 +1023,18 @@ enum i40e_status_code i40e_init_shared_code(struct i40 hw->flags |= I40E_HW_FLAG_AQ_SRCTL_ACCESS_ENABLE | I40E_HW_FLAG_NVM_READ_REQUIRES_LOCK; + /* NVMUpdate features structure initialization */ + hw->nvmupd_features.major = I40E_NVMUPD_FEATURES_API_VER_MAJOR; + hw->nvmupd_features.minor = I40E_NVMUPD_FEATURES_API_VER_MINOR; + hw->nvmupd_features.size = sizeof(hw->nvmupd_features); + i40e_memset(hw->nvmupd_features.features, 0x0, + I40E_NVMUPD_FEATURES_API_FEATURES_ARRAY_LEN * + sizeof(*hw->nvmupd_features.features), + I40E_NONDMA_MEM); + + /* No features supported at the moment */ + hw->nvmupd_features.features[0] = 0; + status = i40e_init_nvm(hw); return status; } @@ -1235,6 +1256,8 @@ static enum i40e_media_type i40e_get_media_type(struct break; case I40E_PHY_TYPE_100BASE_TX: case I40E_PHY_TYPE_1000BASE_T: + case I40E_PHY_TYPE_2_5GBASE_T: + case I40E_PHY_TYPE_5GBASE_T: case I40E_PHY_TYPE_10GBASE_T: media = I40E_MEDIA_TYPE_BASET; break; @@ -1271,6 +1294,29 @@ static enum i40e_media_type i40e_get_media_type(struct return media; } +/** + * i40e_poll_globr - Poll for Global Reset completion + * @hw: pointer to the hardware structure + * @retry_limit: how many times to retry before failure + **/ +static enum i40e_status_code i40e_poll_globr(struct i40e_hw *hw, + u32 retry_limit) +{ + u32 cnt, reg = 0; + + for (cnt = 0; cnt < retry_limit; cnt++) { + reg = rd32(hw, I40E_GLGEN_RSTAT); + if (!(reg & I40E_GLGEN_RSTAT_DEVSTATE_MASK)) + return I40E_SUCCESS; + i40e_msec_delay(100); + } + + DEBUGOUT("Global reset failed.\n"); + DEBUGOUT1("I40E_GLGEN_RSTAT = 0x%x\n", reg); + + return I40E_ERR_RESET_FAILED; +} + #define I40E_PF_RESET_WAIT_COUNT 200 /** * i40e_pf_reset - Reset the PF @@ -1294,7 +1340,7 @@ enum i40e_status_code i40e_pf_reset(struct i40e_hw *hw I40E_GLGEN_RSTCTL_GRSTDEL_MASK) >> I40E_GLGEN_RSTCTL_GRSTDEL_SHIFT; - grst_del = grst_del * 20; + grst_del = min(grst_del * 20, 160U); for (cnt = 0; cnt < grst_del; cnt++) { reg = rd32(hw, I40E_GLGEN_RSTAT); @@ -1340,14 +1386,14 @@ enum i40e_status_code i40e_pf_reset(struct i40e_hw *hw if (!(reg & I40E_PFGEN_CTRL_PFSWR_MASK)) break; reg2 = rd32(hw, I40E_GLGEN_RSTAT); - if (reg2 & I40E_GLGEN_RSTAT_DEVSTATE_MASK) { - DEBUGOUT("Core reset upcoming. Skipping PF reset request.\n"); - DEBUGOUT1("I40E_GLGEN_RSTAT = 0x%x\n", reg2); - return I40E_ERR_NOT_READY; - } + if (reg2 & I40E_GLGEN_RSTAT_DEVSTATE_MASK) + break; i40e_msec_delay(1); } - if (reg & I40E_PFGEN_CTRL_PFSWR_MASK) { + if (reg2 & I40E_GLGEN_RSTAT_DEVSTATE_MASK) { + if (i40e_poll_globr(hw, grst_del) != I40E_SUCCESS) + return I40E_ERR_RESET_FAILED; + } else if (reg & I40E_PFGEN_CTRL_PFSWR_MASK) { DEBUGOUT("PF reset polling failed to complete.\n"); return I40E_ERR_RESET_FAILED; } @@ -1511,7 +1557,6 @@ static u32 i40e_led_is_mine(struct i40e_hw *hw, int id **/ u32 i40e_led_get(struct i40e_hw *hw) { - u32 current_mode = 0; u32 mode = 0; int i; @@ -1523,27 +1568,10 @@ u32 i40e_led_get(struct i40e_hw *hw) if (!gpio_val) continue; - - /* ignore gpio LED src mode entries related to the activity - * LEDs - */ - current_mode = ((gpio_val & I40E_GLGEN_GPIO_CTL_LED_MODE_MASK) - >> I40E_GLGEN_GPIO_CTL_LED_MODE_SHIFT); - switch (current_mode) { - case I40E_COMBINED_ACTIVITY: - case I40E_FILTER_ACTIVITY: - case I40E_MAC_ACTIVITY: - case I40E_LINK_ACTIVITY: - continue; - default: - break; - } - mode = (gpio_val & I40E_GLGEN_GPIO_CTL_LED_MODE_MASK) >> I40E_GLGEN_GPIO_CTL_LED_MODE_SHIFT; break; } - return mode; } @@ -1558,7 +1586,6 @@ u32 i40e_led_get(struct i40e_hw *hw) **/ void i40e_led_set(struct i40e_hw *hw, u32 mode, bool blink) { - u32 current_mode = 0; int i; if (mode & 0xfffffff0) @@ -1572,22 +1599,6 @@ void i40e_led_set(struct i40e_hw *hw, u32 mode, bool b if (!gpio_val) continue; - - /* ignore gpio LED src mode entries related to the activity - * LEDs - */ - current_mode = ((gpio_val & I40E_GLGEN_GPIO_CTL_LED_MODE_MASK) - >> I40E_GLGEN_GPIO_CTL_LED_MODE_SHIFT); - switch (current_mode) { - case I40E_COMBINED_ACTIVITY: - case I40E_FILTER_ACTIVITY: - case I40E_MAC_ACTIVITY: - case I40E_LINK_ACTIVITY: - continue; - default: - break; - } - gpio_val &= ~I40E_GLGEN_GPIO_CTL_LED_MODE_MASK; /* this & is a bit of paranoia, but serves as a range check */ gpio_val |= ((mode << I40E_GLGEN_GPIO_CTL_LED_MODE_SHIFT) & @@ -1828,6 +1839,10 @@ enum i40e_status_code i40e_aq_set_mac_config(struct i4 if (crc_en) cmd->params |= I40E_AQ_SET_MAC_CONFIG_CRC_EN; +#define I40E_AQ_SET_MAC_CONFIG_FC_DEFAULT_THRESHOLD 0x7FFF + cmd->fc_refresh_threshold = + CPU_TO_LE16(I40E_AQ_SET_MAC_CONFIG_FC_DEFAULT_THRESHOLD); + status = i40e_asq_send_command(hw, &desc, NULL, 0, cmd_details); return status; @@ -1968,8 +1983,7 @@ enum i40e_status_code i40e_aq_get_link_info(struct i40 hw->aq.fw_min_ver < 40)) && hw_link_info->phy_type == 0xE) hw_link_info->phy_type = I40E_PHY_TYPE_10GBASE_SFPP_CU; - if (hw->aq.api_maj_ver == I40E_FW_API_VERSION_MAJOR && - hw->aq.api_min_ver >= 7) { + if (hw->flags & I40E_HW_FLAG_AQ_PHY_ACCESS_CAPABLE) { __le32 tmp; i40e_memcpy(&tmp, resp->link_type, sizeof(tmp), @@ -4102,6 +4116,43 @@ i40e_aq_update_nvm_exit: } /** + * i40e_aq_rearrange_nvm + * @hw: pointer to the hw struct + * @rearrange_nvm: defines direction of rearrangement + * @cmd_details: pointer to command details structure or NULL + * + * Rearrange NVM structure, available only for transition FW + **/ +enum i40e_status_code i40e_aq_rearrange_nvm(struct i40e_hw *hw, + u8 rearrange_nvm, + struct i40e_asq_cmd_details *cmd_details) +{ + struct i40e_aqc_nvm_update *cmd; + enum i40e_status_code status; + struct i40e_aq_desc desc; + + DEBUGFUNC("i40e_aq_rearrange_nvm"); + + cmd = (struct i40e_aqc_nvm_update *)&desc.params.raw; + + i40e_fill_default_direct_cmd_desc(&desc, i40e_aqc_opc_nvm_update); + + rearrange_nvm &= (I40E_AQ_NVM_REARRANGE_TO_FLAT | + I40E_AQ_NVM_REARRANGE_TO_STRUCT); + + if (!rearrange_nvm) { + status = I40E_ERR_PARAM; + goto i40e_aq_rearrange_nvm_exit; + } + + cmd->command_flags |= rearrange_nvm; + status = i40e_asq_send_command(hw, &desc, NULL, 0, cmd_details); + +i40e_aq_rearrange_nvm_exit: + return status; +} + +/** * i40e_aq_nvm_progress * @hw: pointer to the hw struct * @progress: pointer to progress returned from AQ @@ -4208,7 +4259,7 @@ enum i40e_status_code i40e_aq_set_lldp_mib(struct i40e cmd->type = mib_type; cmd->length = CPU_TO_LE16(buff_size); - cmd->address_high = CPU_TO_LE32(I40E_HI_WORD((u64)buff)); + cmd->address_high = CPU_TO_LE32(I40E_HI_DWORD((u64)buff)); cmd->address_low = CPU_TO_LE32(I40E_LO_DWORD((u64)buff)); status = i40e_asq_send_command(hw, &desc, buff, buff_size, cmd_details); @@ -4244,164 +4295,54 @@ enum i40e_status_code i40e_aq_cfg_lldp_mib_change_even } /** - * i40e_aq_add_lldp_tlv + * i40e_aq_restore_lldp * @hw: pointer to the hw struct - * @bridge_type: type of bridge - * @buff: buffer with TLV to add - * @buff_size: length of the buffer - * @tlv_len: length of the TLV to be added - * @mib_len: length of the LLDP MIB returned in response + * @setting: pointer to factory setting variable or NULL + * @restore: True if factory settings should be restored * @cmd_details: pointer to command details structure or NULL * - * Add the specified TLV to LLDP Local MIB for the given bridge type, - * it is responsibility of the caller to make sure that the TLV is not - * already present in the LLDPDU. - * In return firmware will write the complete LLDP MIB with the newly - * added TLV in the response buffer. + * Restore LLDP Agent factory settings if @restore set to True. In other case + * only returns factory setting in AQ response. **/ -enum i40e_status_code i40e_aq_add_lldp_tlv(struct i40e_hw *hw, u8 bridge_type, - void *buff, u16 buff_size, u16 tlv_len, - u16 *mib_len, - struct i40e_asq_cmd_details *cmd_details) +enum i40e_status_code +i40e_aq_restore_lldp(struct i40e_hw *hw, u8 *setting, bool restore, + struct i40e_asq_cmd_details *cmd_details) { struct i40e_aq_desc desc; - struct i40e_aqc_lldp_add_tlv *cmd = - (struct i40e_aqc_lldp_add_tlv *)&desc.params.raw; + struct i40e_aqc_lldp_restore *cmd = + (struct i40e_aqc_lldp_restore *)&desc.params.raw; enum i40e_status_code status; - if (buff_size == 0 || !buff || tlv_len == 0) - return I40E_ERR_PARAM; - - i40e_fill_default_direct_cmd_desc(&desc, i40e_aqc_opc_lldp_add_tlv); - - /* Indirect Command */ - desc.flags |= CPU_TO_LE16((u16)(I40E_AQ_FLAG_BUF | I40E_AQ_FLAG_RD)); - if (buff_size > I40E_AQ_LARGE_BUF) - desc.flags |= CPU_TO_LE16((u16)I40E_AQ_FLAG_LB); - desc.datalen = CPU_TO_LE16(buff_size); - - cmd->type = ((bridge_type << I40E_AQ_LLDP_BRIDGE_TYPE_SHIFT) & - I40E_AQ_LLDP_BRIDGE_TYPE_MASK); - cmd->len = CPU_TO_LE16(tlv_len); - - status = i40e_asq_send_command(hw, &desc, buff, buff_size, cmd_details); - if (!status) { - if (mib_len != NULL) - *mib_len = LE16_TO_CPU(desc.datalen); + if (!(hw->flags & I40E_HW_FLAG_FW_LLDP_PERSISTENT)) { + i40e_debug(hw, I40E_DEBUG_ALL, + "Restore LLDP not supported by current FW version.\n"); + return I40E_ERR_DEVICE_NOT_SUPPORTED; } - return status; -} + i40e_fill_default_direct_cmd_desc(&desc, i40e_aqc_opc_lldp_restore); -/** - * i40e_aq_update_lldp_tlv - * @hw: pointer to the hw struct - * @bridge_type: type of bridge - * @buff: buffer with TLV to update - * @buff_size: size of the buffer holding original and updated TLVs - * @old_len: Length of the Original TLV - * @new_len: Length of the Updated TLV - * @offset: offset of the updated TLV in the buff - * @mib_len: length of the returned LLDP MIB - * @cmd_details: pointer to command details structure or NULL - * - * Update the specified TLV to the LLDP Local MIB for the given bridge type. - * Firmware will place the complete LLDP MIB in response buffer with the - * updated TLV. - **/ -enum i40e_status_code i40e_aq_update_lldp_tlv(struct i40e_hw *hw, - u8 bridge_type, void *buff, u16 buff_size, - u16 old_len, u16 new_len, u16 offset, - u16 *mib_len, - struct i40e_asq_cmd_details *cmd_details) -{ - struct i40e_aq_desc desc; - struct i40e_aqc_lldp_update_tlv *cmd = - (struct i40e_aqc_lldp_update_tlv *)&desc.params.raw; - enum i40e_status_code status; + if (restore) + cmd->command |= I40E_AQ_LLDP_AGENT_RESTORE; - if (buff_size == 0 || !buff || offset == 0 || - old_len == 0 || new_len == 0) - return I40E_ERR_PARAM; + status = i40e_asq_send_command(hw, &desc, NULL, 0, cmd_details); - i40e_fill_default_direct_cmd_desc(&desc, i40e_aqc_opc_lldp_update_tlv); + if (setting) + *setting = cmd->command & 1; - /* Indirect Command */ - desc.flags |= CPU_TO_LE16((u16)(I40E_AQ_FLAG_BUF | I40E_AQ_FLAG_RD)); - if (buff_size > I40E_AQ_LARGE_BUF) - desc.flags |= CPU_TO_LE16((u16)I40E_AQ_FLAG_LB); - desc.datalen = CPU_TO_LE16(buff_size); - - cmd->type = ((bridge_type << I40E_AQ_LLDP_BRIDGE_TYPE_SHIFT) & - I40E_AQ_LLDP_BRIDGE_TYPE_MASK); - cmd->old_len = CPU_TO_LE16(old_len); - cmd->new_offset = CPU_TO_LE16(offset); - cmd->new_len = CPU_TO_LE16(new_len); - - status = i40e_asq_send_command(hw, &desc, buff, buff_size, cmd_details); - if (!status) { - if (mib_len != NULL) - *mib_len = LE16_TO_CPU(desc.datalen); - } - return status; } /** - * i40e_aq_delete_lldp_tlv - * @hw: pointer to the hw struct - * @bridge_type: type of bridge - * @buff: pointer to a user supplied buffer that has the TLV - * @buff_size: length of the buffer - * @tlv_len: length of the TLV to be deleted - * @mib_len: length of the returned LLDP MIB - * @cmd_details: pointer to command details structure or NULL - * - * Delete the specified TLV from LLDP Local MIB for the given bridge type. - * The firmware places the entire LLDP MIB in the response buffer. - **/ -enum i40e_status_code i40e_aq_delete_lldp_tlv(struct i40e_hw *hw, - u8 bridge_type, void *buff, u16 buff_size, - u16 tlv_len, u16 *mib_len, - struct i40e_asq_cmd_details *cmd_details) -{ - struct i40e_aq_desc desc; - struct i40e_aqc_lldp_add_tlv *cmd = - (struct i40e_aqc_lldp_add_tlv *)&desc.params.raw; - enum i40e_status_code status; - - if (buff_size == 0 || !buff) - return I40E_ERR_PARAM; - - i40e_fill_default_direct_cmd_desc(&desc, i40e_aqc_opc_lldp_delete_tlv); - - /* Indirect Command */ - desc.flags |= CPU_TO_LE16((u16)(I40E_AQ_FLAG_BUF | I40E_AQ_FLAG_RD)); - if (buff_size > I40E_AQ_LARGE_BUF) - desc.flags |= CPU_TO_LE16((u16)I40E_AQ_FLAG_LB); - desc.datalen = CPU_TO_LE16(buff_size); - cmd->len = CPU_TO_LE16(tlv_len); - cmd->type = ((bridge_type << I40E_AQ_LLDP_BRIDGE_TYPE_SHIFT) & - I40E_AQ_LLDP_BRIDGE_TYPE_MASK); - - status = i40e_asq_send_command(hw, &desc, buff, buff_size, cmd_details); - if (!status) { - if (mib_len != NULL) - *mib_len = LE16_TO_CPU(desc.datalen); - } - - return status; -} - -/** * i40e_aq_stop_lldp * @hw: pointer to the hw struct * @shutdown_agent: True if LLDP Agent needs to be Shutdown + * @persist: True if stop of LLDP should be persistent across power cycles * @cmd_details: pointer to command details structure or NULL * * Stop or Shutdown the embedded LLDP Agent **/ enum i40e_status_code i40e_aq_stop_lldp(struct i40e_hw *hw, bool shutdown_agent, + bool persist, struct i40e_asq_cmd_details *cmd_details) { struct i40e_aq_desc desc; @@ -4414,6 +4355,14 @@ enum i40e_status_code i40e_aq_stop_lldp(struct i40e_hw if (shutdown_agent) cmd->command |= I40E_AQ_LLDP_AGENT_SHUTDOWN; + if (persist) { + if (hw->flags & I40E_HW_FLAG_FW_LLDP_PERSISTENT) + cmd->command |= I40E_AQ_LLDP_AGENT_STOP_PERSIST; + else + i40e_debug(hw, I40E_DEBUG_ALL, + "Persistent Stop LLDP not supported by current FW version.\n"); + } + status = i40e_asq_send_command(hw, &desc, NULL, 0, cmd_details); return status; @@ -4422,11 +4371,13 @@ enum i40e_status_code i40e_aq_stop_lldp(struct i40e_hw /** * i40e_aq_start_lldp * @hw: pointer to the hw struct + * @persist: True if start of LLDP should be persistent across power cycles * @cmd_details: pointer to command details structure or NULL * * Start the embedded LLDP Agent on all ports. **/ enum i40e_status_code i40e_aq_start_lldp(struct i40e_hw *hw, + bool persist, struct i40e_asq_cmd_details *cmd_details) { struct i40e_aq_desc desc; @@ -4437,6 +4388,15 @@ enum i40e_status_code i40e_aq_start_lldp(struct i40e_h i40e_fill_default_direct_cmd_desc(&desc, i40e_aqc_opc_lldp_start); cmd->command = I40E_AQ_LLDP_AGENT_START; + + if (persist) { + if (hw->flags & I40E_HW_FLAG_FW_LLDP_PERSISTENT) + cmd->command |= I40E_AQ_LLDP_AGENT_START_PERSIST; + else + i40e_debug(hw, I40E_DEBUG_ALL, + "Persistent Start LLDP not supported by current FW version.\n"); + } + status = i40e_asq_send_command(hw, &desc, NULL, 0, cmd_details); return status; @@ -4458,9 +4418,7 @@ i40e_aq_set_dcb_parameters(struct i40e_hw *hw, bool dc (struct i40e_aqc_set_dcb_parameters *)&desc.params.raw; enum i40e_status_code status; - if ((hw->mac.type != I40E_MAC_XL710) || - ((hw->aq.api_maj_ver < 1) || - ((hw->aq.api_maj_ver == 1) && (hw->aq.api_min_ver < 6)))) + if (!(hw->flags & I40E_HW_FLAG_FW_LLDP_STOPPABLE)) return I40E_ERR_DEVICE_NOT_SUPPORTED; i40e_fill_default_direct_cmd_desc(&desc, @@ -6088,7 +6046,71 @@ enum i40e_status_code i40e_aq_debug_dump(struct i40e_h return status; } + /** + * i40e_enable_eee + * @hw: pointer to the hardware structure + * @enable: state of Energy Efficient Ethernet mode to be set + * *** DIFF OUTPUT TRUNCATED AT 1000 LINES *** From gjb at FreeBSD.org Wed Jun 19 15:26:53 2019 From: gjb at FreeBSD.org (Glen Barber) Date: Wed, 19 Jun 2019 15:26:53 +0000 (UTC) Subject: svn commit: r349194 - releng/11.3/release/pkg_repos Message-ID: <201906191526.x5JFQr5P085338@repo.freebsd.org> Author: gjb Date: Wed Jun 19 15:26:52 2019 New Revision: 349194 URL: https://svnweb.freebsd.org/changeset/base/349194 Log: Update the pkg.conf used to populate the dvd1.iso to use the release_3 package set. Approved by: re (implicit) Sponsored by: The FreeBSD Foundation Modified: releng/11.3/release/pkg_repos/release-dvd.conf Modified: releng/11.3/release/pkg_repos/release-dvd.conf ============================================================================== --- releng/11.3/release/pkg_repos/release-dvd.conf Wed Jun 19 14:57:51 2019 (r349193) +++ releng/11.3/release/pkg_repos/release-dvd.conf Wed Jun 19 15:26:52 2019 (r349194) @@ -1,6 +1,6 @@ # $FreeBSD$ release: { - url: "pkg+http://pkg.FreeBSD.org/${ABI}/quarterly", + url: "pkg+http://pkg.FreeBSD.org/${ABI}/release_3", mirror_type: "srv", signature_type: "fingerprints", fingerprints: "/usr/share/keys/pkg", From gordon at FreeBSD.org Wed Jun 19 16:41:19 2019 From: gordon at FreeBSD.org (Gordon Tetlow) Date: Wed, 19 Jun 2019 16:41:18 +0000 (UTC) Subject: svn commit: r349198 - releng/12.0/sys/net Message-ID: <201906191641.x5JGfIsY027804@repo.freebsd.org> Author: gordon Date: Wed Jun 19 16:41:18 2019 New Revision: 349198 URL: https://svnweb.freebsd.org/changeset/base/349198 Log: Fix incorrect locking in networking stack. Approved by: so Security: FreeBSD-EN-19:11.net Modified: releng/12.0/sys/net/if.c releng/12.0/sys/net/if_var.h Modified: releng/12.0/sys/net/if.c ============================================================================== --- releng/12.0/sys/net/if.c Wed Jun 19 16:25:39 2019 (r349197) +++ releng/12.0/sys/net/if.c Wed Jun 19 16:41:18 2019 (r349198) @@ -62,6 +62,8 @@ #include #include #include +#include +#include #include #include @@ -1755,6 +1757,30 @@ if_data_copy(struct ifnet *ifp, struct if_data *ifd) ifd->ifi_noproto = ifp->if_get_counter(ifp, IFCOUNTER_NOPROTO); } +struct ifnet_read_lock { + struct mtx mtx; /* lock protecting tracker below */ + struct epoch_tracker et; +}; + +DPCPU_DEFINE_STATIC(struct ifnet_read_lock, ifnet_addr_read_lock); +DPCPU_DEFINE_STATIC(struct ifnet_read_lock, ifnet_maddr_read_lock); + +static void +ifnet_read_lock_init(void __unused *arg) +{ + struct ifnet_read_lock *pifrl; + int cpu; + + CPU_FOREACH(cpu) { + pifrl = DPCPU_ID_PTR(cpu, ifnet_addr_read_lock); + mtx_init(&pifrl->mtx, "ifnet_addr_read_lock", NULL, MTX_DEF); + + pifrl = DPCPU_ID_PTR(cpu, ifnet_maddr_read_lock); + mtx_init(&pifrl->mtx, "ifnet_maddr_read_lock", NULL, MTX_DEF); + } +} +SYSINIT(ifnet_read_lock_init, SI_SUB_CPU + 1, SI_ORDER_FIRST, &ifnet_read_lock_init, NULL); + /* * Wrapper functions for struct ifnet address list locking macros. These are * used by kernel modules to avoid encoding programming interface or binary @@ -1764,35 +1790,47 @@ if_data_copy(struct ifnet *ifp, struct if_data *ifd) void if_addr_rlock(struct ifnet *ifp) { - MPASS(*(uint64_t *)&ifp->if_addr_et == 0); - epoch_enter_preempt(net_epoch_preempt, &ifp->if_addr_et); + struct ifnet_read_lock *pifrl; + + sched_pin(); + pifrl = DPCPU_PTR(ifnet_addr_read_lock); + mtx_lock(&pifrl->mtx); + epoch_enter_preempt(net_epoch_preempt, &pifrl->et); } void if_addr_runlock(struct ifnet *ifp) { - epoch_exit_preempt(net_epoch_preempt, &ifp->if_addr_et); -#ifdef INVARIANTS - bzero(&ifp->if_addr_et, sizeof(struct epoch_tracker)); -#endif + struct ifnet_read_lock *pifrl; + + pifrl = DPCPU_PTR(ifnet_addr_read_lock); + + epoch_exit_preempt(net_epoch_preempt, &pifrl->et); + mtx_unlock(&pifrl->mtx); + sched_unpin(); } void if_maddr_rlock(if_t ifp) { + struct ifnet_read_lock *pifrl; - MPASS(*(uint64_t *)&ifp->if_maddr_et == 0); - epoch_enter_preempt(net_epoch_preempt, &ifp->if_maddr_et); + sched_pin(); + pifrl = DPCPU_PTR(ifnet_maddr_read_lock); + mtx_lock(&pifrl->mtx); + epoch_enter_preempt(net_epoch_preempt, &pifrl->et); } void if_maddr_runlock(if_t ifp) { + struct ifnet_read_lock *pifrl; - epoch_exit_preempt(net_epoch_preempt, &ifp->if_maddr_et); -#ifdef INVARIANTS - bzero(&ifp->if_maddr_et, sizeof(struct epoch_tracker)); -#endif + pifrl = DPCPU_PTR(ifnet_maddr_read_lock); + + epoch_exit_preempt(net_epoch_preempt, &pifrl->et); + mtx_unlock(&pifrl->mtx); + sched_unpin(); } /* Modified: releng/12.0/sys/net/if_var.h ============================================================================== --- releng/12.0/sys/net/if_var.h Wed Jun 19 16:25:39 2019 (r349197) +++ releng/12.0/sys/net/if_var.h Wed Jun 19 16:41:18 2019 (r349198) @@ -381,8 +381,7 @@ struct ifnet { */ struct netdump_methods *if_netdump_methods; struct epoch_context if_epoch_ctx; - struct epoch_tracker if_addr_et; - struct epoch_tracker if_maddr_et; + void *if_unused[4]; /* * Spare fields to be added before branching a stable branch, so From gordon at FreeBSD.org Wed Jun 19 16:43:07 2019 From: gordon at FreeBSD.org (Gordon Tetlow) Date: Wed, 19 Jun 2019 16:43:06 +0000 (UTC) Subject: svn commit: r349199 - releng/12.0/sys/netinet/tcp_stacks Message-ID: <201906191643.x5JGh6oW027935@repo.freebsd.org> Author: gordon Date: Wed Jun 19 16:43:05 2019 New Revision: 349199 URL: https://svnweb.freebsd.org/changeset/base/349199 Log: Add ability to limit split map entries to prevent resource exhaustion in non-default RACK TCP stack. Approved by: so Security: FreeBSD-SA-19:08.rack Security: CVE-2019-5599 Modified: releng/12.0/sys/netinet/tcp_stacks/rack.c releng/12.0/sys/netinet/tcp_stacks/tcp_rack.h Modified: releng/12.0/sys/netinet/tcp_stacks/rack.c ============================================================================== --- releng/12.0/sys/netinet/tcp_stacks/rack.c Wed Jun 19 16:41:18 2019 (r349198) +++ releng/12.0/sys/netinet/tcp_stacks/rack.c Wed Jun 19 16:43:05 2019 (r349199) @@ -1,5 +1,5 @@ /*- - * Copyright (c) 2016-2018 + * Copyright (c) 2016-2019 * Netflix Inc. All rights reserved. * * Redistribution and use in source and binary forms, with or without @@ -203,6 +203,7 @@ static int32_t rack_always_send_oldest = 0; static int32_t rack_sack_block_limit = 128; static int32_t rack_use_sack_filter = 1; static int32_t rack_tlp_threshold_use = TLP_USE_TWO_ONE; +static uint32_t rack_map_split_limit = 0; /* unlimited by default */ /* Rack specific counters */ counter_u64_t rack_badfr; @@ -228,6 +229,8 @@ counter_u64_t rack_to_arm_tlp; counter_u64_t rack_to_alloc; counter_u64_t rack_to_alloc_hard; counter_u64_t rack_to_alloc_emerg; +counter_u64_t rack_alloc_limited_conns; +counter_u64_t rack_split_limited; counter_u64_t rack_sack_proc_all; counter_u64_t rack_sack_proc_short; @@ -261,6 +264,8 @@ static void rack_ack_received(struct tcpcb *tp, struct tcp_rack *rack, struct tcphdr *th, uint16_t nsegs, uint16_t type, int32_t recovery); static struct rack_sendmap *rack_alloc(struct tcp_rack *rack); +static struct rack_sendmap *rack_alloc_limit(struct tcp_rack *rack, + uint8_t limit_type); static struct rack_sendmap * rack_check_recovery_mode(struct tcpcb *tp, uint32_t tsused); @@ -445,6 +450,8 @@ sysctl_rack_clear(SYSCTL_HANDLER_ARGS) counter_u64_zero(rack_sack_proc_short); counter_u64_zero(rack_sack_proc_restart); counter_u64_zero(rack_to_alloc); + counter_u64_zero(rack_alloc_limited_conns); + counter_u64_zero(rack_split_limited); counter_u64_zero(rack_find_high); counter_u64_zero(rack_runt_sacks); counter_u64_zero(rack_used_tlpmethod); @@ -622,6 +629,11 @@ rack_init_sysctls() OID_AUTO, "pktdelay", CTLFLAG_RW, &rack_pkt_delay, 1, "Extra RACK time (in ms) besides reordering thresh"); + SYSCTL_ADD_U32(&rack_sysctl_ctx, + SYSCTL_CHILDREN(rack_sysctl_root), + OID_AUTO, "split_limit", CTLFLAG_RW, + &rack_map_split_limit, 0, + "Is there a limit on the number of map split entries (0=unlimited)"); SYSCTL_ADD_S32(&rack_sysctl_ctx, SYSCTL_CHILDREN(rack_sysctl_root), OID_AUTO, "inc_var", CTLFLAG_RW, @@ -757,7 +769,19 @@ rack_init_sysctls() SYSCTL_CHILDREN(rack_sysctl_root), OID_AUTO, "allocemerg", CTLFLAG_RD, &rack_to_alloc_emerg, - "Total alocations done from emergency cache"); + "Total allocations done from emergency cache"); + rack_alloc_limited_conns = counter_u64_alloc(M_WAITOK); + SYSCTL_ADD_COUNTER_U64(&rack_sysctl_ctx, + SYSCTL_CHILDREN(rack_sysctl_root), + OID_AUTO, "alloc_limited_conns", CTLFLAG_RD, + &rack_alloc_limited_conns, + "Connections with allocations dropped due to limit"); + rack_split_limited = counter_u64_alloc(M_WAITOK); + SYSCTL_ADD_COUNTER_U64(&rack_sysctl_ctx, + SYSCTL_CHILDREN(rack_sysctl_root), + OID_AUTO, "split_limited", CTLFLAG_RD, + &rack_split_limited, + "Split allocations dropped due to limit"); rack_sack_proc_all = counter_u64_alloc(M_WAITOK); SYSCTL_ADD_COUNTER_U64(&rack_sysctl_ctx, SYSCTL_CHILDREN(rack_sysctl_root), @@ -1121,10 +1145,11 @@ rack_alloc(struct tcp_rack *rack) { struct rack_sendmap *rsm; - counter_u64_add(rack_to_alloc, 1); - rack->r_ctl.rc_num_maps_alloced++; rsm = uma_zalloc(rack_zone, M_NOWAIT); if (rsm) { +alloc_done: + counter_u64_add(rack_to_alloc, 1); + rack->r_ctl.rc_num_maps_alloced++; return (rsm); } if (rack->rc_free_cnt) { @@ -1132,14 +1157,46 @@ rack_alloc(struct tcp_rack *rack) rsm = TAILQ_FIRST(&rack->r_ctl.rc_free); TAILQ_REMOVE(&rack->r_ctl.rc_free, rsm, r_next); rack->rc_free_cnt--; - return (rsm); + goto alloc_done; } return (NULL); } +/* wrapper to allocate a sendmap entry, subject to a specific limit */ +static struct rack_sendmap * +rack_alloc_limit(struct tcp_rack *rack, uint8_t limit_type) +{ + struct rack_sendmap *rsm; + + if (limit_type) { + /* currently there is only one limit type */ + if (rack_map_split_limit > 0 && + rack->r_ctl.rc_num_split_allocs >= rack_map_split_limit) { + counter_u64_add(rack_split_limited, 1); + if (!rack->alloc_limit_reported) { + rack->alloc_limit_reported = 1; + counter_u64_add(rack_alloc_limited_conns, 1); + } + return (NULL); + } + } + + /* allocate and mark in the limit type, if set */ + rsm = rack_alloc(rack); + if (rsm != NULL && limit_type) { + rsm->r_limit_type = limit_type; + rack->r_ctl.rc_num_split_allocs++; + } + return (rsm); +} + static void rack_free(struct tcp_rack *rack, struct rack_sendmap *rsm) { + if (rsm->r_limit_type) { + /* currently there is only one limit type */ + rack->r_ctl.rc_num_split_allocs--; + } rack->r_ctl.rc_num_maps_alloced--; if (rack->r_ctl.rc_tlpsend == rsm) rack->r_ctl.rc_tlpsend = NULL; @@ -3955,7 +4012,7 @@ do_rest_ofb: /* * Need to split this in two pieces the before and after. */ - nrsm = rack_alloc(rack); + nrsm = rack_alloc_limit(rack, RACK_LIMIT_TYPE_SPLIT); if (nrsm == NULL) { /* * failed XXXrrs what can we do but loose the sack @@ -4016,7 +4073,7 @@ do_rest_ofb: goto do_rest_ofb; } /* Ok we need to split off this one at the tail */ - nrsm = rack_alloc(rack); + nrsm = rack_alloc_limit(rack, RACK_LIMIT_TYPE_SPLIT); if (nrsm == NULL) { /* failed rrs what can we do but loose the sack info? */ goto out; Modified: releng/12.0/sys/netinet/tcp_stacks/tcp_rack.h ============================================================================== --- releng/12.0/sys/netinet/tcp_stacks/tcp_rack.h Wed Jun 19 16:41:18 2019 (r349198) +++ releng/12.0/sys/netinet/tcp_stacks/tcp_rack.h Wed Jun 19 16:43:05 2019 (r349199) @@ -55,8 +55,10 @@ struct rack_sendmap { uint8_t r_sndcnt; /* Retran count, not limited by * RACK_NUM_OF_RETRANS */ uint8_t r_in_tmap; /* Flag to see if its in the r_tnext array */ - uint8_t r_resv[3]; + uint8_t r_limit_type; /* is this entry counted against a limit? */ + uint8_t r_resv[2]; }; +#define RACK_LIMIT_TYPE_SPLIT 1 TAILQ_HEAD(rack_head, rack_sendmap); @@ -242,7 +244,7 @@ struct rack_control { uint32_t rc_num_maps_alloced; /* Number of map blocks (sacks) we * have allocated */ uint32_t rc_rcvtime; /* When we last received data */ - uint32_t rc_notused; + uint32_t rc_num_split_allocs; /* num split map entries allocated */ uint32_t rc_last_output_to; uint32_t rc_went_idle_time; @@ -311,7 +313,8 @@ struct tcp_rack { uint8_t rack_tlp_threshold_use; uint8_t rc_allow_data_af_clo: 1, delayed_ack : 1, - rc_avail : 6; + alloc_limit_reported : 1, + rc_avail : 5; uint8_t r_resv[2]; /* Fill to cache line boundary */ /* Cache line 2 0x40 */ struct rack_control r_ctl; From gordon at FreeBSD.org Wed Jun 19 16:44:08 2019 From: gordon at FreeBSD.org (Gordon Tetlow) Date: Wed, 19 Jun 2019 16:44:07 +0000 (UTC) Subject: svn commit: r349200 - in releng/12.0: . sys/conf Message-ID: <201906191644.x5JGi7gl028043@repo.freebsd.org> Author: gordon Date: Wed Jun 19 16:44:07 2019 New Revision: 349200 URL: https://svnweb.freebsd.org/changeset/base/349200 Log: Add UPDATING entries for today's release. Bump patch version. Also fix the previous UPDATING entry. MDS was an SA, not an EN. Approved by: so Modified: releng/12.0/UPDATING releng/12.0/sys/conf/newvers.sh Modified: releng/12.0/UPDATING ============================================================================== --- releng/12.0/UPDATING Wed Jun 19 16:43:05 2019 (r349199) +++ releng/12.0/UPDATING Wed Jun 19 16:44:07 2019 (r349200) @@ -16,7 +16,15 @@ from older versions of FreeBSD, try WITHOUT_CLANG and the tip of head, and then rebuild without this option. The bootstrap process from older version of current across the gcc/clang cutover is a bit fragile. -20190515 p5 FreeBSD-EN-19:07.mds [revised] +20190619 p6 FreeBSD-EN-19:11.net + FreeBSD-SA-19:08.rack + + Fix incorrect locking in networking stack [EN-19:11.net] + + Add ability to limit split map entries to prevent resource exhaustion + in non-default RACK TCP stack [SA-19:08.rack] + +20190515 p5 FreeBSD-SA-19:07.mds [revised] Fixed error in patch causing panic on i386 architecture. [SA-19:07.mds] Modified: releng/12.0/sys/conf/newvers.sh ============================================================================== --- releng/12.0/sys/conf/newvers.sh Wed Jun 19 16:43:05 2019 (r349199) +++ releng/12.0/sys/conf/newvers.sh Wed Jun 19 16:44:07 2019 (r349200) @@ -46,7 +46,7 @@ TYPE="FreeBSD" REVISION="12.0" -BRANCH="RELEASE-p5" +BRANCH="RELEASE-p6" if [ -n "${BRANCH_OVERRIDE}" ]; then BRANCH=${BRANCH_OVERRIDE} fi From gjb at FreeBSD.org Fri Jun 21 00:01:14 2019 From: gjb at FreeBSD.org (Glen Barber) Date: Fri, 21 Jun 2019 00:01:13 +0000 (UTC) Subject: svn commit: r349252 - releng/11.3/sys/conf Message-ID: <201906210001.x5L01DPd030118@repo.freebsd.org> Author: gjb Date: Fri Jun 21 00:01:12 2019 New Revision: 349252 URL: https://svnweb.freebsd.org/changeset/base/349252 Log: Update releng/11.3 to RC2 as part of the 11.3-RELEASE cycle. Approved by: re (implicit) Sponsored by: The FreeBSD Foundation Modified: releng/11.3/sys/conf/newvers.sh Modified: releng/11.3/sys/conf/newvers.sh ============================================================================== --- releng/11.3/sys/conf/newvers.sh Thu Jun 20 23:52:33 2019 (r349251) +++ releng/11.3/sys/conf/newvers.sh Fri Jun 21 00:01:12 2019 (r349252) @@ -44,7 +44,7 @@ TYPE="FreeBSD" REVISION="11.3" -BRANCH="RC1" +BRANCH="RC2" if [ -n "${BRANCH_OVERRIDE}" ]; then BRANCH=${BRANCH_OVERRIDE} fi From gjb at FreeBSD.org Mon Jun 24 19:52:10 2019 From: gjb at FreeBSD.org (Glen Barber) Date: Mon, 24 Jun 2019 19:52:09 +0000 (UTC) Subject: svn commit: r349337 - releng/11.3/release/doc/en_US.ISO8859-1/relnotes Message-ID: <201906241952.x5OJq9Nt037375@repo.freebsd.org> Author: gjb Date: Mon Jun 24 19:52:08 2019 New Revision: 349337 URL: https://svnweb.freebsd.org/changeset/base/349337 Log: Release notes documentation: - r347037, virtual machine image reduction, and note how to resize the images. - r346479, init_exec kenv(1) variable addition. - r346518, spi(8) addition. - r348482, deprecated IPSec algorithm warnings. - r347962, driver deprecations. Approved by: re (implicit) Sponsored by: Rubicon Communications, LLC (Netgate) Modified: releng/11.3/release/doc/en_US.ISO8859-1/relnotes/article.xml Modified: releng/11.3/release/doc/en_US.ISO8859-1/relnotes/article.xml ============================================================================== --- releng/11.3/release/doc/en_US.ISO8859-1/relnotes/article.xml Mon Jun 24 19:42:32 2019 (r349336) +++ releng/11.3/release/doc/en_US.ISO8859-1/relnotes/article.xml Mon Jun 24 19:52:08 2019 (r349337) @@ -176,6 +176,12 @@ The default &man.devd.conf.5; has been updated to prevent duplicated &man.hostapd.8; and &man.wpa.supplicant.8; startup via &man.devd.8;. + + A new variable, + init_exec, has been added to &man.kenv.1;, + allowing &man.init.8; to run an executable file after opening + the console, replacing &man.init.8; as PID + 1. @@ -253,6 +259,10 @@ The &man.patch.1; utility has been updated to exit successfully if the input patch file is zero-length. + + The &man.spi.8; utility has been added, + which is used to communicate with devices on an + SPI bus through the userland. @@ -456,6 +466,18 @@ The &man.random.4; driver has been updated to improve performance during expensive reseeding. + + The ae(4), + bm(4), cs(4), + de(4), dme(4), + ed(4), ep(4), + ex(4), fe(4), + pcn(4), sf(4), + sn(4), tl(4), + tx(4), txp(4), + vx(4), wb(4), and + xe(4) drivers have been marked as + deprecated, and are not present in &os; 13.0. @@ -616,6 +638,10 @@ sponsor="&yandex;">Support for NAT64 CLAT has been added, as defined in RFC6877. + + Warnings have been added for + IPSec algorithms deprecated in + RFC 8221. @@ -673,7 +699,14 @@ Integration Changes -   + The + default size of virtual machine disk images has been reduced + from 30GB to 3GB. The raw disk images may + be resized with &man.truncate.1;, after which the + growfs &man.rc.8; script will resize the + filesystem within the virtual machine. Other disk image + formats should be resized with the appropriate tool provided + by the hypervisor being used. From gjb at FreeBSD.org Tue Jun 25 19:35:57 2019 From: gjb at FreeBSD.org (Glen Barber) Date: Tue, 25 Jun 2019 19:35:56 +0000 (UTC) Subject: svn commit: r349386 - releng/11.3/release/doc/en_US.ISO8859-1/relnotes Message-ID: <201906251935.x5PJZuB6087735@repo.freebsd.org> Author: gjb Date: Tue Jun 25 19:35:56 2019 New Revision: 349386 URL: https://svnweb.freebsd.org/changeset/base/349386 Log: Release notes documentation: - r338938, oce(4) version 11.0.50.0. - r341987, mlx4en(4) and mlx5en(4) version 3.5.0. - r349181, ixl(4) and ixlv(4) version 1.11.9 and 1.5.8. Approved by: re (implicit) Sponsored by: Rubicon Communications, LLC (Netgate) Modified: releng/11.3/release/doc/en_US.ISO8859-1/relnotes/article.xml Modified: releng/11.3/release/doc/en_US.ISO8859-1/relnotes/article.xml ============================================================================== --- releng/11.3/release/doc/en_US.ISO8859-1/relnotes/article.xml Tue Jun 25 19:06:43 2019 (r349385) +++ releng/11.3/release/doc/en_US.ISO8859-1/relnotes/article.xml Tue Jun 25 19:35:56 2019 (r349386) @@ -489,10 +489,17 @@ Network Drivers + The &man.oce.4; driver has been updated + to version 11.0.50.0. + The TP-Link® TL-WN321G™ network adapter now uses the &man.run.4; driver instead of the &man.rum.4; driver. + The &man.mlx4en.4; and &man.mlx5en.4; + drivers have been updated to version 3.5.0. + The &man.lagg.4; driver has been updated to allow changing the MTU without requiring destroying and @@ -513,6 +520,14 @@ The &man.cxgbe.4; T4, T5, and T6 firmware has been updated to version 1.23.0.0. + + The &man.ixl.4; driver has been updated + version 1.11.9. + + The &man.ixlv.4; driver has been updated + version 1.5.8. From gjb at FreeBSD.org Tue Jun 25 19:35:58 2019 From: gjb at FreeBSD.org (Glen Barber) Date: Tue, 25 Jun 2019 19:35:58 +0000 (UTC) Subject: svn commit: r349387 - releng/11.3/release/doc/en_US.ISO8859-1/relnotes Message-ID: <201906251935.x5PJZwY5087778@repo.freebsd.org> Author: gjb Date: Tue Jun 25 19:35:57 2019 New Revision: 349387 URL: https://svnweb.freebsd.org/changeset/base/349387 Log: Release notes documentation: - Remove empty sections. Approved by: re (implicit) Sponsored by: Rubicon Communications, LLC (Netgate) Modified: releng/11.3/release/doc/en_US.ISO8859-1/relnotes/article.xml Modified: releng/11.3/release/doc/en_US.ISO8859-1/relnotes/article.xml ============================================================================== --- releng/11.3/release/doc/en_US.ISO8859-1/relnotes/article.xml Tue Jun 25 19:35:56 2019 (r349386) +++ releng/11.3/release/doc/en_US.ISO8859-1/relnotes/article.xml Tue Jun 25 19:35:57 2019 (r349387) @@ -318,12 +318,6 @@ been updated to the latest upstream version. - - Installation and Configuration Tools - -   - - <filename class="directory">/etc/rc.d</filename> Scripts @@ -379,18 +373,6 @@ The &man.pthread.3; library has been updated to improve POSIX compliance. - - - ABI Compatibility - -   - - - - Userland Debugging - -   - @@ -423,30 +405,6 @@ future releases will now be printed on all &os; versions. - - - Kernel Bug Fixes - -   - - - - Kernel Configuration - -   - - - - Kernel Modules - -   - - - - System Tuning and Controls - -   - @@ -480,12 +438,6 @@ deprecated, and are not present in &os; 13.0. - - Storage Drivers - -   - - Network Drivers @@ -555,12 +507,6 @@ NumLock, ScrollLock, and numerical keypad keys has been added to &man.bhyve.8;. - - - ARM Support - -   - @@ -576,12 +522,6 @@ weaker algorithms when creating &man.geli.8; providers. - - Networked Storage - -   - - ZFS @@ -594,12 +534,6 @@ ZFS filesystem has been updated to implement parallel mounting. - - - <literal>geom(4)</literal> - -   - @@ -627,12 +561,6 @@ console type and device if not defined in &man.loader.conf.5;. - - - Boot Menu Changes - -   - @@ -658,12 +586,6 @@ IPSec algorithms deprecated in RFC 8221. - - - Network Protocols - -   - @@ -673,33 +595,8 @@ Collection, package infrastructure, and package maintenance and installation tools. - - Infrastructure Changes - -   - - Packaging Changes - -   - - - - - Documentation - - This section covers changes to the &os; Documentation - Project sources and toolchain. - - - Documentation Source Changes - -   - - - - Documentation Toolchain Changes   From gjb at FreeBSD.org Tue Jun 25 19:36:00 2019 From: gjb at FreeBSD.org (Glen Barber) Date: Tue, 25 Jun 2019 19:35:59 +0000 (UTC) Subject: svn commit: r349388 - releng/11.3/release/doc/en_US.ISO8859-1/relnotes Message-ID: <201906251935.x5PJZx75087821@repo.freebsd.org> Author: gjb Date: Tue Jun 25 19:35:58 2019 New Revision: 349388 URL: https://svnweb.freebsd.org/changeset/base/349388 Log: Release notes documentation: - Add versions of ports-mgmt/pkg, x11/gnome3, and x11/kde5. Approved by: re (implicit) Sponsored by: Rubicon Communications, LLC (Netgate) Modified: releng/11.3/release/doc/en_US.ISO8859-1/relnotes/article.xml Modified: releng/11.3/release/doc/en_US.ISO8859-1/relnotes/article.xml ============================================================================== --- releng/11.3/release/doc/en_US.ISO8859-1/relnotes/article.xml Tue Jun 25 19:35:57 2019 (r349387) +++ releng/11.3/release/doc/en_US.ISO8859-1/relnotes/article.xml Tue Jun 25 19:35:58 2019 (r349388) @@ -598,7 +598,14 @@ Packaging Changes -   + The &man.pkg.8; utility has been updated to version + 1.10.5. + + The KDE desktop environment has + been updated to version 5.15.3. + + The GNOME desktop environment + has been updated to version 3.28. From gjb at FreeBSD.org Tue Jun 25 19:36:06 2019 From: gjb at FreeBSD.org (Glen Barber) Date: Tue, 25 Jun 2019 19:36:01 +0000 (UTC) Subject: svn commit: r349390 - releng/11.3/release/doc/en_US.ISO8859-1 Message-ID: <201906251936.x5PJa1CV087914@repo.freebsd.org> Author: gjb Date: Tue Jun 25 19:36:01 2019 New Revision: 349390 URL: https://svnweb.freebsd.org/changeset/base/349390 Log: Connect the installation page to the build. Approved by: re (implicit) Sponsored by: Rubicon Communications, LLC (Netgate) Modified: releng/11.3/release/doc/en_US.ISO8859-1/Makefile Modified: releng/11.3/release/doc/en_US.ISO8859-1/Makefile ============================================================================== --- releng/11.3/release/doc/en_US.ISO8859-1/Makefile Tue Jun 25 19:36:00 2019 (r349389) +++ releng/11.3/release/doc/en_US.ISO8859-1/Makefile Tue Jun 25 19:36:01 2019 (r349390) @@ -4,6 +4,7 @@ RELN_ROOT?= ${.CURDIR}/.. SUBDIR = relnotes SUBDIR+= hardware +SUBDIR+= installation SUBDIR+= readme SUBDIR+= errata From gjb at FreeBSD.org Tue Jun 25 19:36:06 2019 From: gjb at FreeBSD.org (Glen Barber) Date: Tue, 25 Jun 2019 19:36:00 +0000 (UTC) Subject: svn commit: r349389 - releng/11.3/release/doc/en_US.ISO8859-1/installation Message-ID: <201906251936.x5PJa0pW087868@repo.freebsd.org> Author: gjb Date: Tue Jun 25 19:36:00 2019 New Revision: 349389 URL: https://svnweb.freebsd.org/changeset/base/349389 Log: Release notes documentation: - Update version numbers in the installation page. Approved by: re (implicit) Sponsored by: Rubicon Communications, LLC (Netgate) Modified: releng/11.3/release/doc/en_US.ISO8859-1/installation/article.xml Modified: releng/11.3/release/doc/en_US.ISO8859-1/installation/article.xml ============================================================================== --- releng/11.3/release/doc/en_US.ISO8859-1/installation/article.xml Tue Jun 25 19:35:58 2019 (r349388) +++ releng/11.3/release/doc/en_US.ISO8859-1/installation/article.xml Tue Jun 25 19:36:00 2019 (r349389) @@ -4,7 +4,7 @@ %release; - + ]>
The &man.freebsd-update.8; utility supports binary upgrades of &arch.i386; and &arch.amd64; systems running earlier FreeBSD releases. Systems running - 10.3-RELEASE, - 11.0-RELEASE can upgrade as follows: + 11.2-RELEASE can upgrade as follows: &prompt.root; freebsd-update fetch &prompt.root; freebsd-update install From gjb at FreeBSD.org Wed Jun 26 15:16:24 2019 From: gjb at FreeBSD.org (Glen Barber) Date: Wed, 26 Jun 2019 15:16:23 +0000 (UTC) Subject: svn commit: r349413 - releng/11.3/release/doc/share/xml Message-ID: <201906261516.x5QFGNJn009312@repo.freebsd.org> Author: gjb Date: Wed Jun 26 15:16:23 2019 New Revision: 349413 URL: https://svnweb.freebsd.org/changeset/base/349413 Log: Bump the release.manpath.freebsd macro version, although I do not see any place this is actually used. Approved by: re (implicit) Sponsored by: Rubicon Communications, LLC (Netgate) Modified: releng/11.3/release/doc/share/xml/release.ent Modified: releng/11.3/release/doc/share/xml/release.ent ============================================================================== --- releng/11.3/release/doc/share/xml/release.ent Wed Jun 26 15:15:24 2019 (r349412) +++ releng/11.3/release/doc/share/xml/release.ent Wed Jun 26 15:16:23 2019 (r349413) @@ -58,7 +58,7 @@ - + From ae at FreeBSD.org Wed Jun 26 17:21:32 2019 From: ae at FreeBSD.org (Andrey V. Elsukov) Date: Wed, 26 Jun 2019 17:21:31 +0000 (UTC) Subject: svn commit: r349429 - releng/11.3/sys/netpfil/ipfw/nat64 Message-ID: <201906261721.x5QHLVBw073694@repo.freebsd.org> Author: ae Date: Wed Jun 26 17:21:30 2019 New Revision: 349429 URL: https://svnweb.freebsd.org/changeset/base/349429 Log: Merge from stable/11: Fix the uninitialized use of source IPv6 address in NAT64LSN. This code is already refactored in head/, but due to the missing epoch(9) support it is impossible to merge. So, it is direct commit to stable/11. Reported by: Patrick M. Hausen Tested by: Patrick M. Hausen Approved by: re (kib, gjb) Modified: releng/11.3/sys/netpfil/ipfw/nat64/nat64lsn.c Directory Properties: releng/11.3/ (props changed) Modified: releng/11.3/sys/netpfil/ipfw/nat64/nat64lsn.c ============================================================================== --- releng/11.3/sys/netpfil/ipfw/nat64/nat64lsn.c Wed Jun 26 17:17:33 2019 (r349428) +++ releng/11.3/sys/netpfil/ipfw/nat64/nat64lsn.c Wed Jun 26 17:21:30 2019 (r349429) @@ -408,6 +408,7 @@ nat64lsn_translate4(struct nat64lsn_cfg *cfg, const st } else logdata = NULL; + src6 = cfg->base.plat_prefix; nat64_embed_ip4(&src6, cfg->base.plat_plen, htonl(f_id->src_ip)); ret = nat64_do_handle_ip4(*pm, &src6, &nh->addr, lport, &cfg->base, logdata); From mav at FreeBSD.org Thu Jun 27 14:27:00 2019 From: mav at FreeBSD.org (Alexander Motin) Date: Thu, 27 Jun 2019 14:26:57 +0000 (UTC) Subject: svn commit: r349458 - releng/11.3/usr.sbin/mountd Message-ID: <201906271426.x5REQvZA049630@repo.freebsd.org> Author: mav Date: Thu Jun 27 14:26:57 2019 New Revision: 349458 URL: https://svnweb.freebsd.org/changeset/base/349458 Log: MFC r349376: Fix strsep_quote() on strings without quotes. For strings without quotes and escapes dstptr and srcptr are equal, so zeroing *dstptr before checking *srcptr is not a good idea. In practice it means that in -maproot=65534:65533 everything after the colon is lost. The problem was there since r293305, but before r346976 it was covered by improper strsep_quote() usage. PR: 238725 Approved by: re (gjb) Modified: releng/11.3/usr.sbin/mountd/mountd.c Directory Properties: releng/11.3/ (props changed) Modified: releng/11.3/usr.sbin/mountd/mountd.c ============================================================================== --- releng/11.3/usr.sbin/mountd/mountd.c Thu Jun 27 14:12:20 2019 (r349457) +++ releng/11.3/usr.sbin/mountd/mountd.c Thu Jun 27 14:26:57 2019 (r349458) @@ -343,8 +343,8 @@ strsep_quote(char **stringp, const char *delim) *dstptr++ = *srcptr++; } - *dstptr = 0; /* Terminate the string */ *stringp = (*srcptr == '\0') ? NULL : srcptr + 1; + *dstptr = 0; /* Terminate the string */ return (retval); } From gjb at FreeBSD.org Fri Jun 28 00:00:03 2019 From: gjb at FreeBSD.org (Glen Barber) Date: Fri, 28 Jun 2019 00:00:02 +0000 (UTC) Subject: svn commit: r349480 - releng/11.3/sys/conf Message-ID: <201906280000.x5S002og051238@repo.freebsd.org> Author: gjb Date: Fri Jun 28 00:00:02 2019 New Revision: 349480 URL: https://svnweb.freebsd.org/changeset/base/349480 Log: Update releng/11.3 to RC3 as part of the 11.3-RELEASE cycle. Approved by: re (implicit) Sponsored by: Rubicon Communications, LLC (Netgate) Modified: releng/11.3/sys/conf/newvers.sh Modified: releng/11.3/sys/conf/newvers.sh ============================================================================== --- releng/11.3/sys/conf/newvers.sh Thu Jun 27 23:50:54 2019 (r349479) +++ releng/11.3/sys/conf/newvers.sh Fri Jun 28 00:00:02 2019 (r349480) @@ -44,7 +44,7 @@ TYPE="FreeBSD" REVISION="11.3" -BRANCH="RC2" +BRANCH="RC3" if [ -n "${BRANCH_OVERRIDE}" ]; then BRANCH=${BRANCH_OVERRIDE} fi