<feed xmlns='http://www.w3.org/2005/Atom'>
<title>src/sys/dev/ena/ena_netmap.c, branch releng/14.2</title>
<subtitle>FreeBSD source tree</subtitle>
<link rel='alternate' type='text/html' href='http://cgit.freebsd.org/src/'/>
<entry>
<title>ena: Clear NS_MOREFRAG flag for last netmap slot</title>
<updated>2024-10-31T14:54:11+00:00</updated>
<author>
<name>Osama Abboud</name>
<email>osamaabb@amazon.com</email>
</author>
<published>2024-08-07T06:24:21+00:00</published>
<link rel='alternate' type='text/html' href='http://cgit.freebsd.org/src/commit/?id=8b43095ad8cdddfd0cdb11bb6e14aea60e607b5d'/>
<id>8b43095ad8cdddfd0cdb11bb6e14aea60e607b5d</id>
<content type='text'>
When processing packets within the rx-flow
ena_netmap_rx_load_desc doesn't know the number of descriptors, so it
sets NS_MOREFRAG to all the slots to indicate that there are more
fragments for this packet.
The code calls ena_netmap_rx_load_desc() for every descriptor in
this packet to map the relevant buffer into the netmap shared memory.
After ena_netmap_rx_load_desc() calls, we need to unset the NS_MOREFRAG
for the last fragment to indicate that this is the last fragment,
so we explicitly turn off NS_MOREFRAG flag.
Current code overrides all other flags and sets NS_BUF_CHANGED.
This patch unsets the relevant flag only.

Approved by: cperciva (mentor)
Sponsored by: Amazon, Inc.

(cherry picked from commit 2f17afd19a3534dc1755c52edb0c2f70ea0eb1e4)
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
When processing packets within the rx-flow
ena_netmap_rx_load_desc doesn't know the number of descriptors, so it
sets NS_MOREFRAG to all the slots to indicate that there are more
fragments for this packet.
The code calls ena_netmap_rx_load_desc() for every descriptor in
this packet to map the relevant buffer into the netmap shared memory.
After ena_netmap_rx_load_desc() calls, we need to unset the NS_MOREFRAG
for the last fragment to indicate that this is the last fragment,
so we explicitly turn off NS_MOREFRAG flag.
Current code overrides all other flags and sets NS_BUF_CHANGED.
This patch unsets the relevant flag only.

Approved by: cperciva (mentor)
Sponsored by: Amazon, Inc.

(cherry picked from commit 2f17afd19a3534dc1755c52edb0c2f70ea0eb1e4)
</pre>
</div>
</content>
</entry>
<entry>
<title>ena: Handle wrap around for prefetch in netmap</title>
<updated>2024-10-31T14:54:11+00:00</updated>
<author>
<name>Osama Abboud</name>
<email>osamaabb@amazon.com</email>
</author>
<published>2024-08-07T06:24:20+00:00</published>
<link rel='alternate' type='text/html' href='http://cgit.freebsd.org/src/commit/?id=b0830d2b6bbc76fcbfe937f674e06e14933ad3ef'/>
<id>b0830d2b6bbc76fcbfe937f674e06e14933ad3ef</id>
<content type='text'>
Netmap index wraps around based on the number of netmap kernel ring
slots.
Currently the driver prefetches the next slot using nm_i + 1 which may
be wrong since it does not handle wrap around.
This patch fixes that by using the kernel API for fetching the next
netmap index.

Approved by: cperciva (mentor)
Sponsored by: Amazon, Inc.

(cherry picked from commit ce20b51cb71bfb548fcaafc4bacb8290460f03d5)
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Netmap index wraps around based on the number of netmap kernel ring
slots.
Currently the driver prefetches the next slot using nm_i + 1 which may
be wrong since it does not handle wrap around.
This patch fixes that by using the kernel API for fetching the next
netmap index.

Approved by: cperciva (mentor)
Sponsored by: Amazon, Inc.

(cherry picked from commit ce20b51cb71bfb548fcaafc4bacb8290460f03d5)
</pre>
</div>
</content>
</entry>
<entry>
<title>ena: Properly unmap last socket chain in netmap</title>
<updated>2024-10-31T14:54:11+00:00</updated>
<author>
<name>Osama Abboud</name>
<email>osamaabb@amazon.com</email>
</author>
<published>2024-08-07T06:24:20+00:00</published>
<link rel='alternate' type='text/html' href='http://cgit.freebsd.org/src/commit/?id=b47eb2848ad8537c5213b036e81f1c8f9dd81a25'/>
<id>b47eb2848ad8537c5213b036e81f1c8f9dd81a25</id>
<content type='text'>
In case ena_com_prepare_tx() fails within the netmap tx flow,
the driver will unmap the last socket chain.
Currently, the driver unmaps the wrong socket within
ena_netmap_unmap_last_socket_chain().

