X-Git-Url: http://git.onelab.eu/?a=blobdiff_plain;f=datapath%2Fdatapath.c;h=64e06ceb6451eea15632dc3f97ed5ab697cdb2c1;hb=34e63086edddcae06d7c1a4fa84fec0861e50758;hp=fc73cac3d8336a71842671212274a973e4ffbfe5;hpb=5eccf359391f7fe2cdb0edbaaf5680895c115218;p=sliver-openvswitch.git diff --git a/datapath/datapath.c b/datapath/datapath.c index fc73cac3d..64e06ceb6 100644 --- a/datapath/datapath.c +++ b/datapath/datapath.c @@ -424,10 +424,13 @@ int dp_del_port(struct net_bridge_port *p, struct list_head *dp_devs) { ASSERT_RTNL(); -#ifdef SUPPORT_SYSFS - if (p->port_no != ODPP_LOCAL && dp_del_if_hook) + if (p->port_no != ODPP_LOCAL && dp_del_if_hook) { +#if LINUX_VERSION_CODE < KERNEL_VERSION(2,6,25) sysfs_remove_link(&p->dp->ifobj, p->dev->name); +#else + sysfs_remove_link(p->dp->ifobj, p->dev->name); #endif + } dp_ifinfo_notify(RTM_DELLINK, p); p->dp->n_ports--; @@ -577,6 +580,7 @@ static int dp_frame_hook(struct net_bridge_port *p, struct sk_buff **pskb) #endif #ifdef CONFIG_XEN +#if LINUX_VERSION_CODE == KERNEL_VERSION(2,6,18) /* This code is copied verbatim from net/dev/core.c in Xen's * linux-2.6.18-92.1.10.el5.xs5.0.0.394.644. We can't call those functions * directly because they aren't exported. */ @@ -623,7 +627,8 @@ int skb_checksum_setup(struct sk_buff *skb) out: return -EPROTO; } -#endif +#endif /* linux == 2.6.18 */ +#endif /* CONFIG_XEN */ int dp_output_control(struct datapath *dp, struct sk_buff *skb, int queue_no,