On Fri, Sep 22, 2017 at 1:48 PM, Petar Penkov wrote:
> On Fri, Sep 22, 2017 at 9:51 AM, Mahesh Bandewar (महेश बंडेवार)
> wrote:
>> On Fri, Sep 22, 2017 at 7:06 AM, Willem de Bruijn
>> wrote:
@@ -2061,6 +2174,9 @@ static int tun_set_iff(struct net *net, struct file
*file, struct ifreq
On Fri, Sep 22, 2017 at 9:51 AM, Mahesh Bandewar (महेश बंडेवार)
wrote:
> On Fri, Sep 22, 2017 at 7:06 AM, Willem de Bruijn
> wrote:
>>> @@ -2061,6 +2174,9 @@ static int tun_set_iff(struct net *net, struct file
>>> *file, struct ifreq *ifr)
>>> if (tfile->detached)
>>> ret
On Fri, Sep 22, 2017 at 7:06 AM, Willem de Bruijn
wrote:
>> @@ -2061,6 +2174,9 @@ static int tun_set_iff(struct net *net, struct file
>> *file, struct ifreq *ifr)
>> if (tfile->detached)
>> return -EINVAL;
>>
>> + if ((ifr->ifr_flags & IFF_NAPI_FRAGS) && !capable(CAP
> @@ -2061,6 +2174,9 @@ static int tun_set_iff(struct net *net, struct file
> *file, struct ifreq *ifr)
> if (tfile->detached)
> return -EINVAL;
>
> + if ((ifr->ifr_flags & IFF_NAPI_FRAGS) && !capable(CAP_NET_ADMIN))
> + return -EPERM;
> +
This should p
Add a TUN/TAP receive mode that exercises the napi_gro_frags()
interface. This mode is available only in TAP mode, as the interface
expects packets with Ethernet headers.
Furthermore, packets follow the layout of the iovec_iter that was
received. The first iovec is the linear data, and every one a