Illustration of the flow:

1- ena_netmap_tx_frames()
2- ena_netmap_tx_frame()
3- ena_netmap_tx_map_slots()
3.1- Map slot
3.2- Advance to the next socket
4- ena_com_prepare_tx()
4.1- ena_com_prepare_tx() fails
5- ena_netmap_unmap_last_socket_chain()

In step 5, where the driver unmaps the socket, the netmap
index already points at the next entry, meaning we're unmapping the
wrong socket in case ena_com_prepare_tx() fails.
In order to fix that, the driver should first update the netmap index to
point at the previous entry and only then update the socket parameters.

Approved by: cperciva (mentor)
Sponsored by: Amazon, Inc.

(cherry picked from commit f236e544a2ff685ae151f3232e3785a6a9aab035)
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
In case ena_com_prepare_tx() fails within the netmap tx flow,
the driver will unmap the last socket chain.
Currently, the driver unmaps the wrong socket within
ena_netmap_unmap_last_socket_chain().

Illustration of the flow:

1- ena_netmap_tx_frames()
2- ena_netmap_tx_frame()
3- ena_netmap_tx_map_slots()
3.1- Map slot
3.2- Advance to the next socket
4- ena_com_prepare_tx()
4.1- ena_com_prepare_tx() fails
5- ena_netmap_unmap_last_socket_chain()

In step 5, where the driver unmaps the socket, the netmap
index already points at the next entry, meaning we're unmapping the
wrong socket in case ena_com_prepare_tx() fails.
In order to fix that, the driver should first update the netmap index to
point at the previous entry and only then update the socket parameters.

Approved by: cperciva (mentor)
Sponsored by: Amazon, Inc.

(cherry picked from commit f236e544a2ff685ae151f3232e3785a6a9aab035)
</pre>
</div>
</content>
</entry>
<entry>
<title>ena: Add reset reason for corrupted RX cdescs</title>
<updated>2024-10-31T14:54:10+00:00</updated>
<author>
<name>Osama Abboud</name>
<email>osamaabb@amazon.com</email>
</author>
<published>2024-08-07T06:24:19+00:00</published>
<link rel='alternate' type='text/html' href='http://cgit.freebsd.org/src/commit/?id=e445e3afde09d931cdfef0cbf45f23aa8556537d'/>
<id>e445e3afde09d931cdfef0cbf45f23aa8556537d</id>
<content type='text'>
RX completion descriptors may sometimes contain errors due
to corruption. Upon identifying such a case, the driver will
trigger a reset with an explicit reset reason
ENA_REGS_RESET_RX_DESCRIPTOR_MALFORMED.

Approved by: cperciva (mentor)
Sponsored by: Amazon, Inc.

(cherry picked from commit 4af71159db3cd4a37055b2b3d982ec53703c5c3d)
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
RX completion descriptors may sometimes contain errors due
to corruption. Upon identifying such a case, the driver will
trigger a reset with an explicit reset reason
ENA_REGS_RESET_RX_DESCRIPTOR_MALFORMED.

Approved by: cperciva (mentor)
Sponsored by: Amazon, Inc.

(cherry picked from commit 4af71159db3cd4a37055b2b3d982ec53703c5c3d)
</pre>
</div>
</content>
</entry>
<entry>
<title>ena: Add reset reason for corrupted TX cdescs</title>
<updated>2024-10-31T14:54:10+00:00</updated>
<author>
<name>Osama Abboud</name>
<email>osamaabb@amazon.com</email>
</author>
<published>2024-08-07T06:24:19+00:00</published>
<link rel='alternate' type='text/html' href='http://cgit.freebsd.org/src/commit/?id=189bc23fd0e4ddc0485dd52b2925728d321ab8ec'/>
<id>189bc23fd0e4ddc0485dd52b2925728d321ab8ec</id>
<content type='text'>
TX completion descriptors may sometimes contain errors due
to corruption. Upon identifying such a case, the driver will
trigger a reset with an explicit reset reason
ENA_REGS_RESET_TX_DESCRIPTOR_MALFORMED.

Approved by: cperciva (mentor)
Sponsored by: Amazon, Inc.

(cherry picked from commit 38727218460008a500fbc18f08c90082ed678895)
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
TX completion descriptors may sometimes contain errors due
to corruption. Upon identifying such a case, the driver will
trigger a reset with an explicit reset reason
ENA_REGS_RESET_TX_DESCRIPTOR_MALFORMED.

Approved by: cperciva (mentor)
Sponsored by: Amazon, Inc.

