const struct tnl_vport *tnl_vport = tnl_vport_table_cast(node);
struct port_lookup_key *lookup = target;
- lookup->mutable = rcu_dereference(tnl_vport->mutable);
+ lookup->mutable = rcu_dereference_rtnl(tnl_vport->mutable);
return (lookup->mutable->tunnel_type == lookup->tunnel_type &&
lookup->mutable->port_config.daddr == lookup->daddr &&
const struct tnl_mutable_config **mutable)
{
struct port_lookup_key lookup;
- struct tbl *table = rcu_dereference(port_table);
+ struct tbl *table = rcu_dereference_rtnl(port_table);
struct tbl_node *tbl_node;
if (unlikely(!table))
const unsigned char *tnl_get_addr(const struct vport *vport)
{
const struct tnl_vport *tnl_vport = tnl_vport_priv(vport);
- return rcu_dereference(tnl_vport->mutable)->eth_addr;
+ return rcu_dereference_rtnl(tnl_vport->mutable)->eth_addr;
}
int tnl_get_mtu(const struct vport *vport)
{
const struct tnl_vport *tnl_vport = tnl_vport_priv(vport);
- return rcu_dereference(tnl_vport->mutable)->mtu;
+ return rcu_dereference_rtnl(tnl_vport->mutable)->mtu;
}
void tnl_free_linked_skbs(struct sk_buff *skb)
#else
if (likely(rcu_access_pointer(dev->rx_handler) == netdev_frame_hook))
#endif
- return (struct vport *)rcu_dereference(dev->rx_handler_data);
+ return (struct vport *)rcu_dereference_rtnl(dev->rx_handler_data);
else
return NULL;
#else
- return (struct vport *)rcu_dereference(dev->br_port);
+ return (struct vport *)rcu_dereference_rtnl(dev->br_port);
#endif
}
#include <linux/dcache.h>
#include <linux/kernel.h>
#include <linux/list.h>
+#include <linux/rtnetlink.h>
#include "datapath.h"
#include "vport.h"
struct patch_vport *patch_vport = patch_vport_priv(vport);
struct device_config *old_config;
- old_config = rcu_dereference(patch_vport->devconf);
+ old_config = rtnl_dereference(patch_vport->devconf);
rcu_assign_pointer(patch_vport->devconf, new_config);
call_rcu(&old_config->rcu, free_config);
}
static const unsigned char *patch_get_addr(const struct vport *vport)
{
const struct patch_vport *patch_vport = patch_vport_priv(vport);
- return rcu_dereference(patch_vport->devconf)->eth_addr;
+ return rcu_dereference_rtnl(patch_vport->devconf)->eth_addr;
}
static int patch_get_mtu(const struct vport *vport)
{
const struct patch_vport *patch_vport = patch_vport_priv(vport);
- return rcu_dereference(patch_vport->devconf)->mtu;
+ return rcu_dereference_rtnl(patch_vport->devconf)->mtu;
}
static int patch_send(struct vport *vport, struct sk_buff *skb)