aboutsummaryrefslogtreecommitdiff
path: root/sys/dev/e1000
Commit message (Collapse)AuthorAgeFilesLines
...
* e1000: Fix a typos in source code commentsGordon Bergling2022-04-141-1/+1
| | | | | | - s/negotation/negotiation/ (cherry picked from commit 237a6663332bb7245b0ad168118c255c69d19d10)
* net: iflib: fix vlan processing in the driversVincenzo Maffione2022-01-272-19/+13
| | | | | | | | | | | | | | | | The logic that sets iri_vtag and M_VLANTAG does not handle the case where the 802.11q VLAN tag is 0. Fix this issue across the iflib drivers. While there, also improve and align the VLAN tag check extraction, by moving it outside the RX descriptor loop, eliminating a local variable and additional checks. PR: 260068 Reviewed by: kbowling, gallatin Reported by: erj MFC after: 1 month Differential Revision: https://reviews.freebsd.org/D33156 (cherry picked from commit f7926a6d0c1029c8da265769e7c57b4065faa2df)
* net: iflib: let the drivers use isc_capenableVincenzo Maffione2022-01-271-1/+1
| | | | | | | | | | | | | | | Since isc_capenable (private copy of ifp->if_capenable) is now synchronized to if_capenable, use it in the drivers when checking the IFCAP_* bits. This results in better cache usage and avoids indirection through the ifp pointer. PR: 260068 Reviewed by: kbowling, gallatin MFC after: 1 week Differential Revision: https://reviews.freebsd.org/D33156 (cherry picked from commit 52f45d8acee95199159b65a33c94142492c38e41)
* e1000: fix interface capabilities managementVincenzo Maffione2021-12-221-19/+23
| | | | | | | | | | | | | | | | | | | The e1000 drivers (em, lem, igb) are currently looking at the iflib copies of the capabilities bitvectors (scctx->isc_capabilities and scctx->isc_capenable) rather than the ifnet ones (ifp->if_capabilities and ifp->if_capenable). However, the latter are the ones that are actually updated by ifconfig and that should be used by the drivers during interface operation. The former are set by the driver on interface attach (for iflib internal use) and should not be used anymore by the driver. This patch fixes the e1000 driver to use the correct bitvectors. PR: 260068 Reviewed by: markj MFC after: 2 weeks Differential Revision: https://reviews.freebsd.org/D33154 (cherry picked from commit e0f4cdba533693bb6ef9d90243acdad89605b150)
* em: skip rxcsum offload processing when disabledVincenzo Maffione2021-12-181-1/+2
| | | | | | | | | | | | Similarly to the other Intel drivers, don't try to process RX checksum offloads when this feature (IFCAP_RXCSUM) is disabled. Reviewed by: gallatin, kbowling, erj MFC after: 2 weeks Differential Revision: https://reviews.freebsd.org/D33155 (cherry picked from commit d0633af7658fe02bc1af8639ef6dbb0d029c1b65)
* e1000: remove unused ifp backpointerVincenzo Maffione2021-12-181-1/+0
| | | | | | | | | | | | | The ifp (struct ifnet) backpointer in the e1000 private ifnet data is not used anymore since the iflib transition. Remove it so that developers are not tempted to use it and get a NULL pointer dereference. Reviewed by: markj, kbowling, erj MFC after: 2 weeks Differential Revision: https://reviews.freebsd.org/D33157 (cherry picked from commit d91559564dc647846479824340bdf94b7cf98c05)
* e1000: Fix a typo in a source code commentGordon Bergling2021-11-111-1/+1
| | | | | | - s/overwritting/overwriting/ (cherry picked from commit e9c7c6f5a021a02c5af2fa446d31cf3756b58d62)
* e1000: print EEPROM/NVM/OROM versionsKevin Bowling2021-10-132-30/+158
| | | | | | | | | | | This is useful for diagnosing problems. In particular, the errata sheets identify the EEPROM version for many fixes. Reviewed by: gallatin MFC after: 1 week Differential Revision: https://reviews.freebsd.org/D32333 (cherry picked from commit 293663f4da9e8b8aeb106ce3b73a8ed2aa2a8a90)
* e1000: Lock nvm print sysctlKevin Bowling2021-10-131-1/+8
| | | | | | | | | | | Otherwise results in KASSERT with debug kernels because we rely on the iflib CTX lock to implement the software serialization to the NVM model Reviewed by: gallatin MFC after: 1 week Differential Revision: https://reviews.freebsd.org/D32333 (cherry picked from commit 9b3e252e59c6e63594fb20e3f65188dab9e1eeff)
* e1000: Function prototype cleanupKevin Bowling2021-10-091-49/+49
| | | | | | | | | | | | | Drop arguments of function prototypes since the file is mixed between listing arg names and not. No functional changes Reviewed by: markj MFC after: 3 days Differential Revision: https://reviews.freebsd.org/D32329 (cherry picked from commit 28ccd780a96fe49364072955636829cff1589cfb)
* e1000: fix K1 configurationWenzhuo Lu2021-09-303-1/+52
| | | | | | | | | | | | | | | | | This patch is for the following updates to the K1 configurations: Tx idle period for entering K1 should be 128 ns. Minimum Tx idle period in K1 should be 256 ns. Signed-off-by: Wenzhuo Lu <wenzhuo.lu@intel.com> PR: 258153 Reviewed by: erj Tested by: iron.udjin@gmail.com Approved by: imp Obtained from: DPDK (6f934fa24dfd437c90ead96bc7598ee77a117ede) MFC after: 1 week (cherry picked from commit d5ad2f2a67df54ac40148cca21e726bc61a48982)
* e1000: Fix tabstop width in if_em.hKevin Bowling2021-09-281-118/+118
| | | | | | | Reviewed by: markj Differential Revision: https://reviews.freebsd.org/D32145 (cherry picked from commit 21ab8c75c940dd15343b4af28b18a66f377e670a)
* e1000: Re-arm link changesKevin Bowling2021-09-281-16/+6
| | | | | | | | | | | | | | | A change to MSI-X link handler was somehow causing issues on MSI-based em(4) NICs. Revert the change based on user reports and testing. PR: 258551 Reported by: Franco Fichtner <franco@opnsense.org>, t_uemura@macome.co.jp Reviewed by: markj, Franco Fichtner <franco@opnsense.org> Tested by: t_uemura@macome.co.jp MFC after: 1 day (cherry picked from commit 450c3f8b3d259c7eb82488319aff45f1f6554aaf)
* e1000: Rename 'struct adapter' to 'struct e1000_sc'Kevin Bowling2021-09-284-997/+987
| | | | | | | | | | | Rename the 'struct adapter' to 'struct e1000_sc' to avoid type ambiguity in things like kgdb. Reviewed by: jhb, markj MFC after: 3 days Differential Revision: https://reviews.freebsd.org/D32129 (cherry picked from commit dc9260515449cde9a4b26b5448f7386388c55bbd)
* e1000: Consistently use FALLTHROUGHKevin Bowling2021-09-286-13/+23
| | | | | | | Approved by: imp MFC after: 1 week (cherry picked from commit e05d9788b7e90ffd6405dc59656b52a63ba7ff3e)
* e1000: Use C99 bool typesKevin Bowling2021-09-2821-258/+256
| | | | | | | Approved by: imp MFC after: 1 week (cherry picked from commit 1bbdc25fc1edb43562bf2a5f30df7381078991d4)
* e1000: Fix up HW vlan opsKevin Bowling2021-09-281-40/+126
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 2796f7ca: * 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> Differential Revision: https://reviews.freebsd.org/D30002 22b20b45: e1000: Fix variable typo Forgot to git add this in last commit Reported by: jenkins Fixes: 2796f7cab107 (cherry picked from commit 2796f7cab10785ef40efbba97ef67ab319c96e9c) (cherry picked from commit 22b20b45c9118bf6ef313c074cdb107a1eaca78e)
* e1000: Catch up commit with DPDKKevin Bowling2021-09-2411-4/+322
| | | | | | | | | | | Various syncs with the e1000 shared code from DPDK: "cid-gigabit.2020.06.05.tar.gz released by ND" Approved by: imp Obtained from: DPDK MFC after: 1 week (cherry picked from commit 984d1616be883bc2c351aff9aa69b1abd7d1214c)
* e1000: prevent ULP flow if cable connectedWenzhuo Lu2021-09-241-0/+4
| | | | | | | | | | | | | | | Enabling ulp on link down when cable is connect caused an infinite loop of linkup/down indications in the NDIS driver. After discussed, correct flow is to enable ULP only when cable is disconnected. Signed-off-by: Wenzhuo Lu <wenzhuo.lu@intel.com> Approved by: imp Obtained from: DPDK (4bff263d54d299269966365f9697941eecaa241b) MFC after: 1 week (cherry picked from commit 40fa6e53f53cde84f6f5c7330f89e4ae373d7d93)
* e1000: clean LTO warningsAndrzej Ostruszka2021-09-243-3/+3
| | | | | | | | | | | | | | | | | | | During LTO build compiler reports some 'false positive' warnings about variables being possibly used uninitialized. This patch silences these warnings. Exemplary compiler warning to suppress (with LTO enabled): error: 'link' may be used uninitialized in this function [-Werror=maybe-uninitialized] if (link) { Signed-off-by: Andrzej Ostruszka <aostruszka@marvell.com> Approved by: imp Obtained from: DPDK (46136031f19107f4e9b6b3a952cb7f57877a7f0f) MFC after: 1 week (cherry picked from commit 089cdb3990f47be3cd34d1a57567a2e89c917929)
* e1000: fix multicast setting in VFYong Wang2021-09-241-1/+2
| | | | | | | | | | | | | | | | | | | | | In function e1000_update_mc_addr_list_vf(), "msgbuf[0]" is used prior to initialization at "msgbuf[0] |= E1000_VF_SET_MULTICAST_OVERFLOW". And "msgbuf[0]" is overwritten at "msgbuf[0] = E1000_VF_SET_MULTICAST". Fix it by moving the second line prior to the first one that mentioned above. Fixes: dffbaf7880a8 ("e1000: revert fix for multicast in VF") Cc: stable@dpdk.org Signed-off-by: Yong Wang <wang.yong19@zte.com.cn> Acked-by: Wenzhuo Lu <wenzhuo.lu@intel.com> Approved by: imp Obtained from: DPDK (f58ca2f9ef6) MFC after: 1 week (cherry picked from commit ecf2a89a997ad4a14339b6a2f544e44b422620a0)
* e1000: fix timeout for shadow RAM writeChengwen Feng2021-09-241-0/+2
| | | | | | | | | | | | | | | | | This fixes the timed out for shadow RAM write EEWR can't be detected. Fixes: 5a32a257f957 ("e1000: more NICs in base driver") Cc: stable@dpdk.org Signed-off-by: Chengwen Feng <fengchengwen@huawei.com> Signed-off-by: Min Hu (Connor) <humin29@huawei.com> Acked-by: Haiyue Wang <haiyue.wang@intel.com> Approved by: imp Obtained from: DPDK (4a8ab48ec47b3616272e50620b8e1a9599358ea6) MFC after: 1 week (cherry picked from commit f6517a7e69c10c6057d6c990a9f3ea22a2b62398)
* e1000: cleanup pre-processor tagsGuinan Sun2021-09-242-2/+6
| | | | | | | | | | | | | The codes has been exposed correctly, so remove pre-processor tags. Signed-off-by: Guinan Sun <guinanx.sun@intel.com> Reviewed-by: Wei Zhao <wei.zhao1@intel.com> Approved by: imp Obtained from: DPDK (a50e998a0fd94e5db508710868a3417b1846425c) MFC after: 1 week (cherry picked from commit 9c4a0fabc8b88af0d9fd3f0d67bd080714d1ee4b)
* e1000: introduce DPGFR registerGuinan Sun2021-09-241-0/+1
| | | | | | | | | | | | | | Defined DPGFR, Dynamic Power Gate Force Control Register. 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 (1469e5aceffbdcebe834292aadb40b1bd1602867) MFC after: 1 week (cherry picked from commit 7fb2111413c799414c86d7bfdcc72bc1c6302726)
* e1000: expose FEXTNVM registers and masksGuinan Sun2021-09-242-1/+4
| | | | | | | | | | | | | | | 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 (cherry picked from commit de965d042fa4d341cec3fa7cacac0f30f224bde4)
* e1000: add missed define for VFTAGuinan Sun2021-09-241-0/+1
| | | | | | | | | | | | | | | 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 (cherry picked from commit a8bb4ab7cfb84195ef8af3c788fecdc8830fc960)
* e1000: increase timeout for ME ULP exitGuinan Sun2021-09-241-2/+5
| | | | | | | | | | | | | | | | 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 (cherry picked from commit e8e3171d992f3255cc8e5a0f59912d07679cc94c)
* e1000: add missing register definesGuinan Sun2021-09-241-0/+5
| | | | | | | | | | | | | | | | 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 (cherry picked from commit 09888d4bc1a2c45d121046f79be5c01e4889a67e)
* e1000: add PCIm function stateGuinan Sun2021-09-241-0/+1
| | | | | | | | | | | | | | 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 (cherry picked from commit a6f0cc373f0afc24c9c27bbba45a6a7a3ac268d1)
* e1000: expose MAC functionsGuinan Sun2021-09-242-2/+2
| | | | | | | | | | | | | | | 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 (cherry picked from commit d1c37752e2afb51dfb2e08afe714a799788b6ede)
* e1000: update for i210 slow system clockGuinan Sun2021-09-241-2/+9
| | | | | | | | | | | | | | 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 (cherry picked from commit 1883a6ff3b2ebaf108c45717c8eb94e0a76bb0b9)
* e1000: remove duplicated phy codesGuinan Sun2021-09-2411-417/+573
| | | | | | | | | | | | | | | | | | | 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 (cherry picked from commit 6b9d35fac12bf657cd1df8f1521c70704ff62b61)
* e1000: modify HW level time sync mechanismsGuinan Sun2021-09-242-0/+20
| | | | | | | | | | | | | | | 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 (cherry picked from commit d50f362b505e9026fbd33d00dc43e09cac26a209)
* e1000: fix minor issues and improve code styleGuinan Sun2021-09-247-39/+35
| | | | | | | | | | | | | | | | | | | | | | | | | | | | 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 (cherry picked from commit 6c59e1866ca7a48d84f1d298bb3e6a07d2e6f756)
* e1000: add function parameter descriptionsGuinan Sun2021-09-245-6/+30
| | | | | | | | | | | | | | 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 (cherry picked from commit 5b426b3e8cbd5abdb3a57ff49cd27c36cac03427)
* e1000: expose xMDIO methodsGuinan Sun2021-09-244-75/+77
| | | | | | | | | | | | | | 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 (cherry picked from commit da24467c7a162691a14f2f74d90ff8dedb816cfc)
* e1000: add missing device IDGuinan Sun2021-09-243-0/+3
| | | | | | | | | | | | | | | 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 (cherry picked from commit 82a9d0c2c1ef75703d16e49e96d1e7b0bf046882)
* e1000: support flashless i211 PBAGuinan Sun2021-09-242-3/+4
| | | | | | | | | | | | | | | 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 (cherry picked from commit de0ae5d1cb896dbc04c5334ef0b864b3c841c3ce)
* e1000: Update copyrights and readmeKevin Bowling2021-09-2437-981/+1007
| | | | | | | | | | | | 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 (cherry picked from commit 702cac6c6bf20ca43db26c38185f65fc9ed1935e)
* e1000: Revert Update intel shared codeKevin Bowling2021-09-1836-1298/+755
| | | | | | | | | | | | | This reverts commit fc7682b17f3738573099b8b03f5628dcc8148adb. 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 (cherry picked from commit a4378873e9ce1b35b55378c21f8eae69e58c2525)
* intel ethernet: Use ether_gen_addr(9)Kevin Bowling2021-08-271-5/+2
| | | | | | | | | | 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 (cherry picked from commit 0e5811a2a9a1b4a7e0c79b73e3b9b9d15d481577)
* e1000: Update intel shared codeKevin Bowling2021-08-2636-755/+1298
| | | | | | | | | | | | | | | | 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 (cherry picked from commit fc7682b17f3738573099b8b03f5628dcc8148adb)
* e1000: always enable PCSD when RSS hashingKevin Bowling2021-08-233-31/+27
| | | | | | | | | | | | | | | | | | | | | | 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> (cherry picked from commit 69e8e8ea3d4be9da6b5bc904a444b51958128ff5)
* e1000: rctl/srrctl buffer size init, rfctl fixKevin Bowling2021-08-171-33/+43
| | | | | | | | | | | | | 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 (cherry picked from commit 12e8addd320df995bfb2b00f51c233541f741ae4)
* e1000: fix build after b761f264926a (orig c1655b0f)Marius Strobl2021-08-171-43/+43
| | | | (cherry picked from commit c262e8e87e7b59b768c717c1779ef1ba28507f44)
* e1000: consistently use the hw variablesMarius Strobl2021-08-171-79/+73
| | | | | | | | | It's rather confusing when adapter->hw and hw are mixed and matched within a particular function. Some of this was missed in cd1cf2fc1d49c509ded05dcd41b7600a5957fb9a and r353778 respectively. (cherry picked from commit c1655b0f8998f9e842a004f33e7c9c01c5d9e879)
* e1000: Fix lem/em UDP rx csum offloadKevin Bowling2021-08-161-46/+21
| | | | | | | | | | | | | | 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 (cherry picked from commit 015075f383489fcbedbe8aae7c1c64a3d55ca75e)
* igb: clean up igb_txrx commentsKevin Bowling2021-08-031-4/+1
| | | | | | | | Reviewed by: grehan MFC after: 3 days Differential Revision: https://reviews.freebsd.org/D31227 (cherry picked from commit ff01d6343f1f0c6550e4072eddda91dabd366d09)
* e1000: Add missing branch predictionKevin Bowling2021-08-031-1/+1
| | | | | | | | | | I missed this edit from the ixgbe review (D30074) Reviewed by: gallatin MFC after: 2 weeks Differential Revision: https://reviews.freebsd.org/D30073 (cherry picked from commit 9fd0cda92d3346e1daa30eb48e185e2077ac0566)
* e1000: Clean up igb_txrxKevin Bowling2021-08-031-60/+59
| | | | | | | | | | | | | 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 (cherry picked from commit 41f02257146d128cdd4aa2bdcfdab7f9e08a4314)