}
#endif
+/* Must be called with rcu_read_lock. */
static void
do_port_input(struct net_bridge_port *p, struct sk_buff *skb)
{
dp_process_received_packet(skb, p);
}
+/* Must be called with rcu_read_lock and with bottom-halves disabled. */
void dp_process_received_packet(struct sk_buff *skb, struct net_bridge_port *p)
{
struct datapath *dp = p->dp;
* different set of devices!)
*/
#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,22)
-/* Called with rcu_read_lock. */
+/* Called with rcu_read_lock and bottom-halves disabled. */
static struct sk_buff *dp_frame_hook(struct net_bridge_port *p,
struct sk_buff *skb)
{
return NULL;
}
#elif LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,0)
+/* Called with rcu_read_lock and bottom-halves disabled. */
static int dp_frame_hook(struct net_bridge_port *p, struct sk_buff **pskb)
{
do_port_input(p, *pskb);
while ((skb = skb_dequeue(&dp_dev->xmit_queue)) != NULL) {
skb_reset_mac_header(skb);
- rcu_read_lock();
+ rcu_read_lock_bh();
dp_process_received_packet(skb, dp->ports[ODPP_LOCAL]);
- rcu_read_unlock();
+ rcu_read_unlock_bh();
}
netif_wake_queue(dp->netdev);
}