<feed xmlns='http://www.w3.org/2005/Atom'>
<title>src/sys/dev/mlx4, branch stable/13</title>
<subtitle>FreeBSD source tree</subtitle>
<link rel='alternate' type='text/html' href='http://cgit.freebsd.org/src/'/>
<entry>
<title>mlx4ib(4): Fix some typos in device messages</title>
<updated>2025-02-10T06:56:05+00:00</updated>
<author>
<name>Gordon Bergling</name>
<email>gbe@FreeBSD.org</email>
</author>
<published>2025-02-05T10:31:12+00:00</published>
<link rel='alternate' type='text/html' href='http://cgit.freebsd.org/src/commit/?id=d9c36c812b5bb03759bc0b3f4a3cb0e16ea5d98d'/>
<id>d9c36c812b5bb03759bc0b3f4a3cb0e16ea5d98d</id>
<content type='text'>
- s/availible/available/

(cherry picked from commit 84e3ffac12a8dcfeae0a5e0b25afe447ff2d5fa8)
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
- s/availible/available/

(cherry picked from commit 84e3ffac12a8dcfeae0a5e0b25afe447ff2d5fa8)
</pre>
</div>
</content>
</entry>
<entry>
<title>net: Remove unneeded NULL check for the allocated ifnet</title>
<updated>2024-10-08T10:07:18+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=f500e5c6c99bd4520daa4524113462e3cf68f032'/>
<id>f500e5c6c99bd4520daa4524113462e3cf68f032</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

MFC note: This is only a partial MFC, as some drivers do not exist in
stable/13 branch. The if_epair(4) drifts too much from stable/14 so not
included in this MFC.

(cherry picked from commit aa3860851b9f6a6002d135b1cac7736e0995eedc)
(cherry picked from commit 6b1f530935c5f84ec65dad87b7c20c6b7a72a6d3)
</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

MFC note: This is only a partial MFC, as some drivers do not exist in
stable/13 branch. The if_epair(4) drifts too much from stable/14 so not
included in this MFC.

(cherry picked from commit aa3860851b9f6a6002d135b1cac7736e0995eedc)
(cherry picked from commit 6b1f530935c5f84ec65dad87b7c20c6b7a72a6d3)
</pre>
</div>
</content>
</entry>
<entry>
<title>mlx4, mlx5: Eliminate redundent NULL check for packet filter</title>
<updated>2024-06-05T04:44:22+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=ff4b8d51ac72b426618c7c7ea438c5e2c7586fb6'/>
<id>ff4b8d51ac72b426618c7c7ea438c5e2c7586fb6</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)
(cherry picked from commit d98ced6588b522e8833888bc99b7b9468312b221)
</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)
(cherry picked from commit d98ced6588b522e8833888bc99b7b9468312b221)
</pre>
</div>
</content>
</entry>
<entry>
<title>mlx4: purge EOL release compatibility</title>
<updated>2023-04-30T06:56:20+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=517ccb7c8061ace6565fb27f8f0de7bb9305e853'/>
<id>517ccb7c8061ace6565fb27f8f0de7bb9305e853</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

(cherry picked from commit 026babd427e6511e53478814ce0aa1cc3f7a9988)
</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

(cherry picked from commit 026babd427e6511e53478814ce0aa1cc3f7a9988)
</pre>
</div>
</content>
</entry>
<entry>
<title>mlx4core: Use-after-free causes a resource leak in flow-steering detach</title>
<updated>2022-06-14T09:39:23+00:00</updated>
<author>
<name>Hans Petter Selasky</name>
<email>hselasky@FreeBSD.org</email>
</author>
<published>2022-06-07T14:27:53+00:00</published>
<link rel='alternate' type='text/html' href='http://cgit.freebsd.org/src/commit/?id=be3f667388f42ac4bf4d7eaac0b3fef5dee86eac'/>
<id>be3f667388f42ac4bf4d7eaac0b3fef5dee86eac</id>
<content type='text'>
mlx4_QP_FLOW_STEERING_DETACH_wrapper first removes the steering
rule (which results in freeing the rule structure), and then
references a field in this struct (the qp number) when releasing the
busy-status on the rule's qp.

Since this memory was freed, it could reallocated and changed.
Therefore, the qp number in the struct may be incorrect,
so that we are releasing the incorrect qp. This leaves the rule's qp
in the busy state (and could possibly release an incorrect qp as well).

Fix this by saving the qp number in a local variable, for use after
removing the steering rule.

Linux commit:
3b01fe7f91c8e4f9afc4fae3c5af72c14958d2d8

PR:	     	264469
Sponsored by:	NVIDIA Networking

(cherry picked from commit dd2a8c8f72d369440c36f10512324d42ecedb5c7)
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
mlx4_QP_FLOW_STEERING_DETACH_wrapper first removes the steering
rule (which results in freeing the rule structure), and then
references a field in this struct (the qp number) when releasing the
busy-status on the rule's qp.

Since this memory was freed, it could reallocated and changed.
Therefore, the qp number in the struct may be incorrect,
so that we are releasing the incorrect qp. This leaves the rule's qp
in the busy state (and could possibly release an incorrect qp as well).

Fix this by saving the qp number in a local variable, for use after
removing the steering rule.

Linux commit:
3b01fe7f91c8e4f9afc4fae3c5af72c14958d2d8

PR:	     	264469
Sponsored by:	NVIDIA Networking