(cherry picked from commit 38727218460008a500fbc18f08c90082ed678895)
</pre>
</div>
</content>
</entry>
<entry>
<title>ena: Update license signatures to 2024</title>
<updated>2024-10-31T14:54:10+00:00</updated>
<author>
<name>Osama Abboud</name>
<email>osamaabb@amazon.com</email>
</author>
<published>2024-08-07T06:24:18+00:00</published>
<link rel='alternate' type='text/html' href='http://cgit.freebsd.org/src/commit/?id=b1718de62f16b203fcaef236d5699a4aba90d003'/>
<id>b1718de62f16b203fcaef236d5699a4aba90d003</id>
<content type='text'>
This commit updates all the license signatures to 2024.

Approved by: cperciva (mentor)
Sponsored by: Amazon, Inc.

(cherry picked from commit 8d6806cd08c093fc001db1f94cf122368b8d1549)
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
This commit updates all the license signatures to 2024.

Approved by: cperciva (mentor)
Sponsored by: Amazon, Inc.

(cherry picked from commit 8d6806cd08c093fc001db1f94cf122368b8d1549)
</pre>
</div>
</content>
</entry>
<entry>
<title>ena: Update the license dating to 2023</title>
<updated>2024-01-14T21:18:11+00:00</updated>
<author>
<name>Osama Abboud</name>
<email>osamaabb@amazon.com</email>
</author>
<published>2023-10-23T17:16:38+00:00</published>
<link rel='alternate' type='text/html' href='http://cgit.freebsd.org/src/commit/?id=eb29118a2fe523d5f7abd804274a47e37f4c3b1e'/>
<id>eb29118a2fe523d5f7abd804274a47e37f4c3b1e</id>
<content type='text'>
Some of the files are using outdated linceses.
Update the license to be 2023.

Approved by: cperciva (mentor)
MFC after: 2 weeks
Sponsored by: Amazon, Inc.

(cherry picked from commit 246aa273244e91a30d70997a3be790a29f9eb29c)
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Some of the files are using outdated linceses.
Update the license to be 2023.

Approved by: cperciva (mentor)
MFC after: 2 weeks
Sponsored by: Amazon, Inc.

(cherry picked from commit 246aa273244e91a30d70997a3be790a29f9eb29c)
</pre>
</div>
</content>
</entry>
<entry>
<title>ena: Remove CQ tail pointer update API</title>
<updated>2024-01-14T21:18:10+00:00</updated>
<author>
<name>Osama Abboud</name>
<email>osamaabb@amazon.com</email>
</author>
<published>2023-09-11T08:43:08+00:00</published>
<link rel='alternate' type='text/html' href='http://cgit.freebsd.org/src/commit/?id=9d773b0d5f56268ce7fc2fc60d8d551963de8f36'/>
<id>9d773b0d5f56268ce7fc2fc60d8d551963de8f36</id>
<content type='text'>
This commit removes the usage of this API from the freebsd driver since
the relevant functionality is not supported by the device.

Approved by: cperciva (mentor)
MFC after: 2 weeks
Sponsored by: Amazon, Inc.

(cherry picked from commit 2835752e075f2fa3edcb596df8306c570ec4cae6)
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
This commit removes the usage of this API from the freebsd driver since
the relevant functionality is not supported by the device.

Approved by: cperciva (mentor)
MFC after: 2 weeks
Sponsored by: Amazon, Inc.

(cherry picked from commit 2835752e075f2fa3edcb596df8306c570ec4cae6)
</pre>
</div>
</content>
</entry>
<entry>
<title>sys: Remove $FreeBSD$: one-line .c pattern</title>
<updated>2023-08-16T17:54:36+00:00</updated>
<author>
<name>Warner Losh</name>
<email>imp@FreeBSD.org</email>
</author>
<published>2023-08-16T17:54:36+00:00</published>
<link rel='alternate' type='text/html' href='http://cgit.freebsd.org/src/commit/?id=685dc743dc3b5645e34836464128e1c0558b404b'/>
<id>685dc743dc3b5645e34836464128e1c0558b404b</id>
<content type='text'>
Remove /^[\s*]*__FBSDID\("\$FreeBSD\$"\);?\s*\n/
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Remove /^[\s*]*__FBSDID\("\$FreeBSD\$"\);?\s*\n/
</pre>
</div>
</content>
</entry>
<entry>
<title>Mechanically convert ena(4) to DrvAPI</title>
<updated>2023-01-13T16:09:17+00:00</updated>
<author>
<name>Justin Hibbits</name>
<email>jhibbits@FreeBSD.org</email>
</author>
<published>2023-01-13T16:04:09+00:00</published>
<link rel='alternate' type='text/html' href='http://cgit.freebsd.org/src/commit/?id=7583c633e0aa5572715d1c792cdc505c2237e820'/>
<id>7583c633e0aa5572715d1c792cdc505c2237e820</id>
<content type='text'>
Reviewed by: mw
Differential Revision: https://reviews.freebsd.org/D37837
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Reviewed by: mw
Differential Revision: https://reviews.freebsd.org/D37837
</pre>
</div>
</content>
</entry>
</feed>
