18 Apr, 2013

6 commits


17 Apr, 2013

16 commits

  • commit 7b7a2bbb690 (atl1: Remove unneeded PM_OPS definitions) removed the
    definition of atl1_suspend for the !CONFIG_PM_SLEEP case.

    So only call atl1_suspend() when CONFIG_PM_SLEEP is defined and fix the
    following build error from randconfig:

    drivers/net/ethernet/atheros/atlx/atl1.c: In function 'atl1_shutdown':
    drivers/net/ethernet/atheros/atlx/atl1.c:2888:2: error: implicit declaration of function 'atl1_suspend' [-Werror=implicit-function-declaration]

    Reported-by: kbuild test robot
    Signed-off-by: Fabio Estevam
    Signed-off-by: David S. Miller

    Fabio Estevam
     
  • Marc Kleine-Budde says:

    ====================
    this is a pull-request for net-next/master. It consists of a patch by
    Oliver Hartkopp. In this patch he cleans up the sja1000 header file by
    using a common prefix for all sja1000 defines.
    ====================

    Signed-off-by: David S. Miller

    David S. Miller
     
  • Using SIMPLE_DEV_PM_OPS can make the code smaller and simpler.

    Also change CONFIG_PM to CONFIG_PM_SLEEP.

    Signed-off-by: Fabio Estevam
    Signed-off-by: David S. Miller

    Fabio Estevam
     
  • If we can't _up() after changing the MTU, report the actual error instead
    of -ENOMEM. It can be really misleading cause pch_gbe is usually used in
    scenarios where the memory amount is really small, and thus hiding the
    real cause.

    Signed-off-by: Veaceslav Falico
    Signed-off-by: David S. Miller

    Veaceslav Falico
     
  • This patch allows setting VXLAN destination to unicast address.
    It allows that VXLAN can be used as peer-to-peer tunnel without
    multicast.

    v4: generalize struct vxlan_dev, "gaddr" is replaced with vxlan_rdst.
    "GROUP" attribute is replaced with "REMOTE".
    they are based by David Stevens's comments.

    v3: move a new attribute REMOTE into the last of an enum list
    based by Stephen Hemminger's comments.

    v2: use a new attribute REMOTE instead of GROUP based by
    Cong Wang's comments.

    Signed-off-by: Atzm Watanabe
    Acked-by: David L Stevens
    Signed-off-by: David S. Miller

    Atzm Watanabe
     
  • There is no need to add a dozen unions each time at the start
    of the function. So, do this once and use it instead. Thus, we
    can remove some duplicate code and make it more readable.

    Signed-off-by: Daniel Borkmann
    Signed-off-by: David S. Miller

    Daniel Borkmann
     
  • sctp: Add buffer utilization fields to /proc/net/sctp/assocs

    This patch adds the following fields to /proc/net/sctp/assocs output:

    - sk->sk_wmem_alloc as "wmema" (transmit queue bytes committed)
    - sk->sk_wmem_queued as "wmemq" (persistent queue size)
    - sk->sk_sndbuf as "sndbuf" (size of send buffer in bytes)
    - sk->sk_rcvbuf as "rcvbuf" (size of receive buffer in bytes)

    When small DATA chunks containing 136 bytes data are sent the TX_QUEUE
    (assoc->sndbuf_used) reaches a maximum of 40.9% of sk_sndbuf value when
    peer.rwnd = 0. This was diagnosed from sk_wmem_alloc value reaching maximum
    value of sk_sndbuf.

    TX_QUEUE (assoc->sndbuf_used), sk_wmem_alloc and sk_wmem_queued values are
    incremented in sctp_set_owner_w() for outgoing data chunks. Having access to
    the above values in /proc/net/sctp/assocs will provide a better understanding
    of SCTP buffer management.

    With patch applied, example output when peer.rwnd = 0

    where:
    ASSOC ffff880132298000 is sender
    ffff880125343000 is receiver

    ASSOC SOCK STY SST ST HBKT ASSOC-ID TX_QUEUE RX_QUEUE \
    ffff880132298000 ffff880124a0a0c0 2 1 3 29325 1 214656 0 \
    ffff880125343000 ffff8801237d7700 2 1 3 36210 2 0 524520 \

    UID INODE LPORT RPORT LADDRS RADDRS HBINT INS OUTS \
    0 25108 3455 3456 *10.4.8.3 *10.5.8.3 7500 2 2 \
    0 27819 3456 3455 *10.5.8.3 *10.4.8.3 7500 2 2 \

    MAXRT T1X T2X RTXC wmema wmemq sndbuf rcvbuf
    4 0 0 72 525633 440320 524288 524288
    4 0 0 0 1 0 524288 524288

    Signed-off-by: Dilip Daya
    Acked-by: Neil Horman
    Signed-off-by: David S. Miller

    Dilip Daya
     
  • the work has been scheduled from interrupt, and not been
    cancelled when the driver is unloaded, which doesn't remove
    the work item from the global workqueue. call the
    cancel_work_sync when the driver is removed (rmmod'ed).

    Cc: Sriram
    Cc: Cyril Chemparathy
    Cc: Vinay Hegde
    Signed-off-by: Devendra Naga
    Signed-off-by: David S. Miller

    Devendra Naga
     
  • Update debugging messages to a more current style.

    Emit these debugging messages at KERN_DEBUG instead
    of KERN_DEFAULT.

    Add and use neigh_dbg(level, fmt, ...) macro
    Add dynamic_debug capability via pr_debug
    Convert embedded function names to "%s: ", __func__

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

    Joe Perches
     
  • Implemented separate irq handling for edge and level type interrupt
    configuration. For edge type interrupts calls to disable_irq_nosync()
    and enable_irq() are removed. The at86rf230 resets the irq line only
    after the irq status register is read. Disabling the irq can lock the
    driver in situations where a irq is set by the radio while the driver
    is still reading the frame buffer.

    With irq_type configuration set to 0 the original behavior is
    preserverd.

    Additional the irq filter register is set to filter out all unused
    interrupts and the irq status register is read in the probe
    function to clear the irq line.

    Signed-off-by: Sascha Herrmann

    Conflicts:
    drivers/net/ieee802154/at86rf230.c
    Signed-off-by: David S. Miller

    Sascha Herrmann
     
  • Add option to at86rf230 platform data to configure the type of the
    interrupt used by the driver. The irq polarity of the device will
    be configured accordingly.

    Signed-off-by: Sascha Herrmann
    Signed-off-by: David S. Miller

    Sascha Herrmann
     
  • SIMPLE_DEV_PM_OPS macro can handle !CONFIG_PM_SLEEP case nicely, so there is no
    need to define PM_OPS for both CONFIG_PM_SLEEP and !CONFIG_PM_SLEEP cases.

    Remove the unneeded definitions.

    Cc: Lars-Peter Clausen
    Signed-off-by: Fabio Estevam
    Signed-off-by: David S. Miller

    Fabio Estevam
     
  • SIMPLE_DEV_PM_OPS macro can handle !CONFIG_PM_SLEEP case nicely, so there is no
    need to define PM_OPS for both CONFIG_PM_SLEEP and !CONFIG_PM_SLEEP cases.

    Remove the unneeded definitions.

    Signed-off-by: Fabio Estevam
    Signed-off-by: David S. Miller

    Fabio Estevam
     
  • SIMPLE_DEV_PM_OPS macro can handle !CONFIG_PM_SLEEP case nicely, so there is no
    need to define PM_OPS for both CONFIG_PM_SLEEP and !CONFIG_PM_SLEEP cases.

    Remove the unneeded definitions.

    Cc: Nithin Nayak Sujir
    Signed-off-by: Fabio Estevam
    Signed-off-by: David S. Miller

    Fabio Estevam
     
  • SIMPLE_DEV_PM_OPS macro can handle !CONFIG_PM_SLEEP case nicely, so there is no
    need to define PM_OPS for both CONFIG_PM_SLEEP and !CONFIG_PM_SLEEP cases.

    Remove the unneeded definitions.

    Cc: Jay Cliburn
    Signed-off-by: Fabio Estevam
    Signed-off-by: David S. Miller

    Fabio Estevam
     
  • SIMPLE_DEV_PM_OPS macro can handle !CONFIG_PM_SLEEP case nicely, so there is no
    need to define PM_OPS for both CONFIG_PM_SLEEP and !CONFIG_PM_SLEEP cases.

    Remove the unneeded definitions.

    Cc: Marc Kleine-Budde
    Signed-off-by: Fabio Estevam
    Acked-by: Marc Kleine-Budde
    Signed-off-by: David S. Miller

    Fabio Estevam
     

16 Apr, 2013

11 commits

  • This is a follow up patch to:

    f901b6b can: sja1000: fix define conflict on SH

    That patch fixed a define conflict between the SH architecture and the sja1000
    driver, by addind a prefix to one macro only. This patch consistently renames
    the prefix of the SJA1000 controller registers from "REG_" to "SJA1000_".

    Signed-off-by: Oliver Hartkopp
    Signed-off-by: Marc Kleine-Budde

    Oliver Hartkopp
     
  • Rather than defining ovs specific stats struct (vport_percpu_stats),
    we can use existing pcpu_tstats to achieve exactly same functionality.

    Signed-off-by: Pravin B Shelar
    Signed-off-by: Jesse Gross

    Pravin B Shelar
     
  • Currently OVS uses combination of genl and rtnl lock to protect
    datapath state. This was done due to networking stack locking.
    But this has complicated locking and there are few lock ordering
    issues with new tunneling protocols.
    Following patch simplifies locking by introducing new ovs mutex
    and now this lock is used to protect entire ovs state.

    Signed-off-by: Pravin B Shelar
    Signed-off-by: Jesse Gross

    Pravin B Shelar
     
  • Vlad Yasevich says:

    ====================
    Current dev_[uc|mc]_addr_sync() API currently correctly syncs the
    addresses to the first device. Any subsequent calls to sync will
    not do anything since the synched variable will be set. This
    variable is used as an optimization to skip over addresses that have
    been synched.

    There are some devices (ex: team) that attempt to do the above. There
    is other work in progress that needs to above to work corretly.

    The short series introduces dev_[uc|mc]_addr_synch_multiple() that
    allows multiple calls to sync to multiple different devices. Original
    API is left alone and still has the limitation.
    ====================

    Signed-off-by: David S. Miller

    David S. Miller
     
  • Team drivers attempts to sync addresses to each of the port
    devices; however, the current api doesn't really perform the sync
    for any device after the first one. Switch to using the new api
    that will actually sync the addresses to all ports.

    CC: Jiri Pirko
    Signed-off-by: Vlad Yasevich
    Signed-off-by: David S. Miller

    Vlad Yasevich
     
  • The current implementation of dev_uc_sync/unsync() assumes that there is
    a strict 1-to-1 relationship between the source and destination of the sync.
    In other words, once an address has been synced to a destination device, it
    will not be synced to any other device through the sync API.
    However, there are some virtual devices that aggreate a number of lower
    devices and need to sync addresses to all of them. The current
    API falls short there.

    This patch introduces a new dev_uc_sync_multiple() api that can be called
    in the above circumstances and allows sync to work for every invocation.

    CC: Jiri Pirko
    Signed-off-by: Vlad Yasevich
    Signed-off-by: David S. Miller

    Vlad Yasevich
     
  • Since dead only holds two states (0,1), make it a bool instead
    of a 'char', which is more appropriate for its purpose.

    Signed-off-by: Daniel Borkmann
    Acked-by: Vlad Yasevich
    Signed-off-by: David S. Miller

    Daniel Borkmann
     
  • There is actually no need to keep this member in the structure, because
    after init it's always 1 anyway, thus always kfree called. This seems to
    be an ancient leftover from the very initial implementation from 2.5
    times. Only in case the initialization of an association fails, we leave
    base.malloced as 0, but we nevertheless kfree it in the error path in
    sctp_association_new().

    Signed-off-by: Daniel Borkmann
    Acked-by: Vlad Yasevich
    Signed-off-by: David S. Miller

    Daniel Borkmann
     
  • The first backtrace appears on tx path with DMA mapping operations debug
    enabled.

    [ 345.637919] ------------[ cut here ]------------
    [ 345.637971] WARNING: at lib/dma-debug.c:937 check_unmap+0x4df/0x910()
    [ 345.637977] Hardware name: System Name
    [ 345.637987] sis900 0000:00:01.1: DMA-API: device driver failed to check map error[device address=0x000000000d4aed02] [si
    ze=60 bytes] [mapped as single]
    [ 345.637993] Modules linked in: bridge stp llc dmfe sundance 3c59x sis900
    [ 345.638022] Pid: 0, comm: swapper Not tainted 3.9.0-rc6+ #4
    [ 345.638028] Call Trace:
    [ 345.638042] [] ? check_unmap+0x4df/0x910
    [ 345.638059] [] warn_slowpath_common+0x7c/0xa0
    [ 345.638070] [] ? check_unmap+0x4df/0x910
    [ 345.638081] [] warn_slowpath_fmt+0x2e/0x30
    [ 345.638092] [] check_unmap+0x4df/0x910
    [ 345.638107] [] ? save_stack_trace+0x2b/0x50
    [ 345.638120] [] ? mark_lock+0x31e/0x5d0
    [ 345.638132] [] ? __lock_acquire+0x4ec/0x7d0
    [ 345.638143] [] debug_dma_unmap_page+0x6d/0x80
    [ 345.638166] [] sis900_interrupt+0x49c/0x860 [sis900]
    [ 345.638195] [] handle_irq_event_percpu+0x43/0x1c0
    [ 345.638206] [] ? handle_irq_event+0x2e/0x60
    [ 345.638217] [] handle_irq_event+0x37/0x60
    [ 345.638235] [] ? irq_set_chip_data+0x40/0x40
    [ 345.638246] [] handle_level_irq+0x52/0xa0
    [ 345.638251] [] ? do_IRQ+0x39/0xa0
    [ 345.638293] [] ? common_interrupt+0x31/0x36
    [ 345.638347] [] ? br_flood_forward+0x12/0x20 [bridge]
    [ 345.638364] [] ? br_dev_queue_push_xmit+0x60/0x60 [bridge]
    [ 345.638381] [] ? br_handle_frame_finish+0x25b/0x280 [bridge]
    [ 345.638399] [] ? br_handle_frame+0x193/0x290 [bridge]
    [ 345.638416] [] ? br_handle_frame_finish+0x280/0x280 [bridge]
    [ 345.638431] [] ? __netif_receive_skb_core+0x1d7/0x710
    [ 345.638442] [] ? __netif_receive_skb_core+0x69/0x710
    [ 345.638454] [] ? __netif_receive_skb+0x21/0x70
    [ 345.638464] [] ? process_backlog+0x85/0x130
    [ 345.638476] [] ? net_rx_action+0xfb/0x1d0
    [ 345.638497] [] ? __do_softirq+0xa8/0x1f0
    [ 345.638527] [] ? _raw_spin_unlock+0x1d/0x20
    [ 345.638538] [] ? handle_irq+0x20/0xd0
    [ 345.638550] [] ? irq_exit+0x97/0xa0
    [ 345.638560] [] ? do_IRQ+0x42/0xa0
    [ 345.638580] [] ? hrtimer_start+0x23/0x30
    [ 345.638580] [] ? common_interrupt+0x31/0x36
    [ 345.638580] [] ? default_idle+0x33/0xc0
    [ 345.638580] [] ? cpu_idle+0x4c/0x70
    [ 345.638580] [] ? rest_init+0xa0/0xb0
    [ 345.638580] [] ? reciprocal_value+0x50/0x50
    [ 345.638580] [] ? start_kernel+0x28f/0x320
    [ 345.638580] [] ? repair_env_string+0x60/0x60
    [ 345.638580] [] ? i386_start_kernel+0x39/0xa0
    [ 345.638580] ---[ end trace a244264b69b8a7ae ]---
    [ 345.638580] Mapped at:
    [ 345.638580] [] debug_dma_map_page+0x65/0x110
    [ 345.638580] [] sis900_start_xmit+0x129/0x210 [sis900]
    [ 345.638580] [] dev_hard_start_xmit+0x1b7/0x530
    [ 345.638580] [] sch_direct_xmit+0x8e/0x280
    [ 345.638580] [] dev_queue_xmit+0x1a9/0x5b0

    Signed-off-by: Denis Kirjanov
    Signed-off-by: David S. Miller

    Denis Kirjanov
     
  • Fix to return a negative error code from the error handling
    case instead of 0, as returned elsewhere in this function.

    Original-idea-by:
    Signed-off-by: Nicolas Ferre
    Signed-off-by: David S. Miller

    Nicolas Ferre
     
  • The multicast and broadcast packets may have RTCF_LOCAL set in rt_flags
    and therefore will be sent out bypassing encapsulation. This breaks
    delivery of packets sent to the vxlan multicast group.
    Disabling encapsulation bypass for multicasts and broadcasts fixes the
    issue.

    Signed-off-by: Mike Rapoport
    Tested-by: Cong Wang
    Acked-by: Sridhar Samudrala
    Tested-by: Sridhar Samudrala
    Signed-off-by: David S. Miller

    Mike Rapoport
     

15 Apr, 2013

6 commits

  • Commit 10b96f7306e5 (``tcp_memcontrol: remove a redundant statement
    in tcp_destroy_cgroup()'') says ``We read the value but make no use
    of it.'', but forgot to remove the variable declaration as well. This
    was a follow-up commit of 3f1346193 (``memcg: decrement static keys
    at real destroy time'') that removed the read of variable 'val'.

    This fixes therefore:

    CC net/ipv4/tcp_memcontrol.o
    net/ipv4/tcp_memcontrol.c: In function ‘tcp_destroy_cgroup’:
    net/ipv4/tcp_memcontrol.c:67:6: warning: unused variable ‘val’ [-Wunused-variable]

    Signed-off-by: Daniel Borkmann
    Signed-off-by: David S. Miller

    Daniel Borkmann
     
  • Currently, sock_tx_timestamp() always returns 0. The comment that
    describes the sock_tx_timestamp() function wrongly says that it
    returns an error when an invalid argument is passed (from commit
    20d4947353be, ``net: socket infrastructure for SO_TIMESTAMPING'').
    Make the function void, so that we can also remove all the unneeded
    if conditions that check for such a _non-existant_ error case in the
    output path.

    Signed-off-by: Daniel Borkmann
    Signed-off-by: David S. Miller

    Daniel Borkmann
     
  • Currently "bridge fdb show dev vxlan0" lists loopback address as
    "1.0.0.127". Using htonl(INADDR_LOOPBACK) rather than passing it
    directly to vxlan_snoop fixes the problem.

    Signed-off-by: Mike Rapoport
    Acked-by: Cong Wang
    Acked-by: Stephen Hemminger
    Signed-off-by: David S. Miller

    Mike Rapoport
     
  • Remove unnecessary macros that duplicate generic
    kernel functions.

    When a struct net_device is available:

    Convert printks to netdev_
    Convert netif_msg_ and ugeth_ to netif_

    Add pr_fmt. Standardize on newlines at end of format.
    Remove some duplicated newlines from output.
    Coalesce formats.

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

    Joe Perches
     
  • Use a more current logging style.

    Convert pr_ to netdev_ when a struct net_device is
    available. Add pr_fmt and neaten other formats too.

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

    Joe Perches
     
  • Use a more current logging message style.

    Convert the printks where a struct net_device is available to
    netdev_. Convert the other printks to pr_ and
    add pr_fmt where appropriate.

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

    Joe Perches
     

14 Apr, 2013

1 commit