16 Jun, 2012

1 commit

  • Orphaning skb in dev_hard_start_xmit() makes bonding behavior
    unfriendly for applications sending big UDP bursts : Once packets
    pass the bonding device and come to real device, they might hit a full
    qdisc and be dropped. Without orphaning, the sender is automatically
    throttled because sk->sk_wmemalloc reaches sk->sk_sndbuf (assuming
    sk_sndbuf is not too big)

    We could try to defer the orphaning adding another test in
    dev_hard_start_xmit(), but all this seems of little gain,
    now that BQL tends to make packets more likely to be parked
    in Qdisc queues instead of NIC TX ring, in cases where performance
    matters.

    Reverts commits :
    fc6055a5ba31 net: Introduce skb_orphan_try()
    87fd308cfc6b net: skb_tx_hash() fix relative to skb_orphan_try()
    and removes SKBTX_DRV_NEEDS_SK_REF flag

    Reported-and-bisected-by: Jean-Michel Hautbois
    Signed-off-by: Eric Dumazet
    Tested-by: Oliver Hartkopp
    Acked-by: Oliver Hartkopp
    Signed-off-by: David S. Miller

    Eric Dumazet
     

23 Mar, 2012

1 commit

  • Pull s390 patches from Martin Schwidefsky:
    "The biggest patch is the rework of the smp code, something I wanted to
    do for some time. There are some patches for our various dump methods
    and one new thing: z/VM LGR detection. LGR stands for linux-guest-
    relocation and is the guest migration feature of z/VM. For debugging
    purposes we keep a log of the systems where a specific guest has lived."

    Fix up trivial conflict in arch/s390/kernel/smp.c due to the scheduler
    cleanup having removed some code next to removed s390 code.

    * 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/s390/linux:
    [S390] kernel: Pass correct stack for smp_call_ipl_cpu()
    [S390] Ensure that vmcore_info pointer is never accessed directly
    [S390] dasd: prevent validate server for offline devices
    [S390] Remove monolithic build option for zcrypt driver.
    [S390] stack dump: fix indentation in output
    [S390] kernel: Add OS info memory interface
    [S390] Use block_sigmask()
    [S390] kernel: Add z/VM LGR detection
    [S390] irq: external interrupt code passing
    [S390] irq: set __ARCH_IRQ_EXIT_IRQS_DISABLED
    [S390] zfcpdump: Implement async sdias event processing
    [S390] Use copy_to_absolute_zero() instead of "stura/sturg"
    [S390] rework idle code
    [S390] rework smp code
    [S390] rename lowcore field
    [S390] Fix gcc 4.6.0 compile warning

    Linus Torvalds
     

11 Mar, 2012

1 commit

  • The external interrupt handlers have a parameter called ext_int_code.
    Besides the name this paramter does not only contain the ext_int_code
    but in addition also the "cpu address" (POP) which caused the external
    interrupt.
    To make the code a bit more obvious pass a struct instead so the called
    function can easily distinguish between external interrupt code and
    cpu address. The cpu address field however is named "subcode" since
    some external interrupt sources do not pass a cpu address but a
    different parameter (or none at all).

    Signed-off-by: Heiko Carstens
    Signed-off-by: Martin Schwidefsky

    Heiko Carstens
     

08 Mar, 2012

2 commits

  • AF_IUCV sockets offer a shutdown function. This patch makes sure
    shutdown works for HS transport as well.

    Signed-off-by: Ursula Braun
    Signed-off-by: Frank Blaschka
    Signed-off-by: David S. Miller

    Ursula Braun
     
  • In case of transport through HiperSockets the underlying network
    interface may switch to DOWN state or the underlying network device
    may recover. In both cases the socket must change to IUCV_DISCONN
    state. If the interface goes down, af_iucv has a chance to notify
    its connection peer in addition.

    Signed-off-by: Ursula Braun
    Signed-off-by: Frank Blaschka
    Signed-off-by: David S. Miller

    Ursula Braun
     

09 Feb, 2012

