#
a35f6651 |
| 27-Jun-2024 |
Mitchell Horne <mhorne@FreeBSD.org> |
if_genet: don't load DMA mapping when tx_queue is full
gen_encap() always calls bus_dmamap_load_mbuf_sg() into 'map' (which is the current tx_queue). If the tx_queue is full, it will load with a 'ma
if_genet: don't load DMA mapping when tx_queue is full
gen_encap() always calls bus_dmamap_load_mbuf_sg() into 'map' (which is the current tx_queue). If the tx_queue is full, it will load with a 'map' that already has a currently active mapping. This violates the busdma(9) KPI.
Checking for a full queue and returning ENOBUFS will allow gen_start_locked() to set the IFF_DRV_OACTIVE faster without having to needlessly check if the mbuf will fit (it won't).
PR: 256482 Reviewed by: mhorne MFC after: 1 week Submitted by: ghuckriede@blackberry.com
show more ...
|
Revision tags: release/14.1.0, release/13.3.0 |
|
#
fdafd315 |
| 24-Nov-2023 |
Warner Losh <imp@FreeBSD.org> |
sys: Automated cleanup of cdefs and other formatting
Apply the following automated changes to try to eliminate no-longer-needed sys/cdefs.h includes as well as now-empty blank lines in a row.
Remov
sys: Automated cleanup of cdefs and other formatting
Apply the following automated changes to try to eliminate no-longer-needed sys/cdefs.h includes as well as now-empty blank lines in a row.
Remove /^#if.*\n#endif.*\n#include\s+<sys/cdefs.h>.*\n/ Remove /\n+#include\s+<sys/cdefs.h>.*\n+#if.*\n#endif.*\n+/ Remove /\n+#if.*\n#endif.*\n+/ Remove /^#if.*\n#endif.*\n/ Remove /\n+#include\s+<sys/cdefs.h>\n#include\s+<sys/types.h>/ Remove /\n+#include\s+<sys/cdefs.h>\n#include\s+<sys/param.h>/ Remove /\n+#include\s+<sys/cdefs.h>\n#include\s+<sys/capsicum.h>/
Sponsored by: Netflix
show more ...
|
Revision tags: release/14.0.0 |
|
#
2a371643 |
| 21-Jul-2023 |
Justin Hibbits <jhibbits@FreeBSD.org> |
IfAPI: Retire if_etherbpfmtap() and if_bpfmtap()
Summary: These came in the original DrvAPI commits in 2014, and are obsoleted by bpf_mtap_if() and ether_bpf_mtap_if(). The `_if` suffix, rather tha
IfAPI: Retire if_etherbpfmtap() and if_bpfmtap()
Summary: These came in the original DrvAPI commits in 2014, and are obsoleted by bpf_mtap_if() and ether_bpf_mtap_if(). The `_if` suffix, rather than prefix, conveys that it's operating on the bpf of the interface, instead than the interface itself.
Reviewed by: glebius Sponsored by: Juniper Networks, Inc. Differential Revision: https://reviews.freebsd.org/D41146
show more ...
|
#
685dc743 |
| 16-Aug-2023 |
Warner Losh <imp@FreeBSD.org> |
sys: Remove $FreeBSD$: one-line .c pattern
Remove /^[\s*]*__FBSDID\("\$FreeBSD\$"\);?\s*\n/
|
#
95ee2897 |
| 16-Aug-2023 |
Warner Losh <imp@FreeBSD.org> |
sys: Remove $FreeBSD$: two-line .h pattern
Remove /^\s*\*\n \*\s+\$FreeBSD\$$\n/
|
Revision tags: release/13.2.0, release/12.4.0 |
|
#
b7459fb0 |
| 19-Aug-2022 |
Justin Hibbits <jhibbits@FreeBSD.org> |
Mechanically convert genet(4) to IfAPI
Sponsored by: Juniper Networks, Inc. Differential Revision: https://reviews.freebsd.org/D37832
|
#
234c1463 |
| 25-Oct-2022 |
Mike Karels <karels@FreeBSD.org> |
genet: add another case where headers need pullup
Wake On LAN packets sent by wake(8) via BPF are lost if txcsum is enabled. These fall into the "other protocol" case where gen_parse_tx did nothing
genet: add another case where headers need pullup
Wake On LAN packets sent by wake(8) via BPF are lost if txcsum is enabled. These fall into the "other protocol" case where gen_parse_tx did nothing. Add code to shift up to gen_tx_hdr_min bytes of the packet along with the Ethernet header in this case.
show more ...
|
#
b66e766d |
| 25-Oct-2022 |
Warner Losh <imp@FreeBSD.org> |
genet: cnt here is write only and can be removed
Sponsored by: Netflix
|
Revision tags: release/13.1.0 |
|
#
82d4dc06 |
| 09-May-2022 |
John Baldwin <jhb@FreeBSD.org> |
arm/arm64 broadcom: Remove unused devclass arguments to DRIVER_MODULE.
|
#
1de9aa4d |
| 09-May-2022 |
Mike Karels <karels@FreeBSD.org> |
genet: fix output packet corruption in uncommon case
The code for the "shift" block in the COPY macro set the pointer for the next copy block to the wrong value. In this case, the link-layer header
genet: fix output packet corruption in uncommon case
The code for the "shift" block in the COPY macro set the pointer for the next copy block to the wrong value. In this case, the link-layer header would be overwritten by the network-layer header. This case is difficult or impossible to exercise in the current driver without changing the value of the hw.genet.tx_hdr_min sysctl. Correct the pointer. While here, remove a line in the macro that was marked "unneeded", which was actually wrong.
PR: 263824 Submitted by: jiahali@blackberry.com MFC after: 2 weeks
show more ...
|
#
3e38757d |
| 19-Apr-2022 |
John Baldwin <jhb@FreeBSD.org> |
Remove unused miibus_devclass and miibus_fdt_devclass.
|
#
8f45652b |
| 11-Apr-2022 |
Mike Karels <karels@FreeBSD.org> |
genet: fix problems with interface down/up
The genet interface did not resume operation correctly after doing ifconfig down then up. The down/reset procedure did not clear the RUNNING flag, and did
genet: fix problems with interface down/up
The genet interface did not resume operation correctly after doing ifconfig down then up. The down/reset procedure did not clear the RUNNING flag, and did not reset enough of the hardware state. This patch is modeled on OpenBSD code, with a call to gen_reset added to reset the controller completely. Regularize the parameter to gen_dma_disable() while here.
PR: 263091 Submitted by: jiahali@blackberry.com
show more ...
|
Revision tags: release/12.3.0 |
|
#
184291b0 |
| 20-Jun-2021 |
Mike Karels <karels@FreeBSD.org> |
genet: pullup minimum header amount for IPv4
The genet driver (RPi4 Ethernet) had code to pull headers into the first mbuf if there was only an Ethernet header there. This was originally needed for
genet: pullup minimum header amount for IPv4
The genet driver (RPi4 Ethernet) had code to pull headers into the first mbuf if there was only an Ethernet header there. This was originally needed for ICMPv6 replies, then for forwarded IPv6/TCP. Now a situation has been found where it is needed for IPv4, when using NAT with IPFW. Generalize to do this for all protocols. Rather than using an IPv6-related definition for the length, move the length to a variable that can be set with sysctl (hw.genet.tx_hdr_min). Move an old tunable to a new RDTUN variable with a better name.
PR: 25607 MFC after: 3 days Reviewers: emaste Differential Revision: https://reviews.freebsd.org/D30831
show more ...
|
#
13604fb0 |
| 20-Jun-2021 |
Mike Karels <karels@FreeBSD.org> |
genet: Fix potential crash during attach
As pointed out in the bug, the genet driver (RPi4 Ethernet) was attaching the interrupts before the data structures were fully initialized, causing a crash i
genet: Fix potential crash during attach
As pointed out in the bug, the genet driver (RPi4 Ethernet) was attaching the interrupts before the data structures were fully initialized, causing a crash if an interrupt came in during the attach. Fix by reordering code blocks.
PR: 256334 Reported by: < ghuckriede at blackberry.com > Reviewed by: < ghuckriede at blackberry.com > (informally) MFC after: 3 days
show more ...
|
#
f66a1f40 |
| 12-Apr-2021 |
Mark Johnston <markj@FreeBSD.org> |
genet: Use device_t in preference to struct device *
MFC after: 1 week Sponsored by: The FreeBSD Foundation
|
Revision tags: release/13.0.0 |
|
#
2bdcf623 |
| 18-Mar-2021 |
Mike Karels <karels@FreeBSD.org> |
genet: Fix problem with forwarding some TCP/IPv6 packets
TCP/IPv6 packets to be forwarded can be laid out with only the Ethernet header in the first mbuf, and these packets are lost. There was a pr
genet: Fix problem with forwarding some TCP/IPv6 packets
TCP/IPv6 packets to be forwarded can be laid out with only the Ethernet header in the first mbuf, and these packets are lost. There was a previous hack to pullup ICMPv6 packets with such a layout for the same reason. Generalize, and pullup any IPv6 packets with only the Ethernet header in the first mbuf. Possibly this should also include IPv4, but that situation has not been observed to fail.
PR: 254060 Reported by: denis at h3q.com MFC after: 3 days
show more ...
|
#
cb00fc7c |
| 05-Jan-2021 |
Emmanuel Vadot <manu@FreeBSD.org> |
arm64: genet: Add bcm2711-genet-v5 compatible
Later dtb from the RPI Foundation removed the brcm,genet-v5 compatible for some unknown reason, add brcm,bcm2711-genet-v5 to the list of compatible devi
arm64: genet: Add bcm2711-genet-v5 compatible
Later dtb from the RPI Foundation removed the brcm,genet-v5 compatible for some unknown reason, add brcm,bcm2711-genet-v5 to the list of compatible device for if_genet
show more ...
|
Revision tags: release/12.2.0 |
|
#
50cedfed |
| 01-Sep-2020 |
Mateusz Guzik <mjg@FreeBSD.org> |
arm64: clean up empty lines in .c and .h files
|
#
349eddbd |
| 19-Jun-2020 |
Mike Karels <karels@FreeBSD.org> |
Add support for bcm54213PE in brgphy.
This chip is used in the Rasperry Pi 4, and is supported by the if_genet driver. Currently we use the ukphy mii driver, this patch switches over to the brgphy m
Add support for bcm54213PE in brgphy.
This chip is used in the Rasperry Pi 4, and is supported by the if_genet driver. Currently we use the ukphy mii driver, this patch switches over to the brgphy mii driver instead. To support the rgmii-rxid phy mode, which is now the default in the Linux dtb, we add support for clock skewing.
These changes are taken from OpenBSD and NetBSD, except for the bailout in brgphy_bcm54xx_clock_delay() in rgmii mode, which was found necessary after testing.
Submitted by: Robert Crowston, crowston at protomail.com Differential Revision: https://reviews.freebsd.org/D25251
show more ...
|
Revision tags: release/11.4.0 |
|
#
51cefda1 |
| 30-May-2020 |
Mike Karels <karels@FreeBSD.org> |
genet: workaround for problem with ICMPv6 echo replies
The ICMPv6 echo reply is constructed with the IPv6 header too close to the beginning of a packet for an Ethernet header to be prepended, so we
genet: workaround for problem with ICMPv6 echo replies
The ICMPv6 echo reply is constructed with the IPv6 header too close to the beginning of a packet for an Ethernet header to be prepended, so we end up with an mbuf containing just the Ethernet header. The GENET controller doesn't seem to handle this, with or without transmit checksum offload. At least until we have chip documentation, do a pullup to satisfy the chip. Hopefully this can be fixed properly in the future.
show more ...
|
#
0add2a52 |
| 30-May-2020 |
Mike Karels <karels@FreeBSD.org> |
genet: fix issues with transmit checksum offload
Fix problem with ICMP echo replies: check only deferred data checksum flags, and not the received checksum status bits, when checking whether a packe
genet: fix issues with transmit checksum offload
Fix problem with ICMP echo replies: check only deferred data checksum flags, and not the received checksum status bits, when checking whether a packet has a deferred checksum; otherwise echo replies are corrupted because the received checksum status bits are still present.
Fix some unhandled cases in packet shuffling for checksum offload.
show more ...
|
#
2cd0c529 |
| 22-Apr-2020 |
Mike Karels <karels@FreeBSD.org> |
Add genet driver for Raspberry Pi 4B Ethernet
Add driver for Broadcom "GENET" version 5, as found in BCM-2711 on Raspberry Pi 4B. The driver is derived in part from the bcmgenet.c driver in NetBSD,
Add genet driver for Raspberry Pi 4B Ethernet
Add driver for Broadcom "GENET" version 5, as found in BCM-2711 on Raspberry Pi 4B. The driver is derived in part from the bcmgenet.c driver in NetBSD, along with bcmgenetreg.h.
Reviewed by: manu Obtained from: in part from NetBSD Relnotes: yes, note addition Differential Revision: https://reviews.freebsd.org/D24436
show more ...
|