#
4cceae0f |
| 11-Aug-2024 |
dlg <dlg@openbsd.org> |
unbreak igc on strict alignment archs.
igc (like other intel nics) only supports a limited range of rx buffer sizes, one of which is 2k like our standard mbuf clusters. however they put the ethernet
unbreak igc on strict alignment archs.
igc (like other intel nics) only supports a limited range of rx buffer sizes, one of which is 2k like our standard mbuf clusters. however they put the ethernet packet at the start of the provided rx buffer, which means the ip header is misaligned on strict alignment archs if we use the standard 2k mbuf clusters. to avoid wasting too much memory using the next biggest cluster (4k) we have mcl2k2 clusters that pretty much exists for intel nics to use.
igc (and probably some other drivers ive touched) was too clever about using mcl2k2 though, which caused panics when trying to use jumbo packets. jan@ fixed this by moving back to 2k clusters, but that broke sparc64 (and probably powerpc64).
this dumbs the mcl2k2 handling down a bit so jumbos still work, but adds ETHER_ALIGN back so strict alignment archs also work again.
ok bluhm@
show more ...
|
#
b07d32b0 |
| 08-Aug-2024 |
jan <jan@openbsd.org> |
igc(4): Use same size for DMA mapping and allocation for rx bufs
Also remove the ETHER_ALIGN which leads to corruped mbufs.
ok bluhm@
|
#
0f9891f1 |
| 24-May-2024 |
jsg <jsg@openbsd.org> |
remove unneeded includes; ok miod@
|
#
fb54a5a4 |
| 21-May-2024 |
bluhm <bluhm@openbsd.org> |
Make igc(4) and ix(4) struct names unique.
In ddb show struct gets confused if the same struct name exists twice. Add a prefix to tx_ring and rx_ring in drivers.
OK miod@ jan@
|
#
7f8ccd64 |
| 07-May-2024 |
jan <jan@openbsd.org> |
Additional check for TSO packets with 0 MSS.
Tested by bluhm
ok bluhm@
|
#
bf6ccf13 |
| 06-May-2024 |
dlg <dlg@openbsd.org> |
expose hardware counters as kstats.
igc(4) counters are read to clear like em(4) counters, so this code looks very much like em(4) but with less quirks so far.
ok bluhm@ bket@
|
#
2011187a |
| 04-May-2024 |
mbuhl <mbuhl@openbsd.org> |
Add TSO capabilites. Comments, suggestions and testing from bket@, jan@, and bluhm@
|
#
38ec96db |
| 12-Apr-2024 |
jan <jan@openbsd.org> |
remove useless includes of ip.h and ip6.h
ok bluhm
|
#
2dad3cba |
| 25-Mar-2024 |
mbuhl <mbuhl@openbsd.org> |
Add the VLAN_HWTAGGING capability. Big thanks to bket@ for testing, rebasing, refactoring, and addressing feedback for this diff. ok bluhm@, jan@
|
#
b4e446e2 |
| 23-Feb-2024 |
kevlo <kevlo@openbsd.org> |
- Add support for reporting flow control status. - Add missing igc_check_for_link() call; from Masanobu SAITOH via NetBSD.
"Fine" deraadt@
ok jan@
|
#
ac5f541a |
| 14-Feb-2024 |
bluhm <bluhm@openbsd.org> |
Check IP length in ether_extract_headers().
For LRO with ix(4) it is necessary to detect ethernet padding. Extract ip_len and ip6_plen from the mbuf and provide it to the drivers. Add extended sanit
Check IP length in ether_extract_headers().
For LRO with ix(4) it is necessary to detect ethernet padding. Extract ip_len and ip6_plen from the mbuf and provide it to the drivers. Add extended sanitity checks, like IP packet is shorter than TCP header. This prevents offloading to network hardware with bougus packets. Also iphlen of extracted headers contains header length for IPv4 and IPv6, to make code in drivers simpler.
OK mglocker@
show more ...
|
#
e78a66e5 |
| 13-Feb-2024 |
bluhm <bluhm@openbsd.org> |
Analyse header layout in ether_extract_headers().
Several drivers need IPv4 header length and TCP offset for checksum offload, TSO and LRO. Accessing these fields directly caused crashes on sparc64
Analyse header layout in ether_extract_headers().
Several drivers need IPv4 header length and TCP offset for checksum offload, TSO and LRO. Accessing these fields directly caused crashes on sparc64 due to misaligned access. It cannot be guaranteed that IP and TCP header is 4 byte aligned in driver level. Also gcc 4.2.1 assumes that bit fields can be accessed with 32 bit load instructions.
Use memcpy() in ether_extract_headers() to get the bits from IPv4 and TCP header and store the header length in struct ether_extracted. From there network drivers can esily use it without caring about alignment and bit shift. Do some sanity checks with the length values to prevent that invalid values from evil packets get stored into hardware registers. If check fails, clear the pointer to the header to hide it from the driver. Add debug prints that help to figure out the reason for bad packets and provide information when debugging drivers.
OK mglocker@
show more ...
|
#
cbab2262 |
| 23-Jan-2024 |
kevlo <kevlo@openbsd.org> |
Change default duplex setting and simplify the setup of srrctl.BSIZEPKT.
During media selection through ifconfig one might not specify the duplex setting through the mediaopt flag. In that case the
Change default duplex setting and simplify the setup of srrctl.BSIZEPKT.
During media selection through ifconfig one might not specify the duplex setting through the mediaopt flag. In that case the igc(4) would default to full-duplex. The problem with this approach is that em(4) defaults to half-duplex. Because of that if one connects both NICs and sets media to e.g. 100baseTX on both of them no carrier will be found. Fix that by matching igc(4) behaviour with what em(4) does.
Adapted from FreeBSD commits 3b8d04f845b416d29a258658b8a48d1afb4a2e81 and 0eb8cd1de26849cbaefaf3bc59aa9612fa0dfa52 respectively.
ok mbuhl@
show more ...
|
#
cf96265b |
| 10-Nov-2023 |
bluhm <bluhm@openbsd.org> |
Make ifq and ifiq interface MP safe.
Rename ifq_set_maxlen() to ifq_init_maxlen(). This function neither uses WRITE_ONCE() nor a mutex and is called before the ifq mutex is initialized. The new na
Make ifq and ifiq interface MP safe.
Rename ifq_set_maxlen() to ifq_init_maxlen(). This function neither uses WRITE_ONCE() nor a mutex and is called before the ifq mutex is initialized. The new name expresses that it should be used only during interface attach when there is no concurrency.
Protect ifq_len(), ifq_empty(), ifiq_len(), and ifiq_empty() with READ_ONCE(). They can be used without lock as they only read a single integer.
OK dlg@
show more ...
|
#
58721d3b |
| 28-Apr-2023 |
bluhm <bluhm@openbsd.org> |
Remove error handling around mallocarray(9). I cannot fail when called with M_WAITOK. OK kevlo@
|
#
eb7cd003 |
| 09-Mar-2023 |
chris <chris@openbsd.org> |
Fix comment to reflect the disabled status of Energy Efficient Ethernet.
Intel just disabled EEE for 1Gbps and 2.5Gbps modes on both i225 and i226 chips due to bugs. We already had it this way.
ok
Fix comment to reflect the disabled status of Energy Efficient Ethernet.
Intel just disabled EEE for 1Gbps and 2.5Gbps modes on both i225 and i226 chips due to bugs. We already had it this way.
ok patrick@ kevlo@
show more ...
|
#
efd8dad8 |
| 09-Feb-2023 |
naddy <naddy@openbsd.org> |
consolidate mbuf header parsing on device driver layer
em(4) ok jan@, bluhm@ igc(4) tested by weerd@
|
#
1dfd2c79 |
| 11-Nov-2022 |
mbuhl <mbuhl@openbsd.org> |
Due to checksum offloading one more element could be written to the ring than there is space available. ok dlg
|
#
5a60fbd4 |
| 02-Jun-2022 |
mbuhl <mbuhl@openbsd.org> |
Implement and enable IPv4, TCP, and UDP checksum offloading for igc.
ok kevlo@
|
#
b7fccf02 |
| 11-May-2022 |
kevlo <kevlo@openbsd.org> |
Use hardware routine for PHY reset and always accept the PHY that's present.
The previously used software reset routine wasn't sufficient to reset the PHY if the bootloader hadn't left the device in
Use hardware routine for PHY reset and always accept the PHY that's present.
The previously used software reset routine wasn't sufficient to reset the PHY if the bootloader hadn't left the device in an initialized state. From FreeBSD.
Bug reported and the fix tested by daniel@
show more ...
|
#
471aeecf |
| 06-Apr-2022 |
naddy <naddy@openbsd.org> |
constify struct cfattach
|
#
4c58e589 |
| 09-Jan-2022 |
patrick <patrick@openbsd.org> |
Simplify igc_rxrinfo() to improve consistency and appease Coverity.
CID 1510483
ok kevlo@
|
#
7a97ce60 |
| 22-Nov-2021 |
jsg <jsg@openbsd.org> |
avoid uninitialised variable use in igc(4)
read icr reg before testing bit in result add missing block in rxeof from ix
ok kevlo@ patrick@
|
#
48860803 |
| 31-Oct-2021 |
patrick <patrick@openbsd.org> |
Disable both TCP/UDP checksum offloading and VLAN HW tag offloading for now, as we currently configure neither in the transmit code path.
Found by sf@
|
#
40350728 |
| 31-Oct-2021 |
patrick <patrick@openbsd.org> |
Implement transmit and transmit completion path.
|