Home
last modified time | relevance | path

Searched hist:f9c9c01de87e0440380b939c684d9939d48ce175 (Results 1 – 1 of 1) sorted by relevance

/freebsd/sys/dev/ena/
H A Dena.cdiff f9c9c01de87e0440380b939c684d9939d48ce175 Wed Aug 07 08:24:21 CEST 2024 Osama Abboud <osamaabb@amazon.com> ena: Reinit netmap adapter struct upon sysctl changes

When attaching ENA driver, ena_netmap_attach() is invoked which, in turn
calls netmap_attach which, initializes a struct netmap_adapter,
allocating the struct's netmap_ring and the struct selinfo.

When we change the interface number of queues we need to reinit the
netmap adapter struct as well, so we need to detach it in order to free
the memory allocated by netmap_attach and allocate new memory based on
the new parameters like number of rings, ring size etc...

Without detaching and attaching the netmap interface, if we're to change
the number of queues from 8 to 2 for example and try to enable netmap,
the kernel will panic since the original netmap struct within the
kernel's possession still thinks that the driver has 8 queues which will
eventually cause a non-allocated virtual address access fault.

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