[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <b70fd32f-3b72-ea31-a33f-137b1ad1741d@gmail.com>
Date: Mon, 9 Mar 2020 20:18:16 -0600
From: David Ahern <dsahern@...il.com>
To: Jason Wang <jasowang@...hat.com>, David Ahern <dsahern@...nel.org>,
netdev@...r.kernel.org
Cc: davem@...emloft.net, kuba@...nel.org,
prashantbhole.linux@...il.com, brouer@...hat.com, toke@...hat.com,
mst@...hat.com, toshiaki.makita1@...il.com, daniel@...earbox.net,
john.fastabend@...il.com, ast@...nel.org, kafai@...com,
songliubraving@...com, yhs@...com, andriin@...com,
David Ahern <dahern@...italocean.com>
Subject: Re: [PATCH RFC v4 bpf-next 07/11] tun: set egress XDP program
On 3/1/20 8:32 PM, Jason Wang wrote:
>> @@ -1189,15 +1190,21 @@ tun_net_get_stats64(struct net_device *dev,
>> struct rtnl_link_stats64 *stats)
>> }
>> static int tun_xdp_set(struct net_device *dev, struct bpf_prog *prog,
>> - struct netlink_ext_ack *extack)
>
>
> How about accept a bpf_prog ** here, then there's no need to check
> egress when deferencing the pointer?
>
>
The egress arg is better. xdp_prog vs xdp_egress_prog is an element of
'struct tun'. tun is currently not needed in tun_xdp and is part of
tun_xdp_set already.
Powered by blists - more mailing lists