[ovs-git] [openvswitch/ovs] 53c0bd: netdev-afxdp: Update memory locking limits uncondi...

Ilya Maximets noreply at github.com
Thu Oct 10 18:28:41 UTC 2019


  Branch: refs/heads/master
  Home:   https://github.com/openvswitch/ovs
  Commit: 53c0bd5de496f54f9ce85ace4b67b3dee59b0ed3
      https://github.com/openvswitch/ovs/commit/53c0bd5de496f54f9ce85ace4b67b3dee59b0ed3
  Author: Ilya Maximets <i.maximets at ovn.org>
  Date:   2019-10-10 (Thu, 10 Oct 2019)

  Changed paths:
    M lib/netdev-afxdp.c

  Log Message:
  -----------
  netdev-afxdp: Update memory locking limits unconditionally.

Any type of AF_XDP socket in all modes implies creation of BPF map of
type BPF_MAP_TYPE_XSKMAP.  This leads to BPF_MAP_CREATE syscall and
subsequently 'xsk_map_alloc()' function that will charge required
memory from the memlock limit and fail with EPERM if we're trying
to allocate more.

On my system with 64K bytes of max locked memory by default, OVS
frequently starts to fail after addition of 3rd afxdp port in SKB
mode:

  netdev_afxdp|ERR|xsk_socket__create failed (Operation not permitted)
                   mode: SKB qid: 0

Fixes: 0de1b425962d ("netdev-afxdp: add new netdev type for AF_XDP.")
Signed-off-by: Ilya Maximets <i.maximets at ovn.org>
Signed-off-by: William Tu <u9012063 at gmail.com>




More information about the git mailing list