Commit Graph

439 Commits

Author SHA1 Message Date
Guinan Sun
de965d042f e1000: expose FEXTNVM registers and masks
Adding defines for FEXTNVM8 and FEXTNVM12 registers with new masks for
future use.

Signed-off-by: Nir Efrati <nir.efrati@intel.com>
Signed-off-by: Guinan Sun <guinanx.sun@intel.com>
Reviewed-by: Wei Zhao <wei.zhao1@intel.com>

Approved by:	imp
Obtained from:	DPDK (6d208ec099cd870a73c6b444b350a82c7a26c5e4)
MFC after:	1 week
2021-09-17 14:23:26 -07:00
Guinan Sun
a8bb4ab7cf e1000: add missed define for VFTA
VLAN filtering using the VFTA (VLAN Filter Table Array) and
should be initialized prior to setting rx mode.

Signed-off-by: Sasha Neftin <sasha.neftin@intel.com>
Signed-off-by: Guinan Sun <guinanx.sun@intel.com>
Reviewed-by: Wei Zhao <wei.zhao1@intel.com>

Approved by:	imp
Obtained from:	DPDK (fc9933953c90e99970aa867c38f9c6e6c5d0488d)
MFC after:	1 week
2021-09-17 14:23:19 -07:00
Guinan Sun
e8e3171d99 e1000: increase timeout for ME ULP exit
Due timing issues in WHL and since recovery by host is
not always supported, increased timeout for Manageability Engine(ME)
to finish Ultra Low Power(ULP) exit flow for Nahum before timer expiration.

Signed-off-by: Nir Efrati <nir.efrati@intel.com>
Signed-off-by: Guinan Sun <guinanx.sun@intel.com>
Reviewed-by: Wei Zhao <wei.zhao1@intel.com>

Approved by:	imp
Obtained from:	DPDK (cf1f3ca45d33e793ca581200b4000c39a798113e)
MFC after:	1 week
2021-09-17 14:23:07 -07:00
Guinan Sun
09888d4bc1 e1000: add missing register defines
Added defines for the EEC, SHADOWINF and FLFWUPDATE registers needed for
the nvmupd_validate_offset function to correctly validate the NVM update
offset.

Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
Signed-off-by: Guinan Sun <guinanx.sun@intel.com>
Reviewed-by: Wei Zhao <wei.zhao1@intel.com>

Approved by:	imp
Obtained from:	DPDK (2c7fe65ab9a31e6ebf438dad7ccc59bcde83a89f)
MFC after:	1 week
2021-09-17 14:23:00 -07:00
Guinan Sun
a6f0cc373f e1000: add PCIm function state
Added define to pcim function state.

Signed-off-by: Vitaly Lifshits <vitaly.lifshits@intel.com>
Signed-off-by: Guinan Sun <guinanx.sun@intel.com>
Reviewed-by: Wei Zhao <wei.zhao1@intel.com>

Approved by:	imp
Obtained from:	DPDK (7ee1a3b273c7f321b50e6ba17c3d9537b1b08347)
MFC after:	1 week
2021-09-17 14:21:22 -07:00
Guinan Sun
d1c37752e2 e1000: expose MAC functions
Now the functions are being accessed outside of the file, we need
to properly expose them for silicon families to use.

Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
Signed-off-by: Guinan Sun <guinanx.sun@intel.com>
Reviewed-by: Wei Zhao <wei.zhao1@intel.com>

Approved by:	imp
Obtained from:	DPDK (df01c0ee277d51f81d7d72501dba97550d3b6c4a)
MFC after:	1 week
2021-09-17 14:19:22 -07:00
Guinan Sun
1883a6ff3b e1000: update for i210 slow system clock
This code is required for the update for system clock.

Signed-off-by: Todd Fujinaka <todd.fujinaka@intel.com>
Signed-off-by: Guinan Sun <guinanx.sun@intel.com>
Reviewed-by: Wei Zhao <wei.zhao1@intel.com>

