29 Sep, 2006

1 commit


23 Sep, 2006

6 commits


18 Sep, 2006

1 commit


27 Aug, 2006

1 commit


18 Aug, 2006

1 commit

  • When the bridge recomputes features, it does not maintain the
    constraint that SG/GSO must be off if TX checksum is off.
    This patch adds that constraint.

    On a completely unrelated note, I've also added TSO6 and TSO_ECN
    feature bits if GSO is enabled on the underlying device through
    the new NETIF_F_GSO_SOFTWARE macro.

    Signed-off-by: Herbert Xu
    Signed-off-by: David S. Miller

    Herbert Xu
     

14 Aug, 2006

1 commit

  • Fix kernel panic on various SMP machines. The culprit is a null
    ub->skb in ulog_send(). If ulog_timer() has already been scheduled on
    one CPU and is spinning on the lock, and ipt_ulog_packet() flushes the
    queue on another CPU by calling ulog_send() right before it exits,
    there will be no skbuff when ulog_timer() acquires the lock and calls
    ulog_send(). Cancelling the timer in ulog_send() doesn't help because
    it has already been scheduled and is running on the first CPU.

    Similar problem exists in ebt_ulog.c and nfnetlink_log.c.

    Signed-off-by: Mark Huang
    Signed-off-by: Patrick McHardy
    Signed-off-by: David S. Miller

    Mark Huang
     

05 Aug, 2006

1 commit


25 Jul, 2006

1 commit


22 Jul, 2006

1 commit


09 Jul, 2006

1 commit

  • This patch adds the wrapper function skb_is_gso which can be used instead
    of directly testing skb_shinfo(skb)->gso_size. This makes things a little
    nicer and allows us to change the primary key for indicating whether an skb
    is GSO (if we ever want to do that).

    Signed-off-by: Herbert Xu
    Signed-off-by: David S. Miller

    Herbert Xu
     

04 Jul, 2006

1 commit


01 Jul, 2006

1 commit


30 Jun, 2006

1 commit

  • When GSO packets come from an untrusted source (e.g., a Xen guest domain),
    we need to verify the header integrity before passing it to the hardware.

    Since the first step in GSO is to verify the header, we can reuse that
    code by adding a new bit to gso_type: SKB_GSO_DODGY. Packets with this
    bit set can only be fed directly to devices with the corresponding bit
    NETIF_F_GSO_ROBUST. If the device doesn't have that bit, then the skb
    is fed to the GSO engine which will allow the packet to be sent to the
    hardware if it passes the header check.

    This patch changes the sg flag to a full features flag. The same method
    can be used to implement TSO ECN support. We simply have to mark packets
    with CWR set with SKB_GSO_ECN so that only hardware with a corresponding
    NETIF_F_TSO_ECN can accept them. The GSO engine can either fully segment
    the packet, or segment the first MTU and pass the rest to the hardware for
    further segmentation.

    Signed-off-by: Herbert Xu
    Signed-off-by: David S. Miller

    Herbert Xu
     

23 Jun, 2006

2 commits

  • This patch adds a generic segmentation offload toggle that can be turned
    on/off for each net device. For now it only supports in TCPv4.

    Signed-off-by: Herbert Xu
    Signed-off-by: David S. Miller

    Herbert Xu
     
  • Having separate fields in sk_buff for TSO/UFO (tso_size/ufo_size) is not
    going to scale if we add any more segmentation methods (e.g., DCCP). So
    let's merge them.

    They were used to tell the protocol of a packet. This function has been
    subsumed by the new gso_type field. This is essentially a set of netdev
    feature bits (shifted by 16 bits) that are required to process a specific
    skb. As such it's easy to tell whether a given device can process a GSO
    skb: you just have to and the gso_type field and the netdev's features
    field.

    I've made gso_type a conjunction. The idea is that you have a base type
    (e.g., SKB_GSO_TCPV4) that can be modified further to support new features.
    For example, if we add a hardware TSO type that supports ECN, they would
    declare NETIF_F_TSO | NETIF_F_TSO_ECN. All TSO packets with CWR set would
    have a gso_type of SKB_GSO_TCPV4 | SKB_GSO_TCPV4_ECN while all other TSO
    packets would be SKB_GSO_TCPV4. This means that only the CWR packets need
    to be emulated in software.

    Signed-off-by: Herbert Xu
    Signed-off-by: David S. Miller

    Herbert Xu
     

18 Jun, 2006

