30 Mar, 2014

5 commits


29 Mar, 2014

22 commits

  • Dropping packets in __dev_queue_xmit() when transmit queue
    is stopped (NIC TX ring buffer full or BQL limit reached) currently
    outputs a syslog message.

    It would be better to get a precise count of such events available in
    netdevice stats so that monitoring tools can have a clue.

    This extends the work done in caf586e5f23ce
    ("net: add a core netdev->rx_dropped counter")

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

    Eric Dumazet
     
  • Quite often it can be useful to test with dummy or similar
    devices as a blackhole sink for skbs. Such devices are only
    equipped with a single txq, but marked as NETIF_F_LLTX as
    they do not require locking their internal queues on xmit
    (or implement locking themselves). Therefore, rather use
    HARD_TX_{UN,}LOCK API, so that NETIF_F_LLTX will be respected.

    trafgen mmap/TX_RING example against dummy device with config
    foo: { fill(0xff, 64) } results in the following performance
    improvements for such scenarios on an ordinary Core i7/2.80GHz:

    Before:

    Performance counter stats for 'trafgen -i foo -o du0 -n100000000' (10 runs):

    160,975,944,159 instructions:k # 0.55 insns per cycle ( +- 0.09% )
    293,319,390,278 cycles:k # 0.000 GHz ( +- 0.35% )
    192,501,104 branch-misses:k ( +- 1.63% )
    831 context-switches:k ( +- 9.18% )
    7 cpu-migrations:k ( +- 7.40% )
    69,382 cache-misses:k # 0.010 % of all cache refs ( +- 2.18% )
    671,552,021 cache-references:k ( +- 1.29% )

    22.856401569 seconds time elapsed ( +- 0.33% )

    After:

    Performance counter stats for 'trafgen -i foo -o du0 -n100000000' (10 runs):

    133,788,739,692 instructions:k # 0.92 insns per cycle ( +- 0.06% )
    145,853,213,256 cycles:k # 0.000 GHz ( +- 0.17% )
    59,867,100 branch-misses:k ( +- 4.72% )
    384 context-switches:k ( +- 3.76% )
    6 cpu-migrations:k ( +- 6.28% )
    70,304 cache-misses:k # 0.077 % of all cache refs ( +- 1.73% )
    90,879,408 cache-references:k ( +- 1.35% )

    11.719372413 seconds time elapsed ( +- 0.24% )

    Signed-off-by: Daniel Borkmann
    Cc: Jesper Dangaard Brouer
    Signed-off-by: David S. Miller

    Daniel Borkmann
     
  • As in xmit path we merely update statistics and free the skb, we
    can mark the device with LLTX feature, so that upper layers can
    avoid taking the single txq lock on xmit. While at it, also add
    missing NETIF_F_SG.

    Signed-off-by: Daniel Borkmann
    Acked-by: Eric Dumazet
    Signed-off-by: David S. Miller

    Daniel Borkmann
     
  • Signed-off-by: Hariprasad Shenai
    Signed-off-by: David S. Miller

    Hariprasad Shenai
     
  • Signed-off-by: Hariprasad Shenai
    Signed-off-by: David S. Miller

    Hariprasad Shenai
     
  • Or Gerlitz says:

    ====================
    Implement vxlan ndo calls

    This short series adds support for the vxlan ndo calls, the udp
    port is programmed to the firmware using a new command we introduce
    here which is called "config device".
    ====================

    Signed-off-by: David S. Miller

    David S. Miller
     
  • Add implementation for the add/del vxlan port ndo calls, using the
    CONFIG_DEV firmware command.

    Signed-off-by: Or Gerlitz
    Signed-off-by: David S. Miller

    Or Gerlitz
     
  • Introduce the CONFIG_DEV firmware command which we will use to
    configure the UDP port assumed by the firmware for the VXLAN offloads.

    Signed-off-by: Or Gerlitz
    Signed-off-by: David S. Miller

    Or Gerlitz
     
  • When a VF issues a firmware command which is disallowed for them, the PF
    rerturns -EPERM from that command wrapper. Move to use one such wrapper
    instance, instead of repeating the same code on such commands.

    Signed-off-by: Or Gerlitz
    Signed-off-by: David S. Miller

    Or Gerlitz
     
  • Commit 2dc33bbc4 "bnx2x: Remove the sriov VFOP mechanism" introduced a possible
    memory leak on the error flow during multicast filters configuration.

    Reported-by: Dan Carpenter
    Signed-off-by: Yuval Mintz
    Signed-off-by: Ariel Elior
    Signed-off-by: David S. Miller

    Yuval Mintz
     
  • The pm_rumtime work queue is causing the device to be suspended during
    initialisation, thus the initialisation may not be able to access registers
    properly. As the code is called from a work queue, it is possible that this
    is not seen from certain configurations/builds due to the asynchronos
    nature of the code.

    Another issue has also been found where the network device registration
    calls back into the driver thus causing further pm_runtime calls that
    also caused issues with the MDIO bus code. This has now been checked
    and is the only place the MDIO can be called without the device open.

    Use pm_runtime_get_sync() and pm_runtime_put() to ensure that the
    pm system does not suspend it during the probe() call and remove the
    now unnecessary pm_runtime_resume() call. Also add a call in the error
    path to call pm_runtime_disable().

    This fixes the external abort that can cause /sbin/init or other such
    init processed to die.

    Signed-off-by: Ben Dooks
    Tested-by: Geert Uytterhoeven
    Acked-by: Laurent Pinchart
    Signed-off-by: David S. Miller

    Ben Dooks
     
  • Like the STi and sunxi series SOCs, Altera's SOCFPGA also needs a glue layer
    on top of the Synopsys gmac IP.

    This patch adds the platform driver for the glue layer which configures the IP
    before the generic STMMAC driver takes over.

    Signed-off-by: Dinh Nguyen
    Signed-off-by: David S. Miller

    Dinh Nguyen
     
  • If kmalloc() fails in c4iw_alloc_ucontext(), the function
    leaves but does not set an error code in ret variable:
    it will return 0 to the caller.

    This patch set ret to -ENOMEM in such case.

    Cc: Steve Wise
    Cc: Steve Wise
    Signed-off-by: Yann Droneaud
    Acked-by: Steve Wise
    Signed-off-by: David S. Miller

    Yann Droneaud
     
  • Erik Hugne says:

    ====================
    tipc: fix handling of NETDEV_CHANGEADDR event

    Aside from manual reconfiguration of the netdevice hwaddr, this can also
    be changed automatically for an interface bond in active-backup mode
    if fail_over_mac is enabled. This patchset fixes the handling of this
    event in TIPC by properly updating the l2 media address for the bearer,
    followed by a reinitialization of the node discovery mechanism.
    ====================

    Signed-off-by: David S. Miller

    David S. Miller
     
  • The node discovery domain is assigned when a bearer is enabled.
    In the previous commit we reflect this attribute directly in the
    bearer structure since it's needed to reinitialize the node
    discovery mechanism after a hardware address change.

    There's no need to replicate this attribute anywhere else, so we
    remove it from the tipc_link_req structure.

    Signed-off-by: Erik Hugne
    Reviewed-by: Ying Xue
    Signed-off-by: David S. Miller

    Erik Hugne
     
  • If the hardware address of a underlying netdevice is changed, it is
    not enough to simply reset the bearer/links over this device. We
    also need to reflect this change in the TIPC bearer and node
    discovery structures aswell.

    This patch adds the necessary reinitialization of the node disovery
    mechanism following a hardware address change so that the correct
    originating media address is advertised in the discovery messages.

    Signed-off-by: Erik Hugne
    Reported-by: Dong Liu
    Reviewed-by: Ying Xue
    Signed-off-by: David S. Miller

    Erik Hugne
     
  • Jeff Kirsher says:

    ====================
    Intel Wired LAN Driver Updates

    This series contains updates to e1000e, igb, i40e and i40evf

    Anjali provides i40e fix to remove the ATR filter on RST as well as FIN
    packets. Cleans up add_del_fdir() because it was used and implemented
    only for the add, so change the name and drop a parameter. Adds the
    ability to drop a flow if we wanted to and adds a flow director
    message level to be used for flow director specific messages.

    Mitch fixes an issue on i40evf where the Tx watchdog handler was causing
    an oops when sending an admin queue message to request a reset because
    the admin queue functions use spinlocks.

    Greg provides a change to i40e to make the alloc and free queue vector
    calls orthogonal.

    Shannon fixes i40e to verify the eeprom checksum and firmware CRC status
    bits, and shutdown the driver if they fail. This change stops the
    processing of traffic, but does not kill the PF netdev so that the
    NVMUpdate process still has a chance at fixing the image. Also provides
    a fix to make sure the VSI has a netdev before trying to use it in
    the debugfs netdev_ops commands.

    Jakub Kicinski provides patches for e1000e and igb to fix a number issues
    found in the PTP code.

    v2:
    - drop patch 11 "i40e: Add a fallback debug flow for the driver" from the
    series based on feedback from David Miller
    ====================

    Signed-off-by: David S. Miller

    David S. Miller
     
  • This fixes following:

    drivers/net/ethernet/samsung/sxgbe/sxgbe_main.c:1828 sxgbe_hw_init()
    error: potential null dereference 'priv->hw'. (kmalloc returns null)

    Reported-by: kbuild test robot
    Signed-off-by: Byungho An
    Signed-off-by: David S. Miller

    Byungho An
     
  • This fixes followings:

    sparse warnings: (new ones prefixed by >>)

    >> drivers/net/ethernet/samsung/sxgbe/sxgbe_platform.c:197:5:
    sparse: symbol 'sxgbe_platform_freeze' was not declared. Should it be static?
    >> drivers/net/ethernet/samsung/sxgbe/sxgbe_platform.c:204:5:
    sparse: symbol 'sxgbe_platform_restore' was not declared. Should it be static?
    >> drivers/net/ethernet/samsung/sxgbe/sxgbe_platform.c:228:24:
    sparse: symbol 'sxgbe_platform_driver' was not declared. Should it be static?

    >> drivers/net/ethernet/samsung/sxgbe/sxgbe_main.c:1795:6:
    sparse: symbol 'sxgbe_get_ops' was not declared. Should it be static?

    Reported-by: kbuild test robot
    Signed-off-by: Byungho An
    Signed-off-by: David S. Miller

    Byungho An
     
  • Sathya Perla says:

    ====================
    be2net: add vxlan offload support

    The first patch adds the FW cmds needed to configure the Skyhawk-R
    chip for supporting VxLAN offloads. The second patch implements the
    ndo_add/del_vxlan_port() methods and the plumbing for supporting
    RX/TX csum, TSO and RSS steering offloads for VxLAN traffic.

    v2 changes:
    NETIF_F_SG need not be set for hw_enc_features by the driver as it is
    done by the stack.

    v3 changes:
    * Defer FW cmds needed for VxLAN offloads to a workqueue
    * Reset FW to VxLAN offloads disabled state in the unload path

    v4 changes:
    * Revert the usage of workqueue (introduced in v3) to implement
    ndo_add/del_vxlan_port() as it is currently not needed (none of the
    FW cmd calls sleep.) Suggested by David M.
    ====================

    Signed-off-by: David S. Miller

    David S. Miller
     
  • This patch mainly implements the add/del_vxlan_port() methods by invoking
    the needed FW cmds for supporting VxLAN offloads for Skyhawk-R.

    Signed-off-by: Sathya Perla
    Signed-off-by: David S. Miller

    Sathya Perla
     
  • This patch adds support for the FW cmds needed for VxLAN offloads
    on Skyhawk-R:
    1) The VxLAN UDP port needs to be configured via the port-desc of
    SET_PROFILE_CONFIG_v1 cmd.
    This patch re-factors the be_set_profile_config() code (used so far
    only for setting VF QoS) to be used to set any type of descriptor.
    2) The MANAGE_IFACE_FILTERS cmds is needed to convert a normal interface
    into a tunnel interface. This allows for RSS to work even on the inner
    TCP/UDP headers of VxLAN traffic.

    Signed-off-by: Sathya Perla
    Signed-off-by: David S. Miller

    Sathya Perla
     

