lkml.org 
[lkml]   [2003]   [Mar]   [11]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
    Patch in this message
    /
    Subject[PATCH] (2/8) Eliminate brlock for packet_type
    From
    Date
    Replace linked list for packet_type with brlock with list macros and RCU.

    diff -urN -X dontdiff linux-2.5.64/net/8021q/vlan.c linux-2.5-nobrlock/net/8021q/vlan.c
    --- linux-2.5.64/net/8021q/vlan.c 2003-03-11 09:08:01.000000000 -0800
    +++ linux-2.5-nobrlock/net/8021q/vlan.c 2003-03-11 14:31:28.000000000 -0800
    @@ -29,7 +29,6 @@
    #include <net/p8022.h>
    #include <net/arp.h>
    #include <linux/rtnetlink.h>
    -#include <linux/brlock.h>
    #include <linux/notifier.h>

    #include <linux/if_vlan.h>
    @@ -68,7 +67,6 @@
    .dev =NULL,
    .func = vlan_skb_recv, /* VLAN receive method */
    .data = (void *)(-1), /* Set here '(void *)1' when this code can SHARE SKBs */
    - .next = NULL
    };

    /* End of global variables definitions. */
    @@ -231,9 +229,10 @@
    real_dev->vlan_rx_kill_vid(real_dev, vlan_id);
    }

    - br_write_lock(BR_NETPROTO_LOCK);
    grp->vlan_devices[vlan_id] = NULL;
    - br_write_unlock(BR_NETPROTO_LOCK);
    +
    + /* wait for RCU in network receive */
    + synchronize_kernel();


    /* Caller unregisters (and if necessary, puts)
    diff -urN -X dontdiff linux-2.5.64/net/8021q/vlan_dev.c linux-2.5-nobrlock/net/8021q/vlan_dev.c
    --- linux-2.5.64/net/8021q/vlan_dev.c 2003-03-11 09:08:01.000000000 -0800
    +++ linux-2.5-nobrlock/net/8021q/vlan_dev.c 2003-03-10 15:49:52.000000000 -0800
    @@ -31,7 +31,6 @@
    #include <net/datalink.h>
    #include <net/p8022.h>
    #include <net/arp.h>
    -#include <linux/brlock.h>

    #include "vlan.h"
    #include "vlanproc.h"


    -
    To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
    the body of a message to majordomo@vger.kernel.org
    More majordomo info at http://vger.kernel.org/majordomo-info.html
    Please read the FAQ at http://www.tux.org/lkml/

    \
     
     \ /
      Last update: 2005-03-22 13:33    [W:0.022 / U:31.280 seconds]
    ©2003-2016 Jasper Spaans. hosted at Digital OceanAdvertise on this site