diff mbox

[ovs-dev,5/6] datapath: remove rtnl_delete_link support for older Linux

Message ID 1469124857-30036-6-git-send-email-cascardo@redhat.com
State Accepted
Delegated to: pravin shelar
Headers show

Commit Message

Thadeu Lima de Souza Cascardo July 21, 2016, 6:14 p.m. UTC
The changes from upstream version of rtnl_delete_link were only there to support
Linux 2.6.33 or older. The removal of this support makes it identical to
upstream version as of 4.6.

Signed-off-by: Thadeu Lima de Souza Cascardo <cascardo@redhat.com>
---
 datapath/linux/compat/dev-openvswitch.c | 12 +++---------
 1 file changed, 3 insertions(+), 9 deletions(-)
diff mbox

Patch

diff --git a/datapath/linux/compat/dev-openvswitch.c b/datapath/linux/compat/dev-openvswitch.c
index 1a71206..7257665 100644
--- a/datapath/linux/compat/dev-openvswitch.c
+++ b/datapath/linux/compat/dev-openvswitch.c
@@ -42,21 +42,15 @@  void dev_disable_lro(struct net_device *dev) { }
 int rpl_rtnl_delete_link(struct net_device *dev)
 {
 	const struct rtnl_link_ops *ops;
+	LIST_HEAD(list_kill);
 
 	ops = dev->rtnl_link_ops;
 	if (!ops || !ops->dellink)
 		return -EOPNOTSUPP;
 
-#if LINUX_VERSION_CODE < KERNEL_VERSION(2,6,34)
-	ops->dellink(dev);
-#else
-	{
-		LIST_HEAD(list_kill);
+	ops->dellink(dev, &list_kill);
+	unregister_netdevice_many(&list_kill);
 
-		ops->dellink(dev, &list_kill);
-		unregister_netdevice_many(&list_kill);
-	}
-#endif
 	return 0;
 }