02 Jul, 2008

2 commits


28 Jun, 2008

2 commits


17 Jun, 2008

2 commits


04 Jun, 2008

1 commit

  • Make nlmsg_trim(), nlmsg_cancel(), genlmsg_cancel(), and
    nla_nest_cancel() void functions.

    Return -EMSGSIZE instead of -1 if the provided message buffer is not
    big enough.

    Signed-off-by: Thomas Graf
    Signed-off-by: David S. Miller

    Thomas Graf
     

21 May, 2008

1 commit


06 May, 2008

1 commit


05 May, 2008

1 commit


04 May, 2008

1 commit

  • There is lack of removing a class from the event queue while changing
    from parent to leaf which can cause corruption of this rb tree. This
    patch fixes a bug introduced by my patch: "sch_htb: turn intermediate
    classes into leaves" commit: 160d5e10f87b1dc88fd9b84b31b1718e0fd76398.

    Many thanks to Jan 'yanek' Bortl for finding a way to reproduce this
    rare bug and narrowing the test case, which made possible proper
    diagnosing.

    This patch is recommended for all kernels starting from 2.6.20.

    Reported-and-tested-by: Jan 'yanek' Bortl
    Signed-off-by: Jarek Poplawski
    Signed-off-by: David S. Miller

    Jarek Poplawski
     

03 May, 2008

1 commit

  • WARN_ON_ONCE() gives a stack trace including the full module list.
    Having this in the kernel dump for the timeout case in the
    generic netdev watchdog will help us see quicker which driver
    is involved. It also allows us to collect statistics
    and patterns in terms of which drivers have this event occuring.

    Suggested by Andrew Morton

    Signed-off-by: Arjan van de Ven
    Signed-off-by: David S. Miller

    Arjan van de Ven
     

29 Apr, 2008

1 commit


18 Apr, 2008

2 commits


15 Apr, 2008

1 commit

  • TC_H_MAJ(parentid) for root classes is the same as for ingress, and if
    ingress qdisc is created qdisc_lookup() returns its pointer (without
    ingress NULL is returned). After this all qdisc_lookups give the same,
    and we get endless loop. (I don't know how this could hide for so long
    - it should trigger with every leaf class deleted if it's qdisc isn't
    empty.)

    After this fix qdisc_lookup() is omitted both for ingress and root
    parents, but looking for root is only wasting a little time here...
    Many thanks to Enrico Demarin for finding a test for catching this
    bug, which probably bothered quite a lot of admins.

    Reported-by: Enrico Demarin ,
    Signed-off-by: Jarek Poplawski
    Acked-by: Patrick McHardy
    Signed-off-by: David S. Miller

    Jarek Poplawski
     

14 Apr, 2008

1 commit


13 Apr, 2008

1 commit

  • Deleting of nonroot hnodes mostly doesn't work in u32_delete():
    refcnt == 1 is expected, but such hnodes' refcnts are initialized
    with 0 and charged only with "link" nodes. Now they'll start with
    1 like usual. Thanks to Patrick McHardy for an improving suggestion.

    Signed-off-by: Jarek Poplawski
    Acked-by: Jamal Hadi Salim
    Signed-off-by: David S. Miller

    Jarek Poplawski
     

03 Apr, 2008

1 commit


29 Mar, 2008

1 commit

  • The qdisc_run loop is currently unbounded and runs entirely in a
    softirq. This is bad as it may create an unbounded softirq run.

    This patch fixes this by calling need_resched and breaking out if
    necessary.

    It also adds a break out if the jiffies value changes since that would
    indicate we've been transmitting for too long which starves other
    softirqs.

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

    Herbert Xu
     

26 Mar, 2008

1 commit


24 Mar, 2008

2 commits

  • Conflicts:

    net/ipv6/ndisc.c

    David S. Miller
     
  • HTB is event driven algorithm and part of its work is to apply
    scheduled events at proper times. It tried to defend itself from
    livelock by processing only limited number of events per dequeue.
    Because of faster computers some users already hit this hardcoded
    limit.

    This patch limits processing up to 2 jiffies (why not 1 jiffie ?
    because it might stop prematurely when only fraction of jiffie
    remains).

    Signed-off-by: Martin Devera
    Signed-off-by: David S. Miller

    Martin Devera
     

18 Mar, 2008

2 commits


06 Mar, 2008

1 commit


10 Feb, 2008

4 commits


09 Feb, 2008

