Re: [PATCH bpf-next v3 2/3] selftests/bpf: make xdp_cpumap_attach keep redirect prog attached

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hello Martin,

On 10/11/24 03:23, Martin KaFai Lau wrote:
> On 10/9/24 3:12 AM, Alexis Lothoré (eBPF Foundation) wrote:
>> -    int err, prog_fd, map_fd;
>> +    int err, prog_fd, prog_redir_fd, map_fd;
>> +    struct nstoken *nstoken = NULL;
>>       __u32 idx = 0;
>>   +    SYS(out_close, "ip netns add %s", TEST_NS);
>> +    nstoken = open_netns(TEST_NS);
>> +    if (!ASSERT_OK_PTR(nstoken, "open_netns"))
>> +        goto out_close;
>> +    SYS(out_close, "ip link set dev lo up");
> 
> There is easier helper netns_{new,free} to do all these:
>     netns_obj = netns_new(TEST_NS, true);
> 
> Only fyi for your future work.

ACK, thanks !


-- 
Alexis Lothoré, Bootlin
Embedded Linux and Kernel engineering
https://bootlin.com




[Index of Archives]     [Linux Samsung SoC]     [Linux Rockchip SoC]     [Linux Actions SoC]     [Linux for Synopsys ARC Processors]     [Linux NFS]     [Linux NILFS]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]


  Powered by Linux