<feed xmlns='http://www.w3.org/2005/Atom'>
<title>src/sys/dev/mlx4/mlx4_en, branch releng/14.2</title>
<subtitle>FreeBSD source tree</subtitle>
<link rel='alternate' type='text/html' href='http://cgit.freebsd.org/src/'/>
<entry>
<title>net: Remove unneeded NULL check for the allocated ifnet</title>
<updated>2024-07-12T12:03:37+00:00</updated>
<author>
<name>Zhenlei Huang</name>
<email>zlei@FreeBSD.org</email>
</author>
<published>2024-06-28T10:16:29+00:00</published>
<link rel='alternate' type='text/html' href='http://cgit.freebsd.org/src/commit/?id=6b1f530935c5f84ec65dad87b7c20c6b7a72a6d3'/>
<id>6b1f530935c5f84ec65dad87b7c20c6b7a72a6d3</id>
<content type='text'>
Change 4787572d0580 made if_alloc_domain() never fail, then also do the
wrappers if_alloc(), if_alloc_dev(), and if_gethandle().

No functional change intended.

Reviewed by:	kp, imp, glebius, stevek
MFC after:	2 weeks
Differential Revision:	https://reviews.freebsd.org/D45740

(cherry picked from commit aa3860851b9f6a6002d135b1cac7736e0995eedc)
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Change 4787572d0580 made if_alloc_domain() never fail, then also do the
wrappers if_alloc(), if_alloc_dev(), and if_gethandle().

No functional change intended.

Reviewed by:	kp, imp, glebius, stevek
MFC after:	2 weeks
Differential Revision:	https://reviews.freebsd.org/D45740

(cherry picked from commit aa3860851b9f6a6002d135b1cac7736e0995eedc)
</pre>
</div>
</content>
</entry>
<entry>
<title>mlx4, mlx5: Eliminate redundent NULL check for packet filter</title>
<updated>2024-06-05T04:27:11+00:00</updated>
<author>
<name>Zhenlei Huang</name>
<email>zlei@FreeBSD.org</email>
</author>
<published>2024-05-28T04:46:04+00:00</published>
<link rel='alternate' type='text/html' href='http://cgit.freebsd.org/src/commit/?id=d98ced6588b522e8833888bc99b7b9468312b221'/>
<id>d98ced6588b522e8833888bc99b7b9468312b221</id>
<content type='text'>
mlx4 and mlx5 are Ethernet devices and ether_ifattach() does an
unconditional bpfattach(). From commit 16d878cc99ef [1] and on, we
should not check ifp-&gt;if_bpf to tell us whether or not we have any bpf
peers that might be interested in receiving packets. And since commit
2b9600b4497b [2], ifp-&gt;if_bpf can not be NULL even after the network
interface has been detached.

No functional change intended.

1. 16d878cc99ef Fix the following bpf(4) race condition which can result in a panic
2. 2b9600b4497b Add dead_bpf_if structure, that should be used as fake bpf_if during ifnet detach

Reviewed by:	kp, kib
MFC after:	1 week
Differential Revision:	https://reviews.freebsd.org/D45196

(cherry picked from commit 2439ae948352766f6b993c5103a4c516376bec28)
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
mlx4 and mlx5 are Ethernet devices and ether_ifattach() does an
unconditional bpfattach(). From commit 16d878cc99ef [1] and on, we
should not check ifp-&gt;if_bpf to tell us whether or not we have any bpf
peers that might be interested in receiving packets. And since commit
2b9600b4497b [2], ifp-&gt;if_bpf can not be NULL even after the network
interface has been detached.

No functional change intended.

1. 16d878cc99ef Fix the following bpf(4) race condition which can result in a panic
2. 2b9600b4497b Add dead_bpf_if structure, that should be used as fake bpf_if during ifnet detach

Reviewed by:	kp, kib
MFC after:	1 week
Differential Revision:	https://reviews.freebsd.org/D45196

(cherry picked from commit 2439ae948352766f6b993c5103a4c516376bec28)
</pre>
</div>
</content>
</entry>
<entry>
<title>linuxkpi: spinlock: Simplify code</title>
<updated>2024-06-04T11:22:40+00:00</updated>
<author>
<name>Emmanuel Vadot</name>
<email>manu@FreeBSD.org</email>
</author>
<published>2024-05-15T09:00:04+00:00</published>
<link rel='alternate' type='text/html' href='http://cgit.freebsd.org/src/commit/?id=183b64dfd84ad7fd504d04f40c90edad809083c1'/>
<id>183b64dfd84ad7fd504d04f40c90edad809083c1</id>
<content type='text'>
Just use a typedef for spinlock_t, no need to create a useless
structure.

Reviewed by:		bz, emaste
Sponsored by:		Beckhoff Automation GmbH &amp; Co. KG
Differential Revision:	https://reviews.freebsd.org/D45205

