mirror of
https://github.com/openvswitch/ovs
synced 2025-10-23 14:57:06 +00:00
datapath: Prevent linker error of unknown symbol.
With the latest change of separating vports into their own modules, it is necessary to export all public functions in linux/compat/ directory. Also, we should prefix functions which replace the upstream ones with 'rpl_' and others with 'ovs_'. This will prevent the linker error when vport modules use those functions in the future. e.g., the to be merged vport-stt module will use the flex_array_* functions which are not currently exported. Co-authored-by: Tuan Nguyen <tuan.nguyen@veriksystems.com> Signed-off-by: Alex Wang <alexw@nicira.com> Acked-by: Jesse Gross <jesse@nicira.com>
This commit is contained in:
@@ -39,9 +39,9 @@ void dev_disable_lro(struct net_device *dev) { }
|
||||
static int nr_bridges;
|
||||
|
||||
#ifdef HAVE_RHEL_OVS_HOOK
|
||||
int netdev_rx_handler_register(struct net_device *dev,
|
||||
openvswitch_handle_frame_hook_t *hook,
|
||||
void *rx_handler_data)
|
||||
int rpl_netdev_rx_handler_register(struct net_device *dev,
|
||||
openvswitch_handle_frame_hook_t *hook,
|
||||
void *rx_handler_data)
|
||||
{
|
||||
nr_bridges++;
|
||||
rcu_assign_pointer(dev->ax25_ptr, rx_handler_data);
|
||||
@@ -50,12 +50,13 @@ int netdev_rx_handler_register(struct net_device *dev,
|
||||
rcu_assign_pointer(openvswitch_handle_frame_hook, hook);
|
||||
return 0;
|
||||
}
|
||||
EXPORT_SYMBOL_GPL(rpl_netdev_rx_handler_register);
|
||||
#else
|
||||
|
||||
int netdev_rx_handler_register(struct net_device *dev,
|
||||
struct sk_buff *(*hook)(struct net_bridge_port *p,
|
||||
struct sk_buff *skb),
|
||||
void *rx_handler_data)
|
||||
int rpl_netdev_rx_handler_register(struct net_device *dev,
|
||||
struct sk_buff *(*hook)(struct net_bridge_port *p,
|
||||
struct sk_buff *skb),
|
||||
void *rx_handler_data)
|
||||
{
|
||||
nr_bridges++;
|
||||
if (dev->br_port)
|
||||
@@ -67,9 +68,10 @@ int netdev_rx_handler_register(struct net_device *dev,
|
||||
br_handle_frame_hook = hook;
|
||||
return 0;
|
||||
}
|
||||
EXPORT_SYMBOL_GPL(rpl_netdev_rx_handler_register);
|
||||
#endif
|
||||
|
||||
void netdev_rx_handler_unregister(struct net_device *dev)
|
||||
void rpl_netdev_rx_handler_unregister(struct net_device *dev)
|
||||
{
|
||||
nr_bridges--;
|
||||
#ifdef HAVE_RHEL_OVS_HOOK
|
||||
@@ -88,4 +90,6 @@ void netdev_rx_handler_unregister(struct net_device *dev)
|
||||
br_handle_frame_hook = NULL;
|
||||
#endif
|
||||
}
|
||||
EXPORT_SYMBOL_GPL(rpl_netdev_rx_handler_unregister);
|
||||
|
||||
#endif
|
||||
|
||||
Reference in New Issue
Block a user