]> git.baikalelectronics.ru Git - kernel.git/commit
geneve: move all configuration under struct geneve_config
authorSabrina Dubroca <sd@queasysnail.net>
Mon, 6 Jul 2020 15:18:08 +0000 (17:18 +0200)
committerDavid S. Miller <davem@davemloft.net>
Mon, 6 Jul 2020 20:16:20 +0000 (13:16 -0700)
commite591540444fdecae210927e1f1deb536b888a1a6
treeb846ac2baed230aecdfcab95730fde8a614f3d67
parent85908d7feb8ca6c9624e39a39940cbfd2c4150eb
geneve: move all configuration under struct geneve_config

This patch adds a new structure geneve_config and moves the per-device
configuration attributes to it, like we already have in VXLAN with
struct vxlan_config. This ends up being pretty invasive since those
attributes are used everywhere.

This allows us to clean up the argument lists for geneve_configure (4
arguments instead of 8) and geneve_nl2info (5 instead of 9).

This also reduces the copy-paste of code setting those attributes
between geneve_configure and geneve_changelink to a single memcpy,
which would have avoided the bug fixed in commit
324180b0a6d9 ("geneve: allow changing DF behavior after creation").

Signed-off-by: Sabrina Dubroca <sd@queasysnail.net>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/geneve.c