(cherry picked from commit ae38a1a1bfdf320089c254e4dbffdf4769d89110)

linuxkpi: Fix spin_lock_init

Some linux code re-init some spinlock so add MTX_NEW to mtx_init.

Reported by:	David Wolfskill &lt;david@catwhisker.org&gt;
Fixes:		ae38a1a1bfdf ("linuxkpi: spinlock: Simplify code")

(cherry picked from commit cff79fd02636f34010d8b835cc9e55401fa76e74)
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Just use a typedef for spinlock_t, no need to create a useless
structure.

Reviewed by:		bz, emaste
Sponsored by:		Beckhoff Automation GmbH &amp; Co. KG
Differential Revision:	https://reviews.freebsd.org/D45205

(cherry picked from commit ae38a1a1bfdf320089c254e4dbffdf4769d89110)

linuxkpi: Fix spin_lock_init

Some linux code re-init some spinlock so add MTX_NEW to mtx_init.

Reported by:	David Wolfskill &lt;david@catwhisker.org&gt;
Fixes:		ae38a1a1bfdf ("linuxkpi: spinlock: Simplify code")

(cherry picked from commit cff79fd02636f34010d8b835cc9e55401fa76e74)
</pre>
</div>
</content>
</entry>
<entry>
<title>mlx4(5): fix driver initialization</title>
<updated>2023-12-30T00:24:07+00:00</updated>
<author>
<name>Yuji Hagiwara</name>
<email>yuuzi41@hotmail.com</email>
</author>
<published>2023-12-23T20:53:02+00:00</published>
<link rel='alternate' type='text/html' href='http://cgit.freebsd.org/src/commit/?id=1e9df419f14c059aba8d6704256da5c7af4f182a'/>
<id>1e9df419f14c059aba8d6704256da5c7af4f182a</id>
<content type='text'>
PR:	275897
MFC after:	1 week

(cherry picked from commit 553ed8e38bfdd4832deecdec1c0b023824dcff94)
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
PR:	275897
MFC after:	1 week

(cherry picked from commit 553ed8e38bfdd4832deecdec1c0b023824dcff94)
</pre>
</div>
</content>
</entry>
<entry>
<title>Mechanically convert mlx4(4) to IfAPI</title>
<updated>2023-02-07T19:16:11+00:00</updated>
<author>
<name>Justin Hibbits</name>
<email>jhibbits@FreeBSD.org</email>
</author>
<published>2022-08-17T20:30:39+00:00</published>
<link rel='alternate' type='text/html' href='http://cgit.freebsd.org/src/commit/?id=0b2813768bae1177b7369d67b7639d530f547b47'/>
<id>0b2813768bae1177b7369d67b7639d530f547b47</id>
<content type='text'>
Reviewed by:	hselasky, zlei
Sponsored by:	Juniper Networks, Inc.
Differential Revision: https://reviews.freebsd.org/D37823
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Reviewed by:	hselasky, zlei
Sponsored by:	Juniper Networks, Inc.
Differential Revision: https://reviews.freebsd.org/D37823
</pre>
</div>
</content>
</entry>
<entry>
<title>mlx4: purge EOL release compatibility</title>
<updated>2023-02-04T16:13:09+00:00</updated>
<author>
<name>Elliott Mitchell</name>
<email>ehem+freebsd@m5p.com</email>
</author>
<published>2022-06-23T00:53:47+00:00</published>
<link rel='alternate' type='text/html' href='http://cgit.freebsd.org/src/commit/?id=026babd427e6511e53478814ce0aa1cc3f7a9988'/>
<id>026babd427e6511e53478814ce0aa1cc3f7a9988</id>
<content type='text'>
Remove FreeBSD 10 support code.

Reviewed by: imp
Pull Request: https://github.com/freebsd/freebsd-src/pull/603
Differential Revision: https://reviews.freebsd.org/D35560
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Remove FreeBSD 10 support code.

Reviewed by: imp
Pull Request: https://github.com/freebsd/freebsd-src/pull/603
Differential Revision: https://reviews.freebsd.org/D35560
</pre>
</div>
</content>
</entry>
<entry>
<title>mlx4: rename conflicting netdev_priv() to mlx4_netdev_priv()</title>
<updated>2021-10-25T20:12:32+00:00</updated>
<author>
<name>Bjoern A. Zeeb</name>
<email>bz@FreeBSD.org</email>
</author>
<published>2021-10-25T16:18:11+00:00</published>
<link rel='alternate' type='text/html' href='http://cgit.freebsd.org/src/commit/?id=9d593d5a76f22a315d7c6ab99e5e76003ec2b3f5'/>
<id>9d593d5a76f22a315d7c6ab99e5e76003ec2b3f5</id>
<content type='text'>
netdev_priv() is a LinuxKPI function which was used with the old ifnet
linux/netdevice.h implementation which was not adaptable to modern
Linux drviers unless rewriting them for ifnet in first place which
defeats the purpose.
Rename the netdev_priv() calls in mlx4 to mlx4_netdev_priv()
returning the ifnet softc to avoid conflicting symbol names
with different implementations in the future.