28 Mar, 2014

13 commits

  • igb has a single set of TX time stamping resources per NIC.
    Use a simple bit lock to avoid race conditions and leaking skbs
    when multiple TX rings try to claim time stamping.

    Signed-off-by: Jakub Kicinski
    Tested-by: Aaron Brown
    Signed-off-by: Jeff Kirsher

    Jakub Kicinski
     
  • skb_tx_timestamp() does not report software time stamp
    if SKBTX_IN_PROGRESS is set. According to timestamping.txt
    software time stamps are a fallback and should not be
    generated if hardware time stamp is provided.

    Move call to skb_tx_timestamp() after setting
    SKBTX_IN_PROGRESS.

    Signed-off-by: Jakub Kicinski
    Tested-by: Aaron Brown
    Signed-off-by: Jeff Kirsher

    Jakub Kicinski
     
  • tx_hwtstamp_skb is always set before work is scheduled,
    work is cancelled before tx_hwtstamp_skb is set to NULL.
    PTP work cannot ever see tx_hwtstamp_skb set to NULL.

    Signed-off-by: Jakub Kicinski
    Tested-by: Aaron Brown
    Signed-off-by: Jeff Kirsher

    Jakub Kicinski
     
  • Hardware may fail to report time stamp e.g.:
    - when hardware time stamping is not enabled
    - when time stamp is requested shortly after ifup

    Timeout time stamp reading work to prevent it from
    scheduling itself indefinitely. Report timeout events
    via system log and device stats.

    Signed-off-by: Jakub Kicinski
    Tested-by: Aaron Brown
    Signed-off-by: Jeff Kirsher

    Jakub Kicinski
     
  • We don't need to print this info unless at FD message level.

    Change-ID: I329efdd8e754a0ea0669ec04d12e03db02e6b76e
    Signed-off-by: Anjali Singhai Jain
    Signed-off-by: Catherine Sullivan
    Tested-by: Kavindya Deegala
    Signed-off-by: Jeff Kirsher

    Anjali Singhai Jain
     
  • To use for Flow Director specific messages.

    Change-ID: I69e39a410aa2661f8fd1ed6af0126fa4c335cb77
    Signed-off-by: Anjali Singhai Jain
    Acked-by: Shannon Nelson
    Acked-by: Kevin Scott
    Signed-off-by: Catherine Sullivan
    Tested-by: Kavindya Deegala
    Signed-off-by: Jeff Kirsher

    Anjali Singhai Jain
     
  • Make sure the VSI has a netdev before trying to use it
    in the debugfs netdev_ops commands.

    Change-ID: I2d744fc0c32b3226534ce2cde171d9675c5440a6
    Signed-off-by: Shannon Nelson
    Signed-off-by: Catherine Sullivan
    Tested-by: Kavindya Deegala
    Signed-off-by: Jeff Kirsher

    Shannon Nelson
     
  • There were two spaces between return and the value, we only need one.

    Change-ID: Iaa42c33f50d8d149cdf1a4c9c1902295bfd991c4
    Signed-off-by: Jesse Brandeburg
    Acked-by: Shannon Nelson
    Signed-off-by: Kevin Scott
    Signed-off-by: Catherine Sullivan
    Tested-by: Kavindya Deegala
    Signed-off-by: Jeff Kirsher

    Jesse Brandeburg
     
  • With this change we can drop a flow if we wanted to.

    Change-ID: I222b1ae960e61a31965bafe3159a95099e70c7d2
    Signed-off-by: Anjali Singhai Jain
    Signed-off-by: Catherine Sullivan
    Tested-by: Kavindya Deegala
    Signed-off-by: Jeff Kirsher

    Anjali Singhai Jain
     
  • Function add_del_fdir was used and implemented only for add. So change the name
    and drop a parameter.

    Change-ID: Icf2c6c3bbd4fd00cf8d9613a3f6d8c08e0f8e288
    Signed-off-by: Anjali Singhai Jain
    Signed-off-by: Catherine Sullivan
    Tested-by: Kavindya Deegala
    Signed-off-by: Jeff Kirsher

    Anjali Singhai Jain
     
  • The driver needs to verify the eeprom checksum and firmware crc status bits,
    and shutdown the driver if they fail. This code stops the processing of traffic,
    but doesn't kill the PF netdev so that the NVMUpdate process should still have a
    chance at fixing the image. The eeprom is checked on driver load and after an
    EMP reset, the latter of which should be generated after an NVMUpdate.

    Change-ID: I34deef21d2e16bf5a43c603cf8af27e6a29dc9d2
    Signed-off-by: Shannon Nelson
    Signed-off-by: Catherine Sullivan
    Tested-by: Kavindya Deegala
    Signed-off-by: Jeff Kirsher

    Shannon Nelson
     
  • It's annoying to search for a matching alloc and free set of function calls
    when they don't use the same framework for the name of the functions. Fix
    that up in the case of alloc and free of vsi queue vectors.

    i40e_vsi_free_q*
    i40e_vsi_alloc_q*

    Change-ID: I510eb863a0fbe405312bebea55c2846c76285e6d
    Signed-off-by: Greg Rose
    Signed-off-by: Catherine Sullivan
    Tested-by: Kavindya Deegala
    Signed-off-by: Jeff Kirsher

    Greg Rose
     
  • The Tx watchdog handler runs in interrupt context, so it would cause an
    oops when sending an admin queue message to request a reset, because the
    admin queue functions use spinlocks.

    Instead, set a flag and let the reset task handle sending the request.

    Change-ID: I65879470b72963d9c308edfb8f45ac4fbba2c14f
    Signed-off-by: Mitch Williams
    Signed-off-by: Catherine Sullivan
    Tested-by: Sibai Li
    Signed-off-by: Jeff Kirsher

    Mitch Williams