Page MenuHomeFreeBSD

Mock implementation of NETMAP support in ENA
ClosedPublic

Authored by mk_semihalf.com on Oct 8 2019, 8:20 AM.
Referenced Files
Unknown Object (File)
Thu, Nov 21, 3:38 PM
Unknown Object (File)
Thu, Nov 21, 12:56 PM
Unknown Object (File)
Sat, Nov 16, 6:07 PM
Unknown Object (File)
Sun, Nov 10, 8:37 PM
Unknown Object (File)
Wed, Oct 30, 6:03 PM
Unknown Object (File)
Oct 5 2024, 7:50 PM
Unknown Object (File)
Oct 5 2024, 9:35 AM
Unknown Object (File)
Sep 29 2024, 7:55 PM

Details

Summary

Mock implementation of NETMAP routines is located in ena_netmap.c/.h
files. All code is protected under the DEV_NETMAP macro. Makefile was
updated with files and flag.

As ENA driver provide own implementations of (un)likely it must be
undefined before including NETMAP headers.

ena_netmap_attach function is called on the end of NIC attach. It fills
structure with NIC configuration and callbacks. Then provides it to
netmap_attach. Similarly netmap_detach is called during ena_detach.

Three callbacks are used.
nm_register is implemented by ena_netmap_reg. It is called when user
space application open or close NIC in NETMAP mode. Current action is
recognized based on onoff parameter: true means on and false off. As
NICs rings need to be reconfigured ena_down and ena_up are reused.
When user space application wants to receive new packets from NIC
nm_rxsync is called, and when there are new packets ready for Tx
nm_txsync is called.

Submitted by: Rafal Kozik <rk@semihalf.com>

Michal Krawczyk <mk@semihalf.com>

Obtained from: Semihalf
Sponsored by: Amazon, Inc.

Diff Detail

Repository
rS FreeBSD src repository - subversion
Lint
Lint Not Applicable
Unit
Tests Not Applicable

Event Timeline

Adding netmap module dependency in this patch (it was added in the previous one by accident)

This revision was not accepted when it landed; it landed in state Needs Review.Oct 31 2019, 3:51 PM
Closed by commit rS354221: Introduce NETMAP support in ENA (authored by mw). · Explain Why
This revision was automatically updated to reflect the committed changes.