diff options
| author | Huacai Chen <chenhuacai@loongson.cn> | 2025-08-02 11:07:06 +0800 |
|---|---|---|
| committer | Huacai Chen <chenhuacai@loongson.cn> | 2025-08-02 11:07:06 +0800 |
| commit | 0a91336e287ca2557fead5221d2c79e0effd034e (patch) | |
| tree | 3acfb76800d995a06e2a6932d683e67ecb1c5590 /drivers/net/netkit.c | |
| parent | 038d61fd642278bab63ee8ef722c50d10ab01e8f (diff) | |
| parent | cd7c97f4584a93578f87ea6ff427f74e9a943cdf (diff) | |
Merge tag 'bpf-next-6.17' into loongarch-next
LoongArch architecture changes for 6.17 have many bpf features such as
trampoline, so merge 'bpf-next-6.17' to create a base to make bpf work
well.
Diffstat (limited to 'drivers/net/netkit.c')
| -rw-r--r-- | drivers/net/netkit.c | 10 |
1 files changed, 4 insertions, 6 deletions
diff --git a/drivers/net/netkit.c b/drivers/net/netkit.c index d072a7968f56..492be60f2e70 100644 --- a/drivers/net/netkit.c +++ b/drivers/net/netkit.c @@ -32,7 +32,6 @@ struct netkit { struct netkit_link { struct bpf_link link; struct net_device *dev; - u32 location; }; static __always_inline int @@ -733,8 +732,8 @@ static void netkit_link_fdinfo(const struct bpf_link *link, struct seq_file *seq seq_printf(seq, "ifindex:\t%u\n", ifindex); seq_printf(seq, "attach_type:\t%u (%s)\n", - nkl->location, - nkl->location == BPF_NETKIT_PRIMARY ? "primary" : "peer"); + link->attach_type, + link->attach_type == BPF_NETKIT_PRIMARY ? "primary" : "peer"); } static int netkit_link_fill_info(const struct bpf_link *link, @@ -749,7 +748,7 @@ static int netkit_link_fill_info(const struct bpf_link *link, rtnl_unlock(); info->netkit.ifindex = ifindex; - info->netkit.attach_type = nkl->location; + info->netkit.attach_type = link->attach_type; return 0; } @@ -775,8 +774,7 @@ static int netkit_link_init(struct netkit_link *nkl, struct bpf_prog *prog) { bpf_link_init(&nkl->link, BPF_LINK_TYPE_NETKIT, - &netkit_link_lops, prog); - nkl->location = attr->link_create.attach_type; + &netkit_link_lops, prog, attr->link_create.attach_type); nkl->dev = dev; return bpf_link_prime(&nkl->link, link_primer); } |
