[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <20160904142753.3b5bc6a1@griffin>
Date: Sun, 4 Sep 2016 14:27:53 +0200
From: Jiri Benc <jbenc@...hat.com>
To: zyjzyj2000@...il.com
Cc: netdev@...r.kernel.org, pabeni@...hat.com, daniel@...earbox.net,
pshelar@...ira.com, aduyck@...antis.com,
hannes@...essinduktion.org, davem@...emloft.net
Subject: Re: [PATCH 1/1] vxlan: make the struct nlattr variable const
On Sat, 3 Sep 2016 22:07:10 +0800, zyjzyj2000@...il.com wrote:
> From: Zhu Yanjun <zyjzyj2000@...il.com>
>
> The struct nlattr variable should not be changed.
True. But the only caller is vxlan_fdb_parse which doesn't have its tb
parameter const, so what's the point?
Now, the tb parameter of vxlan_fdb_parse could be changed to const.
This again doesn't make much sense without modifying its callers, which
are vxlan_fdb_add and vxlan_fdb_delete. And those are net_device_ops
hooks. Have you considered looking into those (ndo_fdb_*) and turning
the struct nlattr ** to const (that is, if it's possible)?
Jiri
Powered by blists - more mailing lists