MFC after:	3 days
Reviewed by:	hselasky, kib
Differential Revision: https://reviews.freebsd.org/D32640
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
netdev_priv() is a LinuxKPI function which was used with the old ifnet
linux/netdevice.h implementation which was not adaptable to modern
Linux drviers unless rewriting them for ifnet in first place which
defeats the purpose.
Rename the netdev_priv() calls in mlx4 to mlx4_netdev_priv()
returning the ifnet softc to avoid conflicting symbol names
with different implementations in the future.

MFC after:	3 days
Reviewed by:	hselasky, kib
Differential Revision: https://reviews.freebsd.org/D32640
</pre>
</div>
</content>
</entry>
<entry>
<title>Fix two typos in source code comments</title>
<updated>2021-10-16T06:09:31+00:00</updated>
<author>
<name>Gordon Bergling</name>
<email>gbe@FreeBSD.org</email>
</author>
<published>2021-10-16T06:09:31+00:00</published>
<link rel='alternate' type='text/html' href='http://cgit.freebsd.org/src/commit/?id=899a3b38f5172d70360396caeebb5b694638282e'/>
<id>899a3b38f5172d70360396caeebb5b694638282e</id>
<content type='text'>
- s/alocated/allocated/
- s/realocated/reallocated/

MFC after:	3 days
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
- s/alocated/allocated/
- s/realocated/reallocated/

MFC after:	3 days
</pre>
</div>
</content>
</entry>
<entry>
<title>mlx4en(4): Fix wrong mbuf cluster size in mlx4_en_debugnet_init()</title>
<updated>2021-10-05T08:48:30+00:00</updated>
<author>
<name>Hans Petter Selasky</name>
<email>hselasky@FreeBSD.org</email>
</author>
<published>2021-10-05T08:46:56+00:00</published>
<link rel='alternate' type='text/html' href='http://cgit.freebsd.org/src/commit/?id=5a7de2b42caf6241e87b417a0521e9ab303989d7'/>
<id>5a7de2b42caf6241e87b417a0521e9ab303989d7</id>
<content type='text'>
This fixes an "invalid cluster size" panic when debugnet is activated.

panic()
m_getzone()
debugnet_mbuf_reinit()
debugnet_any_ifnet_update()
ifhwioctl()
ifioctl()

Submitted by:	ae@
PR:		258923
MFC after:	1 week
Sponsored by:	NVIDIA Networking
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
This fixes an "invalid cluster size" panic when debugnet is activated.

panic()
m_getzone()
debugnet_mbuf_reinit()
debugnet_any_ifnet_update()
ifhwioctl()
ifioctl()

Submitted by:	ae@
PR:		258923
MFC after:	1 week
Sponsored by:	NVIDIA Networking
</pre>
</div>
</content>
</entry>
<entry>
<title>mlx4/OFED: replace the struct net_device with struct ifnet</title>
<updated>2021-06-18T21:20:08+00:00</updated>
<author>
<name>Bjoern A. Zeeb</name>
<email>bz@FreeBSD.org</email>
</author>
<published>2021-06-04T15:36:08+00:00</published>
<link rel='alternate' type='text/html' href='http://cgit.freebsd.org/src/commit/?id=1411f52facc2b955584f2cb453b912a903e319ed'/>
<id>1411f52facc2b955584f2cb453b912a903e319ed</id>
<content type='text'>
Given all the code does operate on struct ifnet, the last step in this
longer series of changes now is to rename struct net_device to
struct ifnet (that is what it was defined to in the LinuxKPi code).
While mlx4 and OFED are "shared" code the decision was made years ago
to not write it based on the netdevice KPI but the native ifnet KPI
for most of it.  This commit simply spells this out and with that
frees "struct netdevice" to be re-done on LinuxKPI to become a more
native/mixed implementation over time as needed by, e.g., wireless
drivers.

Sponsored by:	The FreeBSD Foundation
MFC after:	10 days
Reviewed by:	hselasky
Differential Revision: https://reviews.freebsd.org/D30515
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Given all the code does operate on struct ifnet, the last step in this
longer series of changes now is to rename struct net_device to
struct ifnet (that is what it was defined to in the LinuxKPi code).
While mlx4 and OFED are "shared" code the decision was made years ago
to not write it based on the netdevice KPI but the native ifnet KPI
for most of it.  This commit simply spells this out and with that
frees "struct netdevice" to be re-done on LinuxKPI to become a more
native/mixed implementation over time as needed by, e.g., wireless
drivers.

Sponsored by:	The FreeBSD Foundation
MFC after:	10 days
Reviewed by:	hselasky
Differential Revision: https://reviews.freebsd.org/D30515
</pre>
</div>
</content>
</entry>
</feed>
