iproute版本太低无法加载ebpf obj文件,提示Error: either “dev“ is duplicate, or “xdpgeneric“ is a garbage.

iproute版本太低无法加载ebpf obj文件,执行ip link set dev lo xdpgeneric obj xdp_pass_kern.o sec xdp提示Error: either "dev" is duplicate, or "xdpgeneric" is a garbage.

[root@localhost basic01-xdp-pass]# ip link set dev lo xdpgeneric obj xdp_pass_kern.o sec xdp
Error: either "dev" is duplicate, or "xdpgeneric" is a garbage.

可以安装一个高版本的iproute,本例加载iproute2-5.11.0使用。

[root@localhost basic01-xdp-pass]# yum whatprovides `which ip`
Loaded plugins: fastestmirror
Loading mirror speeds from cached hostfile
 * base: mirrors.njupt.edu.cn
 * elrepo: reflector.westga.edu
 * extras: mirrors.njupt.edu.cn
 * updates: mirrors.aliyun.com
iproute-4.11.0-30.el7.x86_64 : Advanced IP routing and network device configuration tools
Repo        : base
Matched from:
Filename    : /usr/sbin/ip



iproute-4.11.0-30.el7.x86_64 : Advanced IP routing and network device configuration tools
Repo        : @anaconda
Matched from:
Filename    : /usr/sbin/ip



[root@localhost basic01-xdp-pass]# module avail iproute
------------------------------------------------------------------------- /root/spack/share/spack/modules/linux-centos7-sandybridge -------------------------------------------------------------------------
iproute2-5.11.0-gcc-11.2.0-cwk2r6k

Key:
modulepath
[root@localhost basic01-xdp-pass]# module load iproute2-5.11.0-gcc-11.2.0-cwk2r6k
[root@localhost basic01-xdp-pass]# ip link set dev lo xdpgeneric obj xdp_pass_kern.o sec xdp
Continuing without mounted eBPF fs. Too old kernel?
[root@localhost basic01-xdp-pass]# ip link show dev lo
1: lo: <LOOPBACK,UP,LOWER_UP> mtu 65536 xdpgeneric qdisc noqueue state UNKNOWN mode DEFAULT group default qlen 1000
    link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00
    prog/xdp id 3 tag 3b185187f1855c4c

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 打赏
    打赏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包

打赏作者

王万林 Ben

你的鼓励将是我创作的最大动力

¥1 ¥2 ¥4 ¥6 ¥10 ¥20
扫码支付:¥1
获取中
扫码支付

您的余额不足,请更换扫码支付或充值

打赏作者

实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值