4 commits

  • For HS transport the maximum message size depends on the MTU-size
    of the HS-device bound to the AF_IUCV socket. This patch adds a
    getsockopt option MSGSIZE returning the maximum message size that
    can be handled for this AF_IUCV socket.

    Signed-off-by: Ursula Braun
    Signed-off-by: Frank Blaschka
    Signed-off-by: David S. Miller

    Ursula Braun
     
  • This patch saves the net_device in the iucv_sock structure during
    bind in order to fasten skb sending.
    In addition some other small improvements are made for HS transport:
    - error checking when sending skbs
    - locking changes in afiucv_hs_callback_txnotify
    - skb freeing in afiucv_hs_callback_txnotify
    And finally it contains code cleanup to get rid of iucv_skb_queue_purge.

    Signed-off-by: Ursula Braun
    Signed-off-by: Frank Blaschka
    Signed-off-by: David S. Miller

    Ursula Braun
     
  • When polling on an AF_IUCV socket, writing should be blocked if the
    number of pending messages exceeds a defined limit.

    Signed-off-by: Ursula Braun
    Signed-off-by: Frank Blaschka
    Signed-off-by: David S. Miller

    Ursula Braun
     
  • A SEVER is missing in the callback of a receiving SEVERED. This may
    inhibit z/VM to remove the corresponding IUCV-path completely.
    This patch adds a SEVER in iucv_callback_connrej (together with
    additional locking.

    Signed-off-by: Ursula Braun
    Signed-off-by: Martin Schwidefsky
    Signed-off-by: Frank Blaschka
    Signed-off-by: David S. Miller

    Ursula Braun
     

21 Dec, 2011

5 commits


14 Oct, 2011

1 commit

  • skb truesize currently accounts for sk_buff struct and part of skb head.
    kmalloc() roundings are also ignored.

    Considering that skb_shared_info is larger than sk_buff, its time to
    take it into account for better memory accounting.

    This patch introduces SKB_TRUESIZE(X) macro to centralize various
    assumptions into a single place.

    At skb alloc phase, we put skb_shared_info struct at the exact end of
    skb head, to allow a better use of memory (lowering number of
    reallocations), since kmalloc() gives us power-of-two memory blocks.

    Unless SLUB/SLUB debug is active, both skb->head and skb_shared_info are
    aligned to cache lines, as before.

    Note: This patch might trigger performance regressions because of
    misconfigured protocol stacks, hitting per socket or global memory
    limits that were previously not reached. But its a necessary step for a
    more accurate memory accounting.

    Signed-off-by: Eric Dumazet
    CC: Andi Kleen
    CC: Ben Hutchings
    Signed-off-by: David S. Miller

    Eric Dumazet
     

13 Aug, 2011

5 commits

  • The current transport mechanism for af_iucv is the z/VM offered
    communications facility IUCV. To provide equivalent support when
    running Linux in an LPAR, HiperSockets transport is added to the
    AF_IUCV address family. It requires explicit binding of an AF_IUCV
    socket to a HiperSockets device. A new packet_type ETH_P_AF_IUCV
    is announced. An af_iucv specific transport header is defined
    preceding the skb data. A small protocol is implemented for
    connecting and for flow control/congestion management.

    Signed-off-by: Ursula Braun
    Signed-off-by: Frank Blaschka
    Reviewed-by: Hendrik Brueckner
    Signed-off-by: David S. Miller

    Ursula Braun
     
  • Code cleanup making make use of local variable for struct iucv_sock.

    Signed-off-by: Ursula Braun
    Signed-off-by: Frank Blaschka
    Signed-off-by: David S. Miller

    Ursula Braun
     
  • For future af_iucv extensions the module should be able to run in LPAR
    mode too. For this we use the new dynamic loading iucv interface.

    Signed-off-by: Frank Blaschka
    Signed-off-by: David S. Miller

    Frank Blaschka
     
  • When adding HiperSockets transport to AF_IUCV Sockets, af_iucv either
    depends on IUCV or QETH_L3 (or both). This patch introduces the
    necessary changes for kernel configuration.

    Signed-off-by: Ursula Braun
    Signed-off-by: Frank Blaschka
    Signed-off-by: David S. Miller

    Ursula Braun
     
  • This patch adds a symbol to dynamically load iucv functions.

    Signed-off-by: Frank Blaschka
    Signed-off-by: David S. Miller

    Frank Blaschka
     

27 Jul, 2011

1 commit

  • This allows us to move duplicated code in
    (atomic_inc_not_zero() for now) to

    Signed-off-by: Arun Sharma
    Reviewed-by: Eric Dumazet
    Cc: Ingo Molnar
    Cc: David Miller
    Cc: Eric Dumazet
    Acked-by: Mike Frysinger
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Arun Sharma
     

24 Jul, 2011

1 commit


26 May, 2011

1 commit


14 May, 2011

3 commits


31 Mar, 2011

1 commit


05 Jan, 2011

1 commit

  • Up to now /proc/interrupts only has statistics for external and i/o
    interrupts but doesn't split up them any further.
    This patch adds a line for every single interrupt source so that it
    is possible to easier tell what the machine is/was doing.
    Part of the output now looks like this;

    CPU0 CPU2 CPU4
    EXT: 3898 4232 2305
    I/O: 782 315 245
    CLK: 1029 1964 727 [EXT] Clock Comparator
    IPI: 2868 2267 1577 [EXT] Signal Processor
    TMR: 0 0 0 [EXT] CPU Timer
    TAL: 0 0 0 [EXT] Timing Alert
    PFL: 0 0 0 [EXT] Pseudo Page Fault
    [...]
    NMI: 0 1 1 [NMI] Machine Checks

    Signed-off-by: Heiko Carstens
    Signed-off-by: Martin Schwidefsky

    Heiko Carstens
     

25 Oct, 2010

1 commit


03 Jun, 2010

1 commit


29 May, 2010

1 commit

  • * git://git.kernel.org/pub/scm/linux/kernel/git/davem/net-2.6: (22 commits)
    netlink: bug fix: wrong size was calculated for vfinfo list blob
    netlink: bug fix: don't overrun skbs on vf_port dump
    xt_tee: use skb_dst_drop()
    netdev/fec: fix ifconfig eth0 down hang issue
    cnic: Fix context memory init. on 5709.
    drivers/net: Eliminate a NULL pointer dereference
    drivers/net/hamradio: Eliminate a NULL pointer dereference
    be2net: Patch removes redundant while statement in loop.
    ipv6: Add GSO support on forwarding path
    net: fix __neigh_event_send()
    vhost: fix the memory leak which will happen when memory_access_ok fails
    vhost-net: fix to check the return value of copy_to/from_user() correctly
    vhost: fix to check the return value of copy_to/from_user() correctly
    vhost: Fix host panic if ioctl called with wrong index
    net: fix lock_sock_bh/unlock_sock_bh
    net/iucv: Add missing spin_unlock
    net: ll_temac: fix checksum offload logic
    net: ll_temac: fix interrupt bug when interrupt 0 is used
    sctp: dubious bitfields in sctp_transport
    ipmr: off by one in __ipmr_fill_mroute()
    ...

    Linus Torvalds
     

28 May, 2010

1 commit


27 May, 2010

1 commit

  • Add a spin_unlock missing on the error path. There seems like no reason
    why the lock should continue to be held if the kzalloc fail.

    The semantic match that finds this problem is as follows:
    (http://coccinelle.lip6.fr/)

    //
    @@
    expression E1;
    @@

    * spin_lock(E1,...);

    * spin_unlock(E1,...);
    //

    Signed-off-by: Julia Lawall
    Signed-off-by: David S. Miller

    Julia Lawall
     

18 May, 2010

1 commit

  • This patch removes from net/ (but not any netfilter files)
    all the unnecessary return; statements that precede the
    last closing brace of void functions.

    It does not remove the returns that are immediately
    preceded by a label as gcc doesn't like that.

    Done via:
    $ grep -rP --include=*.[ch] -l "return;\n}" net/ | \
    xargs perl -i -e 'local $/ ; while (<>) { s/\n[ \t\n]+return;\n}/\n}/g; print; }'

    Signed-off-by: Joe Perches
    Signed-off-by: David S. Miller

    Joe Perches
     

02 May, 2010

1 commit

  • sk_callback_lock rwlock actually protects sk->sk_sleep pointer, so we
    need two atomic operations (and associated dirtying) per incoming
    packet.

    RCU conversion is pretty much needed :

    1) Add a new structure, called "struct socket_wq" to hold all fields
    that will need rcu_read_lock() protection (currently: a
    wait_queue_head_t and a struct fasync_struct pointer).

    [Future patch will add a list anchor for wakeup coalescing]

    2) Attach one of such structure to each "struct socket" created in
    sock_alloc_inode().

    3) Respect RCU grace period when freeing a "struct socket_wq"

    4) Change sk_sleep pointer in "struct sock" by sk_wq, pointer to "struct
    socket_wq"

    5) Change sk_sleep() function to use new sk->sk_wq instead of
    sk->sk_sleep

    6) Change sk_has_sleeper() to wq_has_sleeper() that must be used inside
    a rcu_read_lock() section.

    7) Change all sk_has_sleeper() callers to :
    - Use rcu_read_lock() instead of read_lock(&sk->sk_callback_lock)
    - Use wq_has_sleeper() to eventually wakeup tasks.
    - Use rcu_read_unlock() instead of read_unlock(&sk->sk_callback_lock)

    8) sock_wake_async() is modified to use rcu protection as well.

    9) Exceptions :
    macvtap, drivers/net/tun.c, af_unix use integrated "struct socket_wq"
    instead of dynamically allocated ones. They dont need rcu freeing.

    Some cleanups or followups are probably needed, (possible
    sk_callback_lock conversion to a spinlock for example...).

    Signed-off-by: Eric Dumazet
    Signed-off-by: David S. Miller

    Eric Dumazet
     

