Physical addressing mode is a Scalable Packet Buffer Mode that also allows Onload stacks to use large amounts of packet buffer memory (avoiding the limitations of the address translation table on the adapter), but without the requirement to configure and use SR-IOV virtual functions.
Important: Physical addressing mode removes memory protection from all
access to packet buffers by the network adapter (although IOMMU protection can still be
in place). Unprivileged user-level code is provided and directly handles the raw
physical memory addresses of packets buffers. User-level code provides physical memory
addresses directly to the adapter and therefore has the ability to direct the adapter to
read or write arbitrary memory locations. A result of this is that a malicious or buggy
application can compromise system integrity and security.
Onload has a limit of 2 million packet buffers.
To enable physical addressing mode:
- Put the following option into a user-created .conf file in the /etc/modprobe.d directory:
options onload phys_mode_gid=<n>The value of <n> sets who can use physical addressing mode:
- -2
- Physical addressing mode is disabled.
- -1
- All users can use physical addressing mode.
- Integer x
- Users in the group with gid=x can use physical addressing mode.
- Reload the Onload kernel
drivers:
# onload_tool reload - For the change to persist across reboots, update the initramfs. For
example:
dracut -f - Enable the Onload environment using
EF_PACKET_BUFFER_MODE 2.
Refer to Parameter Reference for a complete description of all EF_PACKET_BUFFER_MODE options.