[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <556C8244.1090400@gmail.com>
Date: Tue, 02 Jun 2015 01:03:16 +0900
From: Toshiaki Makita <toshiaki.makita1@...il.com>
To: Eric Dumazet <eric.dumazet@...il.com>,
Toshiaki Makita <makita.toshiaki@....ntt.co.jp>
CC: "David S . Miller" <davem@...emloft.net>,
Patrick McHardy <kaber@...sh.net>, netdev@...r.kernel.org
Subject: Re: [PATCH v2 net-next] vlan: Add GRO support for non hardware accelerated
vlan
On 15/06/01 (月) 23:12, Eric Dumazet wrote:
> On Mon, 2015-06-01 at 21:55 +0900, Toshiaki Makita wrote:
>
>> @@ -668,6 +753,9 @@ static int __init vlan_proto_init(void)
>> if (err < 0)
>> goto err5;
>>
>> + for (i = 0; i < ARRAY_SIZE(vlan_packet_offloads); i++)
>> + dev_add_offload(&vlan_packet_offloads[i]);
>> +
>> vlan_ioctl_set(vlan_ioctl_handler);
>> return 0;
>
> My concern about this is :
>
> This might slow down GRO stack for other traffic, if dev_add_offload()
> for vlan offloads is called after
> dev_add_offload(&ip_packet_offload) /
> dev_add_offload(&ipv6_packet_offload)
I didn't have that concern because there are already other similar
offloads (eth, mpls_uc, mpls_mc). But indeed, they and this could slow
down GRO stack.
>
>
> This is because list_add_rcu is used and this inserts in front of the
> offload_base list.
>
> void dev_add_offload(struct packet_offload *po)
> {
> struct list_head *head = &offload_base;
>
> spin_lock(&offload_lock);
> list_add_rcu(&po->list, head);
> spin_unlock(&offload_lock);
> }
>
> Can we ensure offload_base contains a sensible order of expected types ?
Add priority to packet_offload like nf_hook_ops?
Or have dev_add_offload() prioritize IP > IPV6 > others?
Toshiaki Makita
--
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Powered by blists - more mailing lists