21 Apr, 2010

1 commit

  • Define a new function to return the waitqueue of a "struct sock".

    static inline wait_queue_head_t *sk_sleep(struct sock *sk)
    {
    return sk->sk_sleep;
    }

    Change all read occurrences of sk_sleep by a call to this function.

    Needed for a future RCU conversion. sk_sleep wont be a field directly
    available.

    Signed-off-by: Eric Dumazet
    Signed-off-by: David S. Miller

    Eric Dumazet
     

16 Dec, 2009

1 commit


14 Nov, 2009

1 commit

  • If iucv_work_queue is not empty during kernel freeze, a kernel panic
    occurs. This suspend-patch adds flushing of the work queue for
    pending connection requests and severing of remaining pending
    connections.

    Signed-off-by: Ursula Braun
    Signed-off-by: David S. Miller

    Ursula Braun
     

06 Nov, 2009

1 commit

  • The generic __sock_create function has a kern argument which allows the
    security system to make decisions based on if a socket is being created by
    the kernel or by userspace. This patch passes that flag to the
    net_proto_family specific create function, so it can do the same thing.

    Signed-off-by: Eric Paris
    Acked-by: Arnaldo Carvalho de Melo
    Signed-off-by: David S. Miller

    Eric Paris
     

18 Oct, 2009

1 commit