Approved by:	imp
Obtained from:	DPDK (3f0188c8f29847038bc9f306b2570ace57e3811c)
MFC after:	1 week
2021-09-17 14:18:25 -07:00
Guinan Sun
6b9d35fac1 e1000: remove duplicated phy codes
Add two files base.c and base.h to reduce the redundancy
in the silicon family code.
Remove the code duplication from e1000_82575 files.
Clean family specific functions from base.
Fix up a stray and duplicate function declaration.

Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
Signed-off-by: Sasha Neftin <sasha.neftin@intel.com>
Signed-off-by: Guinan Sun <guinanx.sun@intel.com>
Reviewed-by: Wei Zhao <wei.zhao1@intel.com>

Approved by:	imp
Obtained from:	DPDK (44dddd14059f151f39f7e075b887decfc9a10f11)
MFC after:	1 week
2021-09-17 14:17:15 -07:00
Guinan Sun
d50f362b50 e1000: modify HW level time sync mechanisms
Add additional configuration space access to allow HW
level time sync mechanism.

Signed-off-by: Evgeny Efimov <evgeny.efimov@intel.com>
Signed-off-by: Guinan Sun <guinanx.sun@intel.com>
Reviewed-by: Wei Zhao <wei.zhao1@intel.com>

Approved by:	imp
Obtained from:	DPDK (d53391f1fe2e0eba8818517fdf285f893d95dcc8)
MFC after:	1 week
2021-09-17 14:16:15 -07:00
Guinan Sun
6c59e1866c e1000: fix minor issues and improve code style
Fix typo in piece of code of NVM access for SPT.
And cleans up the remaining instances in the shared code
where it was not adhering to the Linux code standard.
Wrong description was found in the mentioned file, so fix them.
Remove shadowing variable declarations.

Relating to operands in bitwise operations having different sizes.
Unreachable code since *clock_in_i2c_* always return success.
Don't return unused s32 and don't check for constants.

Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
Signed-off-by: Sasha Neftin <sasha.neftin@intel.com>
Signed-off-by: Vitaly Lifshits <vitaly.lifshits@intel.com>
Signed-off-by: Robert Konklewski <robertx.konklewski@intel.com>
Signed-off-by: Doug Dziggel <douglas.a.dziggel@intel.com>
Signed-off-by: Todd Fujinaka <todd.fujinaka@intel.com>
Signed-off-by: Jacob Keller <jacob.e.keller@intel.com>
Signed-off-by: Guinan Sun <guinanx.sun@intel.com>
Reviewed-by: Wei Zhao <wei.zhao1@intel.com>

Approved by:	imp
Obtained from:	DPDK (b8592c89c8fbc871d22313dcac0b86c89a7d5a62)
MFC after:	1 week
2021-09-17 14:14:34 -07:00
Guinan Sun
5b426b3e8c e1000: add function parameter descriptions
Add function parameter descriptions to address gcc 7 warnings.

Signed-off-by: Todd Fujinaka <todd.fujinaka@intel.com>
Signed-off-by: Guinan Sun <guinanx.sun@intel.com>
Reviewed-by: Wei Zhao <wei.zhao1@intel.com>

Approved by:	imp
Obtained from:	DPDK (1bf35d435c9764e83be76042fa6489dd127b6c40)
MFC after:	1 week
2021-09-17 14:13:37 -07:00
Guinan Sun
da24467c7a e1000: expose xMDIO methods
Move read and write xmdio methods to e1000_phy.

Signed-off-by: Sasha Neftin <sasha.neftin@intel.com>
Signed-off-by: Guinan Sun <guinanx.sun@intel.com>
Reviewed-by: Wei Zhao <wei.zhao1@intel.com>

Approved by:	imp
Obtained from:	DPDK (b14d20f1b2bb0e6d95f19963c5d7f55374e0ead9)
MFC after:	1 week
2021-09-17 14:10:02 -07:00
Guinan Sun
82a9d0c2c1 e1000: add missing device ID
Adding Intel(R) I210 Gigabit Network Connection 15F6 device ID for SGMII
flashless automotive device.

