On Sat, 3 Sep 2016 22:07:10 +0800, zyjzyj2...@gmail.com wrote: > From: Zhu Yanjun <zyjzyj2...@gmail.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