<feed xmlns='http://www.w3.org/2005/Atom'>
<title>src/sys/dev/mlx4/mlx4_en, branch main</title>
<subtitle>FreeBSD source tree</subtitle>
<link rel='alternate' type='text/html' href='http://cgit.freebsd.org/src/'/>
<entry>
<title>roundup_pow_of_two: don't take the log of it</title>
<updated>2024-09-28T17:00:06+00:00</updated>
<author>
<name>Doug Moore</name>
<email>dougm@FreeBSD.org</email>
</author>
<published>2024-09-28T17:00:06+00:00</published>
<link rel='alternate' type='text/html' href='http://cgit.freebsd.org/src/commit/?id=c44fbfdb56862c4c8d2563483b4fff8f9a5a1d43'/>
<id>c44fbfdb56862c4c8d2563483b4fff8f9a5a1d43</id>
<content type='text'>
Based on the definitions, ilog2(roundup_pow_of_two(x)) ==
order_base_2(x). Replace the former with the latter in a few places to
save a few calculations.

Reviewed by:	bz, kib
Differential Revision:	https://reviews.freebsd.org/D46827
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Based on the definitions, ilog2(roundup_pow_of_two(x)) ==
order_base_2(x). Replace the former with the latter in a few places to
save a few calculations.

Reviewed by:	bz, kib
Differential Revision:	https://reviews.freebsd.org/D46827
</pre>
</div>
</content>
</entry>
<entry>
<title>net: Remove unneeded NULL check for the allocated ifnet</title>
<updated>2024-06-28T10:16:29+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=aa3860851b9f6a6002d135b1cac7736e0995eedc'/>
<id>aa3860851b9f6a6002d135b1cac7736e0995eedc</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
</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
</pre>
</div>
</content>
</entry>
<entry>
<title>mlx4, mlx5: Eliminate redundent NULL check for packet filter</title>
<updated>2024-05-28T04:46:04+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=2439ae948352766f6b993c5103a4c516376bec28'/>
<id>2439ae948352766f6b993c5103a4c516376bec28</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
</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
</pre>
</div>
</content>
</entry>
<entry>
<title>linuxkpi: spinlock: Simplify code</title>
<updated>2024-05-16T07:39:36+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=ae38a1a1bfdf320089c254e4dbffdf4769d89110'/>
<id>ae38a1a1bfdf320089c254e4dbffdf4769d89110</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
</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
</pre>
</div>
</content>
</entry>
<entry>
<title>mlx4(5): fix driver initialization</title>
<updated>2023-12-23T20:53:02+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=553ed8e38bfdd4832deecdec1c0b023824dcff94'/>
<id>553ed8e38bfdd4832deecdec1c0b023824dcff94</id>
<content type='text'>
After netlinkification, ether_ifattach() requires ifmedia_init() to be
done before it.

PR:	275897
MFC after:	1 week
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
After netlinkification, ether_ifattach() requires ifmedia_init() to be
done before it.

PR:	275897
MFC after:	1 week
</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>
</feed>