(cherry picked from commit dd2a8c8f72d369440c36f10512324d42ecedb5c7)
</pre>
</div>
</content>
</entry>
<entry>
<title>mlx4core: Fix a memory leak when deleting slave's resources</title>
<updated>2022-06-07T06:44:29+00:00</updated>
<author>
<name>Hans Petter Selasky</name>
<email>hselasky@FreeBSD.org</email>
</author>
<published>2022-05-30T18:11:50+00:00</published>
<link rel='alternate' type='text/html' href='http://cgit.freebsd.org/src/commit/?id=d264494e983ac964dc5cb8a2e51cddbb9d6c3631'/>
<id>d264494e983ac964dc5cb8a2e51cddbb9d6c3631</id>
<content type='text'>
mlx4_delete_all_resources_for_slave() in the resource tracker should free
all memory allocated for a slave. While releasing memory of fs_rule,
it misses releasing memory of fs_rule-&gt;mirr_mbox.

Linux commit:
461d5f1b59490ce0096dfda45e10038c122a7892

PR:		264249
Sponsored by:	NVIDIA Networking

(cherry picked from commit f29c9901a41fb650d46fd48f4880a894f54aa737)
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
mlx4_delete_all_resources_for_slave() in the resource tracker should free
all memory allocated for a slave. While releasing memory of fs_rule,
it misses releasing memory of fs_rule-&gt;mirr_mbox.

Linux commit:
461d5f1b59490ce0096dfda45e10038c122a7892

PR:		264249
Sponsored by:	NVIDIA Networking

(cherry picked from commit f29c9901a41fb650d46fd48f4880a894f54aa737)
</pre>
</div>
</content>
</entry>
<entry>
<title>mlx4: Fix a memory leak bug.</title>
<updated>2022-06-07T06:44:28+00:00</updated>
<author>
<name>Hans Petter Selasky</name>
<email>hselasky@FreeBSD.org</email>
</author>
<published>2022-05-19T08:10:48+00:00</published>
<link rel='alternate' type='text/html' href='http://cgit.freebsd.org/src/commit/?id=267e6442d049939cd9c8ab5e3b0134deace39e66'/>
<id>267e6442d049939cd9c8ab5e3b0134deace39e66</id>
<content type='text'>
In function mlx4_opreq_action(), pointer "mailbox" is not released,
when mlx4_cmd_box() return and error, causing a memory leak bug.
Fix this issue by going to "out" label, mlx4_free_cmd_mailbox() can
free this pointer.

Linux commit:
febfd9d3c7f74063e8e630b15413ca91b567f963

PR:		264056
Sponsored by:	NVIDIA Networking

(cherry picked from commit 527762b2f776381569bd662ce236d2845234c0a7)
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
In function mlx4_opreq_action(), pointer "mailbox" is not released,
when mlx4_cmd_box() return and error, causing a memory leak bug.
Fix this issue by going to "out" label, mlx4_free_cmd_mailbox() can
free this pointer.

Linux commit:
febfd9d3c7f74063e8e630b15413ca91b567f963

PR:		264056
Sponsored by:	NVIDIA Networking

(cherry picked from commit 527762b2f776381569bd662ce236d2845234c0a7)
</pre>
</div>
</content>
</entry>
<entry>
<title>mlx4en(4): Fix two in source code comments</title>
<updated>2022-04-09T06:13:30+00:00</updated>
<author>
<name>Gordon Bergling</name>
<email>gbe@FreeBSD.org</email>
</author>
<published>2022-04-02T11:33:05+00:00</published>
<link rel='alternate' type='text/html' href='http://cgit.freebsd.org/src/commit/?id=9c291363b2702795038c356fcc91f73cdcf92b0b'/>
<id>9c291363b2702795038c356fcc91f73cdcf92b0b</id>
<content type='text'>
- s/differnt/different/
- s/differntly/differently/

(cherry picked from commit 6039e38f93819050ef7627f16554c97830b98a32)
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
- s/differnt/different/
- s/differntly/differently/

(cherry picked from commit 6039e38f93819050ef7627f16554c97830b98a32)
</pre>
</div>
</content>
</entry>
<entry>
<title>mlx5/mlx4: Bump driver version to 3.7.1</title>
<updated>2022-03-09T20:05:39+00:00</updated>
<author>
<name>Hans Petter Selasky</name>
<email>hselasky@FreeBSD.org</email>
</author>
<published>2022-03-08T11:16:00+00:00</published>
<link rel='alternate' type='text/html' href='http://cgit.freebsd.org/src/commit/?id=053dcbc86e7c8d67057f484cc53950e429801d89'/>
<id>053dcbc86e7c8d67057f484cc53950e429801d89</id>
<content type='text'>
Sponsored by:	NVIDIA Networking

(cherry picked from commit b18c510844fb631ea571f7f3edad6372e91501fa)
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Sponsored by:	NVIDIA Networking

(cherry picked from commit b18c510844fb631ea571f7f3edad6372e91501fa)
</pre>
</div>
</content>
</entry>
<entry>
<title>mlx4: rename conflicting netdev_priv() to mlx4_netdev_priv()</title>
<updated>2021-11-19T00:01:26+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=378083e18812e0a3537887cbab5a51a573cde802'/>
<id>378083e18812e0a3537887cbab5a51a573cde802</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.

(cherry picked from commit 9d593d5a76f22a315d7c6ab99e5e76003ec2b3f5)
</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.

(cherry picked from commit 9d593d5a76f22a315d7c6ab99e5e76003ec2b3f5)
</pre>
</div>
</content>
</entry>
</feed>
