mvebu: cannot load XDP

Jakov Petrina jakov.petrina at sartura.hr
Thu Jun 25 15:03:54 EDT 2020


Hi Deng,

On 25/06/2020 20:32, DENG Qingfang wrote:
> Commit 76f9aa6f4bfd12fba34fc44aef890c48d4fb1024 should backport
> support for mvneta XDP, but I can't load it.
> 
> # ip link set dev eth0 xdp obj /tmp/bpf.o sec xdp1
> RTNETLINK answers: Not supported
> 
> strace output:
> 
<snip>
> recvmsg(3, {msg_name={sa_family=AF_NETLINK, nl_pid=0,
> nl_groups=00000000}, msg_namelen=12, msg_iov=[{iov_base={{len=132,
> type=NLMSG_ERROR, flags=NLM_F_ACK_TLVS, seq=1593109321, pid=8909},
> {error=-EOPNOTSUPP, msg={{len=52, type=RTM_NEWLINK,
> flags=NLM_F_REQUEST|NLM_F_ACK, seq=1593109321, pid=0},
> {ifi_family=AF_UNSPEC, ifi_type=ARPHRD_NETROM,
> ifi_index=if_nametoindex("eth0"), ifi_flags=0, ifi_change=0},
> {{nla_len=20, nla_type=IFLA_XDP}, [{{nla_len=8, nla_type=IFLA_XDP_FD},
> 5}, {{nla_len=8, nla_type=IFLA_XDP_FLAGS},
> XDP_FLAGS_UPDATE_IF_NOEXIST}]}}, {{nla_len=60,
> nla_type=NLMSGERR_ATTR_MSG}, "mvneta: Hardware Buffer Manageme"...}}},
> iov_len=32768}], msg_iovlen=1, msg_controllen=0, msg_flags=0}, 0) =
> 132

The rest of this output is due to upstream commit:

     79572c98c554d mvneta driver disallow XDP program on hardware buffer 
management

This check has not yet been reverted in mainline, so it would appear 
that XDP support in the mvneta driver is still limited to software 
buffer management only [1].

[1] https://www.spinics.net/lists/netdev/msg626999.html

There seems to be a `CONFIG_MVNETA_BM` kernel option which might be 
relevant for you.

> writev(2, [{iov_base="RTNETLINK answers: Not supported"...,
> iov_len=33}, {iov_base=NULL, iov_len=0}], 2RTNETLINK answers: Not
> supported
> ) = 33
> exit_group(2)                           = ?
> +++ exited with 2 +++
> 
> xdpgeneric works fine.
> 

Regards,

-- 
Jakov Petrina



More information about the openwrt-devel mailing list