Signed-off-by: Kamil Bednarczyk <kamil.bednarczyk@intel.com>
Signed-off-by: Guinan Sun <guinanx.sun@intel.com>
Reviewed-by: Wei Zhao <wei.zhao1@intel.com>

Approved by:	imp
Obtained from:	DPDK (586d770bfefc01d4af97c0ddf17c960c3e49ec22)
MFC after:	1 week
2021-09-17 14:09:32 -07:00
Guinan Sun
de0ae5d1cb e1000: support flashless i211 PBA
Add support to print PBA when using flashless.

Signed-off-by: Todd Fujinaka <todd.fujinaka@intel.com>
Signed-off-by: Sasha Neftin <sasha.neftin@intel.com>
Signed-off-by: Guinan Sun <guinanx.sun@intel.com>
Reviewed-by: Wei Zhao <wei.zhao1@intel.com>

Approved by:	imp
Obtained from:	DPDK (d3c41d90dfd5b39dec14c74cf53086f4e6634aed)
MFC after:	1 week
2021-09-17 14:07:27 -07:00
Kevin Bowling
702cac6c6b e1000: Update copyrights and readme
Copyrights in sync with "cid-gigabit.2020.06.05.tar.gz released by ND"
(from DPDK).

README from the latest em-7.7.8 on intel.com

Approved by:	imp
MFC after:	1 week
2021-09-17 14:06:01 -07:00
Kevin Bowling
a4378873e9 e1000: Revert Update intel shared code
This reverts commit fc7682b17f.

This will be done incrementally to help with bisecting an issue in
later I21x devices (ich8lan).

PR:		258153
Approved by:	imp
MFC after:	1 day
2021-09-17 14:03:08 -07:00
Kevin Bowling
22b20b45c9 e1000: Fix variable typo
Forgot to git add this in last commit