1 commit

  • Setting up a meta match causes a kernel OOPS because of uninitialized
    elements in tree.

    [ 37.322381] BUG: unable to handle kernel NULL pointer dereference at 0000000000000000
    [ 37.322381] IP: [] :em_meta:em_meta_destroy+0x17/0x80

    [ 37.322381] Call Trace:
    [ 37.322381] [] tcf_em_tree_destroy+0x2d/0xa0
    [ 37.322381] [] tcf_em_tree_validate+0x2dc/0x4a0
    [ 37.322381] [] nla_parse+0x92/0xe0
    [ 37.322381] [] :cls_basic:basic_change+0x202/0x3c0
    [ 37.322381] [] kmem_cache_alloc+0x67/0xa0
    [ 37.322381] [] tc_ctl_tfilter+0x3b1/0x580
    [ 37.322381] [] rtnetlink_rcv_msg+0x0/0x260
    [ 37.322381] [] netlink_rcv_skb+0x74/0xa0
    [ 37.322381] [] rtnetlink_rcv+0x18/0x20
    [ 37.322381] [] netlink_unicast+0x263/0x290
    [ 37.322381] [] __alloc_skb+0x96/0x160
    [ 37.322381] [] netlink_sendmsg+0x274/0x340
    [ 37.322381] [] sock_sendmsg+0x12b/0x140
    [ 37.322381] [] autoremove_wake_function+0x0/0x30
    [ 37.322381] [] autoremove_wake_function+0x0/0x30
    [ 37.322381] [] sock_sendmsg+0x12b/0x140
    [ 37.322381] [] zone_statistics+0xb1/0xc0
    [ 37.322381] [] sys_sendmsg+0x20e/0x360
    [ 37.322381] [] sockfd_lookup_light+0x41/0x80
    [ 37.322381] [] handle_mm_fault+0x3eb/0x7f0
    [ 37.322381] [] system_call_after_swapgs+0x7b/0x80

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

    Stephen Hemminger
     

08 Feb, 2008

1 commit

  • If userspace passes a unknown match index into em_meta, then
    em_meta_change will return an error and the data for the match will
    not be set. This then causes an null pointer dereference when the
    cleanup is done in the error path via tcf_em_tree_destroy. Since the
    tree structure comes kzalloc, it is initialized to NULL.

    Discovered when testing a new version of tc command against an
    accidental older kernel.

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

    Stephen Hemminger
     

06 Feb, 2008

3 commits


05 Feb, 2008

2 commits

  • Provide a way to use tc filters on vlan tag even if tag is buried in
    skb due to hardware acceleration.

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

    Stephen Hemminger
     
  • The 2.6 latest git build was broken when using the following
    configuration options:
    CONFIG_NET_EMATCH=n
    CONFIG_NET_CLS_FLOW=y

    with the following error:
    net/sched/cls_flow.c: In function 'flow_dump':
    net/sched/cls_flow.c:598: error: 'struct tcf_ematch_tree' has no
    member named 'hdr'
    make[2]: *** [net/sched/cls_flow.o] Error 1
    make[1]: *** [net/sched] Error 2
    make: *** [net] Error 2

    see the recent post by Li Zefan:
    http://www.spinics.net/lists/netdev/msg54434.html

    The reason for this crash is that struct tcf_ematch_tree
    (net/pkt_cls.h) is empty when CONFIG_NET_EMATCH is not defined.

    When CONFIG_NET_EMATCH is defined, the tcf_ematch_tree structure
    indeed holds a struct tcf_ematch_tree_hdr (hdr) as flow_dump()
    expects.

    This patch adds #ifdef CONFIG_NET_EMATCH in flow_dump to avoid this.

    Signed-off-by: Rami Rosen
    Signed-off-by: David S. Miller

    Rami Rosen
     

01 Feb, 2008

3 commits

  • Add new "flow" classifier, which is meant to extend the SFQ hashing
    capabilities without hard-coding new hash functions and also allows
    deterministic mappings of keys to classes, replacing some out of tree
    iptables patches like IPCLASSIFY (maps IPs to classes), IPMARK (maps
    IPs to marks, with fw filters to classes), ...

    Some examples:

    - Classic SFQ hash:

    tc filter add ... flow hash \
    keys src,dst,proto,proto-src,proto-dst divisor 1024

    - Classic SFQ hash, but using information from conntrack to work properly in
    combination with NAT:

    tc filter add ... flow hash \
    keys nfct-src,nfct-dst,proto,nfct-proto-src,nfct-proto-dst divisor 1024

    - Map destination IPs of 192.168.0.0/24 to classids 1-257:

    tc filter add ... flow map \
    key dst addend -192.168.0.0 divisor 256

    - alternatively:

    tc filter add ... flow map \
    key dst and 0xff

    - similar, but reverse ordered:

    tc filter add ... flow map \
    key dst and 0xff xor 0xff

    Perturbation is currently not supported because we can't reliable kill the
    timer on destruction.

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

    Patrick McHardy
     
  • Add support for dumping statistics and make internal queues visible as
    classes.

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

    Patrick McHardy
     
  • Add support for external classifiers to allow using different flow
    hash functions similar to ESFQ. When no classifier is attached the
    built-in hash is used as before.

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

    Patrick McHardy