From: Greg Rose <[email protected]> Upstream commit cf124db566e6 ("net: Fix inconsistent teardown and release of private netdev state.") removed the destructor member of the net_device structure and replaced it with a boolean flag indicating that the net device resource needs freeing. Use compat flag HAVE_NEEDS_FREE_NETDEV to indicate whether the new flag should be used.
Signed-off-by: Greg Rose <[email protected]> Signed-off-by: Joe Stringer <[email protected]> --- datapath/linux/compat/lisp.c | 4 ++++ datapath/linux/compat/stt.c | 4 ++++ 2 files changed, 8 insertions(+) diff --git a/datapath/linux/compat/lisp.c b/datapath/linux/compat/lisp.c index 15f851de9ff4..c505fad83a14 100644 --- a/datapath/linux/compat/lisp.c +++ b/datapath/linux/compat/lisp.c @@ -580,7 +580,11 @@ static void lisp_setup(struct net_device *dev) dev->netdev_ops = &lisp_netdev_ops; dev->ethtool_ops = &lisp_ethtool_ops; +#ifndef HAVE_NEEDS_FREE_NETDEV dev->destructor = free_netdev; +#else + dev->needs_free_netdev = true; +#endif SET_NETDEV_DEVTYPE(dev, &lisp_type); diff --git a/datapath/linux/compat/stt.c b/datapath/linux/compat/stt.c index ca9f03988bea..964d993df9cd 100644 --- a/datapath/linux/compat/stt.c +++ b/datapath/linux/compat/stt.c @@ -1882,7 +1882,11 @@ static void stt_setup(struct net_device *dev) dev->netdev_ops = &stt_netdev_ops; dev->ethtool_ops = &stt_ethtool_ops; +#ifndef HAVE_NEEDS_FREE_NETDEV dev->destructor = free_netdev; +#else + dev->needs_free_netdev = true; +#endif SET_NETDEV_DEVTYPE(dev, &stt_type); -- 2.11.1 _______________________________________________ dev mailing list [email protected] https://mail.openvswitch.org/mailman/listinfo/ovs-dev