6 commits

  • As it is the bridge will only ever declare NETIF_F_IP_CSUM even if all
    its constituent devices support NETIF_F_HW_CSUM. This patch fixes
    this by supporting the first one out of NETIF_F_NO_CSUM,
    NETIF_F_HW_CSUM, and NETIF_F_IP_CSUM that is supported by all
    constituent devices.

    Signed-off-by: Herbert Xu
    Signed-off-by: David S. Miller

    Herbert Xu
     
  • The current stack treats NETIF_F_HW_CSUM and NETIF_F_NO_CSUM
    identically so we test for them in quite a few places. For the sake
    of brevity, I'm adding the macro NETIF_F_GEN_CSUM for these two. We
    also test the disjunct of NETIF_F_IP_CSUM and the other two in various
    places, for that purpose I've added NETIF_F_ALL_CSUM.

    Signed-off-by: Herbert Xu
    Signed-off-by: David S. Miller

    Herbert Xu
     
  • I found a few more spots where pskb_trim_rcsum could be used but were not.
    This patch changes them to use it.

    Also, sk_filter can get paged skb data. Therefore we must use pskb_trim
    instead of skb_trim.

    Signed-off-by: Herbert Xu
    Signed-off-by: David S. Miller

    Herbert Xu
     
  • Add basic netlink support to the Ethernet bridge. Including:
    * dump interfaces in bridges
    * monitor link status changes
    * change state of bridge port

    For some demo programs see:
    http://developer.osdl.org/shemminger/prototypes/brnl.tar.gz

    These are to allow building a daemon that does alternative
    implementations of Spanning Tree Protocol.

    Signed-off-by: Stephen Hemminger
    Signed-off-by: David S. Miller

    Stephen Hemminger
     
  • Return address in use, if some other kernel code has the SAP.
    Propogate out error codes from netfilter registration and unwind.

    Signed-off-by: Stephen Hemminger
    Signed-off-by: David S. Miller

    Stephen Hemminger
     
  • Small optimizations of bridge forwarding path.

    Signed-off-by: Stephen Hemminger
    Signed-off-by: David S. Miller

    Stephen Hemminger
     

06 Jun, 2006

1 commit

  • There are several bugs in error handling in br_add_bridge:
    - when dev_alloc_name fails, allocated net_device is not freed
    - unregister_netdev is called when rtnl lock is held
    - free_netdev is called before netdev_run_todo has a chance to be run after
    unregistering net_device

    Signed-off-by: Jiri Benc
    Signed-off-by: Stephen Hemminger
    Signed-off-by: David S. Miller

    Jiri Benc
     

24 May, 2006

1 commit

  • Bridge will OOPS on removal if other application has the SAP open.
    The bridge SAP might be shared with other usages, so need
    to do reference counting on module removal rather than explicit
    close/delete.

    Since packet might arrive after or during removal, need to clear
    the receive function handle, so LLC only hands it to user (if any).

    Signed-off-by: Stephen Hemminger
    Signed-off-by: David S. Miller

    Stephen Hemminger
     

19 May, 2006

1 commit


11 May, 2006

1 commit


06 May, 2006

1 commit


26 Apr, 2006

1 commit


20 Apr, 2006

1 commit


12 Apr, 2006

2 commits

  • Allocate an array of 'struct ebt_chainstack *', the current code allocates
    array of 'struct ebt_chainstack'.

    akpm: converted to use the

    foo = alloc(sizeof(*foo))

    form. Which would have prevented this from happening in the first place.

    akpm: also removed unneeded typecast.

    akpm: what on earth is this code doing anyway? cpu_possible_map can be
    sparse..

    Signed-off-by: Jayachandran C.
    Signed-off-by: Andrew Morton
    Signed-off-by: David S. Miller

    Jayachandran C
     
  • This change allows link local packets (like 802.3ad and Spanning Tree
    Protocol) to be processed even when the bridge is not using the port.
    It fixes the chicken-egg problem for bridging a bonded device, and
    may also fix problems with spanning tree failover.

    Signed-off-by: Stephen Hemminger
    Signed-off-by: David S. Miller

    Stephen Hemminger
     

11 Apr, 2006

1 commit

  • for_each_cpu() actually iterates across all possible CPUs. We've had mistakes
    in the past where people were using for_each_cpu() where they should have been
    iterating across only online or present CPUs. This is inefficient and
    possibly buggy.

    We're renaming for_each_cpu() to for_each_possible_cpu() to avoid this in the
    future.

    This patch replaces for_each_cpu with for_each_possible_cpu under /net

    Signed-off-by: KAMEZAWA Hiroyuki
    Acked-by: "David S. Miller"
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    KAMEZAWA Hiroyuki
     

10 Apr, 2006

1 commit


29 Mar, 2006

1 commit

  • Every netfilter module uses `init' for its module_init() function and
    `fini' or `cleanup' for its module_exit() function.

    Problem is, this creates uninformative initcall_debug output and makes
    ctags rather useless.

    So go through and rename them all to $(filename)_init and
    $(filename)_fini.

    Signed-off-by: Andrew Morton
    Signed-off-by: David S. Miller

    Andrew Morton
     

25 Mar, 2006

1 commit

  • I see lots of
    kernel unaligned access to 0xa0000001009dbb6f, ip=0xa000000100811591
    kernel unaligned access to 0xa0000001009dbb6b, ip=0xa0000001008115c1
    kernel unaligned access to 0xa0000001009dbb6d, ip=0xa0000001008115f1
    messages in my logs on IA64 when using the ethernet bridge with 2.6.16.

    Appended is a patch to fix them.

    Signed-off-by: Peter Chubb
    Signed-off-by: Stephen Hemminger
    Signed-off-by: David S. Miller

    Peter Chubb
     

21 Mar, 2006

1 commit