Reported by:	jenkins
Fixes:		2796f7cab1
MFC after:	2 week
2021-09-15 09:18:59 -07:00
Kevin Bowling
2796f7cab1 e1000: Fix up HW vlan ops
* Don't reset the entire adapter for vlan changes, fix up the problems
* Add some functions for vlan filter (vfta) manipulation
* Don't muck with the vfta if we aren't doing HW vlan filtering
* Disable interrupts when manipulating vfta on lem(4)-class NICs
* On the I350 there is a specification update (2.4.20) in which the
suggested workaround is to write to the vfta 10 times (if at first you
don't succeed, try, try again). Our shared code has the goods, use it
* Increase a VF's frame receive size in the case of vlans

From the referenced PR, this reduced vlan configuration from minutes
to seconds with hundreds or thousands of vlans and prevents wedging the
adapter with needless adapter reinitialization for each vlan ID.

PR:		230996
Reviewed by:	markj
Tested by:	Ozkan KIRIK <ozkan.kirik@gmail.com>
MFC after:	2 weeks
Differential Revision:	https://reviews.freebsd.org/D30002
2021-09-15 08:03:01 -07:00
Kevin Bowling
0e5811a2a9 intel ethernet: Use ether_gen_addr(9)
Use ether_gen_addr(9) for VF MAC generation

Reviewed by:	Intel Networking (erj), kevans
MFC after:	1 week
Differential Revision:	https://reviews.freebsd.org/D31616
2021-08-20 14:21:48 -07:00
Kevin Bowling
fc7682b17f e1000: Update intel shared code
Sync the e1000 shared code with DPDK shared code
"cid-gigabit.2020.06.05.tar.gz released by ND"

Primary focus was on client platforms (ich8lan). More work remains here
but we need an Intel contact for client networking.

Reviewed by:	grehan, Intel Networking (erj, earlier rev)
Obtained from:	DPDK <http://git.dpdk.org/dpdk/tree/drivers/net/e1000/base>
MFC after:	1 week
Sponsored by:	me
Differential Revision:	https://reviews.freebsd.org/D31547
2021-08-19 07:59:36 -07:00
Kevin Bowling
69e8e8ea3d e1000: always enable PCSD when RSS hashing
To enable RSS hashing in the NIC, the PCSD bit must be set.

By default, this is never set when RXCSUM is disabled - which
causes problems higher up in the stack.

While here improve the RXCSUM flag assignments when enabling or
disabling IFCAP_RXCSUM.

See also: https://lists.freebsd.org/pipermail/freebsd-current/2020-May/076148.html

Reviewed by:	markj, Franco Fichtner <franco@opnsense.org>,
		Stephan de Wit <stephan.dewt@yahoo.co.uk>
Obtained from:	OPNsense
MFC after:	1 week
Differential Revision:	https://reviews.freebsd.org/D31501
Co-authored-by: Stephan de Wit <stephan.dewt@yahoo.co.uk>
Co-authored-by: Franco Fichtner <franco@opnsense.org>
2021-08-16 10:24:01 -07:00
Kevin Bowling
12e8addd32 e1000: rctl/srrctl buffer size init, rfctl fix
Simplify the setup of srrctl.BSIZEPKT on igb class NICs.
Improve the setup of rctl.BSIZE on lem and em class NICs.
Don't try to touch rfctl on lem class NICs.
Manipulate rctl.BSEX correctly on lem and em class NICs.

Approved by:	markj
MFC after:	1 week
Differential Revision:	https://reviews.freebsd.org/D31457
2021-08-10 12:47:22 -07:00
Kevin Bowling
015075f383 e1000: Fix lem/em UDP rx csum offload
Rebase on igb code and unify lem/em implementations.

PR:		257642
Reported by:	Nick Reilly <nreilly@blackberry.com>
Reviewed by:	karels, emaste
Tested by:	Nick Reilly <nreilly@blackberry.com>
Approved by:	grehan
MFC after:	1 week
Differential Revision:	https://reviews.freebsd.org/D31449
2021-08-09 14:29:31 -07:00
Kevin Bowling
ff01d6343f igb: clean up igb_txrx comments
Reviewed by:	grehan
MFC after:	3 days
Differential Revision:	https://reviews.freebsd.org/D31227
2021-07-31 08:04:25 -07:00
Kevin Bowling
9fd0cda92d e1000: Add missing branch prediction
I missed this edit from the ixgbe review (D30074)

Reviewed by:	gallatin
MFC after:	2 weeks
Differential Revision:	https://reviews.freebsd.org/D30073
2021-07-20 00:21:21 -07:00
Kevin Bowling
41f0225714 e1000: Clean up igb_txrx
The intention here is to reduce differences between em, igb, igc, ixgbe.

The main functional change is logical simplification in igb_rx_checksum
and getting interface caps from scctx instead of the ifp.

Reviewed by:	gallatin, markj
MFC after:	2 weeks
Differential Revision:	https://reviews.freebsd.org/D30073
2021-07-20 00:11:30 -07:00
Kevin Bowling
eea55de7b1 e1000: Rework em_msi_link interrupt filter
* Fix 82574 Link Status Changes, carrying the OTHER mask bit around as
  needed.
* Move igb-class LSC re-arming out of FAST back into the handler.
* Clarify spurious/other interrupt re-arms in FAST.

In MSI-X mode, 82574 and igb-class devices use an interrupt filter to
handle Link Status Changes. We want to do LSC re-arms in the handler
to take advantage of autoclear (EIAC) single shot behavior.

82574 uses 'Other' in ICR and IMS for LSC interrupt types when in MSI-X
mode, so we need to set and re-arm the 'Other' bit during attach and
after ICR reads in the FAST handler if not an LSC or after handling on
LSC due to autoclearing.

This work was primarily done to address the referenced PR, but inspired
some clarification and improvement for igb-class devices once the
intentions of previous bug fix attempts became clearer.

PR:		211219
Reported by:	Alexey <aserp3@gmail.com>
Tested by:	kbowling (I210 lagg), markj (I210)
Approved by:	markj
MFC after:	1 month
Differential Revision:	https://reviews.freebsd.org/D29943
2021-04-27 15:29:39 -07:00
Kevin Bowling
ba7b31b3e9 e1000: Fix register name in reg_dump sysctl
The correct name of this register is CTRL_EXT.

Approved by:	markj
MFC after:	1 week
Differential Revision:	https://reviews.freebsd.org/D29967
2021-04-26 09:30:54 -07:00
Kevin Bowling
0f6bea61ed e1000: Improve device name strings
This is just clerical work to ease bug triage and may be used to set
expectations around the ability for anyone in the community to perform
testing and development on older parts (this driver covers over 20 years
of silicon)

Reviewed by:	erj
Approved by:	markj
Sponsored by:	Pink Floyd - Any Colour You Like (in kind)
Differential Revision:	https://reviews.freebsd.org/D29872
2021-04-25 22:08:54 -07:00
Kevin Bowling
59690eab57 e1000: Add support for [Tiger, Alder, Meteor] Lake
Add support for current and future client platform PCI IDs. These are
all I219 variants and have no known driver changes versus previous
generation client platform I219 variants.

Reviewed by:	markj
MFC after:	2 weeks
Differential Revision:	https://reviews.freebsd.org/D29801
2021-04-19 14:32:59 -07:00
Kevin Bowling
4b38eed76d e1000: Correct promisc multicast filter handling
There are a number of issues in the e1000 multicast filter handling
that have been present for a long time. Take the updated approach from
ixgbe(4) which does not have the issues.

The issues are outlined in the PR, in particular this solves crossing
over and under the hardware's filter limit, not programming the
hardware filter when we are above its limit, disabling SBP (show bad
packets) when the tunable is enabled and exiting promiscuous mode, and
an off-by-one error in the em_copy_maddr function.

PR:		140647
Reported by:	jtl
Reviewed by:	markj
MFC after:	1 month
Differential Revision:	https://reviews.freebsd.org/D29789
2021-04-19 12:49:55 -07:00
Kevin Bowling
68a46f11ea e1000: Restore VF interface random MAC
Restore 525e07418c after the iflib conversion of igb(4). This
reenables random MAC address generation when attaching to a VF with a
zeroed MAC.

PR:		253535
Reported by:	Balaev PA <mail@void.so>
Reviewed by:	markj
MFC after:	2 weeks
Differential Revision:	https://reviews.freebsd.org/D29785
2021-04-15 11:45:02 -07:00
Kevin Bowling
bb1b375fa7 e1000: fix em_mac_min and 82547 packet buffer
The boundary differentiating "lem" vs "em" class devices was wrong
after the iflib conversion of lem(4).

The Packet Buffer size for 82547 class chips was not set correctly
after the iflib conversion of lem(4).

These changes restore functionality on an 82547 for the submitter.

PR:		236119
Reported by:	Jeff Gibbons <jgibbons@protogate.com>
Reviewed by:	markj
MFC after:	1 month
Differential Revision:	https://reviews.freebsd.org/D29766
2021-04-15 10:19:30 -07:00
Kevin Bowling
548d8a131d e1000: disable hw.em.sbp debug setting
This is a debugging tunable that shouldn't have retained this setting
after the initial iflib conversion of the driver

PR:		248934
Reported by:	Franco Fichtner <franco@opnsense.org>
Reviewed by:	markj
MFC after:	1 month
Differential Revision:	https://reviews.freebsd.org/D29768
2021-04-15 09:48:41 -07:00
Mark Johnston
ffe3def903 iflib: Make if_shared_ctx_t a pointer to const
This structure is shared among multiple instances of a driver, so we
should ensure that it doesn't somehow get treated as if there's a
separate instance per interface.  This is especially important for
software-only drivers like wg.

DEVICE_REGISTER() still returns a void * and so the per-driver sctx
structures are not yet defined with the const qualifier.

Reviewed by:	gallatin, erj
MFC after:	2 weeks
Sponsored by:	The FreeBSD Foundation
Differential Revision:	https://reviews.freebsd.org/D29102
2021-03-08 12:39:06 -05:00
Sai Rajesh Tallamraju
38bfc6dee3 iflib: Free resources in a consistent order during detach
Memory and PCI resources are freed with no particular order.  This could
cause use-after-frees when detaching following a failed attach.  For
instance, iflib_tx_structures_free() frees ctx->ifc_txqs[] but
iflib_tqg_detach() attempts to access this array. Similarly, adapter
queues gets freed by IFDI_QUEUES_FREE() but IFDI_DETACH() attempts to
access adapter queues to free PCI resources.

MFC after:	2 weeks
Sponsored by:	NetApp, Inc.
Differential Revision:	https://reviews.freebsd.org/D27634
2021-02-01 11:15:54 -05:00
Marius Strobl
c262e8e87e e1000: fix build after c1655b0f 2021-01-27 15:30:35 +01:00
Marius Strobl
c1655b0f89 e1000: consistently use the hw variables
It's rather confusing when adapter->hw and hw are mixed and matched
within a particular function.
Some of this was missed in cd1cf2fc1d
and r353778 respectively.
2021-01-26 22:28:55 +01:00
Jessica Clarke
e07d687ebe Fix whitespace in r368698
MFC with:	r368698
2020-12-16 14:48:46 +00:00
Michal Meloun
63d973c3e9 Use the standard method for localizing of MSI-X table bar.
Current way, hardcoded value plus heuristic is not conform to the PCI(e)
specification and it fails on systems where MSI-X bar is not initialized by
BIOS/ACPI (many arm or arm64 systems for example).
Instead, use the standard PCI(e) capability for determining of
MSIX table bar address.

MFC after: 3 weeks
Differential Revision: https://reviews.freebsd.org/D27265
2020-12-16 14:39:24 +00:00
Mitchell Horne
a3cd24398a em: fix a null de-reference in em_free_pci_resources
A failure in iflib_device_register() can result in
em_free_pci_resources() being called after receive queues have already
been freed. In particular, a failure to allocate IRQ resources will goto
fail_queues, where IFDI_QUEUES_FREE() will be called via
iflib_tx_structures_free(), preceding the call to IFDI_DETACH().

Cope with this by checking adapter->rx_queues before dereferencing it.
A similar check is present in ixgbe(4) and ixl(4).

MFC after:	1 week
Sponsored by:	NetApp, Inc.
Sponsored by:	Klara, Inc.
Differential Revision:	https://reviews.freebsd.org/D27260
2020-12-02 17:37:32 +00:00
Eric Joyner
a3b9a7366e e1000: Properly retain promisc flag
From Franco:
The iflib rewrite forced the promisc flag but it was not reported
to the system.  Noticed on a stock VM that went into unsolicited
promisc mode when dhclient was started during bootup.

PR:		248869
Submitted by:	Franco Fichtner <franco@opnsense.org>
Reviewed by:	erj@
MFC after:	3 days
2020-09-15 21:07:30 +00:00
Eric Joyner
467515a494 igb(4): Fix define and includes with RSS option enabled
This re-adds the opt_rss.h header to the driver and includes some
RSS-specific headers when RSS is defined.

PR:		249191
Submitted by:	Milosz Kaniewski <milosz.kaniewski@gmail.com>
MFC after:	3 days
2020-09-15 21:00:25 +00:00
Vincenzo Maffione
7e6223b23f em(4): honor vlanhwtag offload
The FreeBSD em driver fails to properly reset the VME flag
in the e1000 CTRL register oneg the following ifconfig command

	ifconfig em1 -vlanhwtag

Tested on the e1000 device emulated by QEMU, and on a real
NIC (chip=0x10d38086).

PR:	236584
Submitted by:	 murat@sunnyvalley.io
Reported by:	 murat@sunnyvalley.io
MFC after:	3 weeks
Differential Revision:	https://reviews.freebsd.org/D25286
2020-08-06 21:01:26 +00:00
Eric Joyner
104d75a051 em(4): Always reinit interface when adding/removing VLAN
This partially reverts r361053 since there have been reports
by users that this breaks some functionality for em(4)
devices; it seems at first glance that some sort of interface
restart is required for those cards.

This isn't a proper fix; this unbreaks those users until a proper
fix is found for their issues.

PR:		240818
Reported by:	Marek Zarychta <zarychtam@plan-b.pwste.edu.pl>
MFC after:	3 days
2020-06-11 15:59:49 +00:00
Eric Joyner
51569bd793 em(4): Add support for Comet Lake Mobile Platform, update shared code
This change introduces Comet Lake Mobile Platform support in the e1000
driver along with shared code patches described below.

- Cast return value of e1000_ltr2ns() to higher type to avoid overflow
- Remove useless statement of assigning act_offset
- Add initialization of identification LED
- Fix flow control setup after connected standby:
  After connected standby the driver blocks resets during
  "AdapterStart" and skips flow control setup. This change adds
  condition in e1000_setup_link_ich8lan() to always setup flow control
  and to setup physical interface only when there is no need to block
  resets.

Signed-off-by: Piotr Pietruszewski <piotr.pietruszewski@intel.com>

Submitted by:	Piotr Pietruszewski <piotr.pietruszewski@intel.com>
Reviewed by:	erj@
Tested by:	Jeffrey Pieper <jeffrey.e.pieper@intel.com>
MFC after:	1 week
Relnotes:	yes
Sponsored by:	Intel Corporation
Differential Revision:	https://reviews.freebsd.org/D25035
2020-06-04 20:39:28 +00:00
Eric Joyner
cf1509179c em/ix/ixv/ixl/iavf: Implement ifdi_needs_restart iflib method
Pursuant to r360398, implement driver-specific versions of the
ifdi_needs_restart iflib device method.

Some (if not most?) Intel network cards don't need reinitializing when a
VLAN is added or removed from the device hardware, so these implement
ifdi_needs_restart in a way that tell iflib not to bring the interface
up or down when a VLAN is added or removed, regardless of whether the
VLAN_HWFILTER interface capability flag is set or not.

This could potentially solve several PRs relating to link flaps that
occur when VLANs are added/removed to devices.

Signed-off-by: Eric Joyner <erj@freebsd.org>

PR:		240818, 241785
Reviewed by:	gallatin@, olivier@
MFC after:	3 days
MFC with:	r360398
Sponsored by:	Intel Corporation
Differential Revision:	https://reviews.freebsd.org/D24659
2020-05-11 17:42:04 +00:00
Pawel Biernacki
20b91f0aa5 Mark more nodes as CTLFLAG_MPSAFE or CTLFLAG_NEEDGIANT (15 of many)
r357614 added CTLFLAG_NEEDGIANT to make it easier to find nodes that are
still not MPSAFE (or already are but aren’t properly marked).
Use it in preparation for a general review of all nodes.

This is non-functional change that adds annotations to SYSCTL_NODE and
SYSCTL_PROC nodes using one of the soon-to-be-required flags.
2020-02-24 10:51:26 +00:00
George V. Neville-Neil
927dd68e04 Add support for latest Intel I219 device, supported in Lenovo Carbon X1 v7
MFC after:	2 weeks
2020-01-20 12:53:02 +00:00
Eric Joyner
e81998f407 net: prefer ETHER_ADDR_LEN over ETH_ADDR_LEN
A couple of drivers and one place in if.c use ETH_ADDR_LEN, even though
net/ethernet.h provides an equivalent ETHER_ADDR_LEN definition.

Cleanup all of the locations which refer to ETH_ADDR_LEN to use the
standard ETHER_ADDR_LEN instead.

Signed-off-by: Jacob Keller <jacob.e.keller@intel.com>

Submitted by:	Jacob Keller <jacob.e.keller@intel.com>
Reviewed by:	erj@, jpaetzel@
Sponsored by:	Intel Corporation
Differential Revision:	https://reviews.freebsd.org/D21239
2019-11-04 22:57:36 +00:00