29 Sep, 2011

1 commit

  • Since commit 7361c36c5224 (af_unix: Allow credentials to work across
    user and pid namespaces) af_unix performance dropped a lot.

    This is because we now take a reference on pid and cred in each write(),
    and release them in read(), usually done from another process,
    eventually from another cpu. This triggers false sharing.

    # Events: 154K cycles
    #
    # Overhead Command Shared Object Symbol
    # ........ ....... .................. .........................
    #
    10.40% hackbench [kernel.kallsyms] [k] put_pid
    8.60% hackbench [kernel.kallsyms] [k] unix_stream_recvmsg
    7.87% hackbench [kernel.kallsyms] [k] unix_stream_sendmsg
    6.11% hackbench [kernel.kallsyms] [k] do_raw_spin_lock
    4.95% hackbench [kernel.kallsyms] [k] unix_scm_to_skb
    4.87% hackbench [kernel.kallsyms] [k] pid_nr_ns
    4.34% hackbench [kernel.kallsyms] [k] cred_to_ucred
    2.39% hackbench [kernel.kallsyms] [k] unix_destruct_scm
    2.24% hackbench [kernel.kallsyms] [k] sub_preempt_count
    1.75% hackbench [kernel.kallsyms] [k] fget_light
    1.51% hackbench [kernel.kallsyms] [k]
    __mutex_lock_interruptible_slowpath
    1.42% hackbench [kernel.kallsyms] [k] sock_alloc_send_pskb

    This patch includes SCM_CREDENTIALS information in a af_unix message/skb
    only if requested by the sender, [man 7 unix for details how to include
    ancillary data using sendmsg() system call]

    Note: This might break buggy applications that expected SCM_CREDENTIAL
    from an unaware write() system call, and receiver not using SO_PASSCRED
    socket option.

    If SOCK_PASSCRED is set on source or destination socket, we still
    include credentials for mere write() syscalls.

    Performance boost in hackbench : more than 50% gain on a 16 thread
    machine (2 quad-core cpus, 2 threads per core)

    hackbench 20 thread 2000

    4.228 sec instead of 9.102 sec

    Signed-off-by: Eric Dumazet
    Acked-by: Tim Chen
    Signed-off-by: David S. Miller

    Eric Dumazet
     

28 Sep, 2011

4 commits

  • Most boards with SysKonnect/Marvell Ethernet have only a single port.
    For the single port case, use the standard Ethernet driver convention
    of allocating IRQ when device is brought up rather than at probe time.

    This patch also adds some additional read after writes to avoid any
    PCI posting problems when setting the IRQ mask.

    The error handling of dual port cards is also changed. If second port
    can not be brought up, then just fail. No point in continuing, since
    the failure is most certainly because of out of memory.

    It is worth noting that the dual port skge device has a single irq but two
    seperate status rings and therefore has two NAPI objects, one for
    each port.

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

    Stephen Hemminger
     
  • This fix provides a newly flashed FW version (appended, in braces)
    along with the currently running FW version via ethtool. The newly
    flashed version runs only after a system reset.

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

    Sathya Perla
     
  • Re-posting with subject fixed!

    Multicast programming has been broken since commit 5b8821b7. Setting the
    MULTICAST flag while sending the cmd to the FW was missing. Fixed this.

    Also fixed-up some indentation in the adjacent lines.

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

    Sathya Perla
     
  • Rename struct tcp_skb_cb "flags" to "tcp_flags" to ease code review and
    maintenance.

    Its content is a combination of FIN/SYN/RST/PSH/ACK/URG/ECE/CWR flags

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

    Eric Dumazet
     

27 Sep, 2011

12 commits

  • struct tcp_skb_cb contains a "flags" field containing either tcp flags
    or IP dsfield depending on context (input or output path)

    Introduce ip_dsfield to make the difference clear and ease maintenance.
    If later we want to save space, we can union flags/ip_dsfield

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

    Eric Dumazet
     
  • This patch touchs most of the enic port profile handling code.
    Tried to break it into sub patches without success.

    The patch mainly does the following:
    - Port profile operations for a SRIOV VF are modified to work
    only via its PF
    - Changes the port profile static struct in struct enic to a pointer.
    This is because a SRIOV PF has to now hold the port profile information
    for all its VF's
    - Moved address registration for VF's during port profile ASSOCIATE time
    - Most changes in port profile handling code are changes related to indexing
    into the port profile struct array of a PF for the VF port profile
    information

    Signed-off-by: Roopa Prabhu
    Signed-off-by: Sujith Sankar
    Signed-off-by: Christian Benvenuti
    Signed-off-by: David Wang
    Signed-off-by: David S. Miller

    Roopa Prabhu
     
  • This patch adds helper functions to use PF as proxy for SRIOV VF firmware
    commands.

    Signed-off-by: Roopa Prabhu
    Signed-off-by: Sujith Sankar
    Signed-off-by: Christian Benvenuti
    Signed-off-by: David Wang
    Signed-off-by: David S. Miller

    Roopa Prabhu
     
  • This patch adds support to enable SRIOV on enic devices. Enic SRIOV VF's are dynamic vnics and will use the same driver code as dynamic vnics.

    Signed-off-by: Roopa Prabhu
    Signed-off-by: Sujith Sankar
    Signed-off-by: Christian Benvenuti
    Signed-off-by: David Wang
    Signed-off-by: David S. Miller

    Roopa Prabhu
     
  • While playing with a new ADSL box at home, I discovered that ECN
    blackhole can trigger suboptimal quickack mode on linux : We send one
    ACK for each incoming data frame, without any delay and eventual
    piggyback.

    This is because TCP_ECN_check_ce() considers that if no ECT is seen on a
    segment, this is because this segment was a retransmit.

    Refine this heuristic and apply it only if we seen ECT in a previous
    segment, to detect ECN blackhole at IP level.

    Signed-off-by: Eric Dumazet
    CC: Jamal Hadi Salim
    CC: Jerry Chu
    CC: Ilpo Järvinen
    CC: Jim Gettys
    CC: Dave Taht
    Acked-by: Ilpo Järvinen
    Signed-off-by: David S. Miller

    Eric Dumazet
     
  • Most sky2 hardware only has a single port, although some variations of the
    chip support two interfaces. For the single port case, use the standard
    Ethernet driver convention of allocating IRQ when device is brought up
    rather than at probe time.

    Also, change the error handling of dual port cards so that if second
    port can not be brought up, then just fail. No point in continuing, since
    the failure is most certainly because of out of memory.

    The dual port sky2 device has a single irq and a single status ring,
    therefore it has a single NAPI object shared by both ports.

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

    stephen hemminger
     
  • netdev is unused in pch_gbe_setup_rctl. Remove this declaration to
    avoid a compiler warning.

    Signed-off-by: Jon Mason
    Signed-off-by: David S. Miller

    Jon Mason
     
  • Device drivers that create and destroy SR-IOV virtual functions via
    calls to pci_enable_sriov() and pci_disable_sriov can cause catastrophic
    failures if they attempt to destroy VFs while they are assigned to
    guest virtual machines. By adding a flag for use by the Xen PCI back
    to indicate that a device is assigned a device driver can check that
    flag and avoid destroying VFs while they are assigned and avoid system
    failures.

    Signed-off-by: Konrad Rzeszutek Wilk
    Signed-off-by: David S. Miller

    Konrad Rzeszutek Wilk
     
  • Currently ehea ndo_get_stats can sleep in two places, in a hcall
    and in a GFP_KERNEL alloc, which is not correct.
    This patch creates a delayed workqueue that grabs the information each 1
    sec from the hardware, and place it into the device structure, so that,
    .ndo_get_stats quickly returns the device structure statistics block.

    Signed-off-by: Breno Leitao
    Acked-by: Eric Dumazet
    Signed-off-by: David S. Miller

    brenohl@br.ibm.com
     
  • This commit adds one step support to the phyter. When enabled, the
    hardware does not provide time stamps for transmitted sync messages but
    instead inserts the stamp into the outgoing packet.

    Signed-off-by: Richard Cochran
    Signed-off-by: David S. Miller

    Richard Cochran
     
  • The IEEE 1588 standard (PTP) has a provision for a "one step" mode, where
    time stamps on outgoing event packets are inserted into the packet by the
    hardware on the fly. This patch adds a new flag for the SIOCSHWTSTAMP
    ioctl that lets user space programs request this mode.

    Signed-off-by: Richard Cochran
    Signed-off-by: David S. Miller

    Richard Cochran
     
  • This patch enables six external event channels and one periodic output.
    One GPIO is reserved for synchronizing multiple PHYs. The assignment
    of GPIO functions can be changed via a module parameter.

    The code supports multiple simultaneous events by inducing a PTP clock
    event for every channel marked in the PHY's extended status word.

    Signed-off-by: Richard Cochran
    Signed-off-by: David S. Miller

    Richard Cochran
     

24 Sep, 2011

18 commits

  • Argument list to CDRP function has become unmanageably long. Fix it by properly
    declaring a struct that encompasses all the input and output parameters.

    Signed-off-by: Anirban Chakraborty
    Signed-off-by: David S. Miller

    Anirban Chakraborty
     
  • Signed-off-by: Ameen Rahman
    Signed-off-by: Anirban Chakraborty
    Signed-off-by: David S. Miller

    Ameen Rahman
     
  • David S. Miller
     
  • The imx6q enet is a derivative of imx28 enet controller. It fixed
    the frame endian issue found on imx28, and added 1 Gbps support.

    It also fixes a typo on vendor name in Kconfig.

    Signed-off-by: Shawn Guo
    Signed-off-by: David S. Miller

    Shawn Guo
     
  • In function fec_enet_mii_init(), it uses non-zero pdev->id as part
    of the condition to check the second fec instance (fec1). This works
    before the driver supports device tree probe. But in case of device
    tree probe, pdev->id is -1 which is also non-zero, so the logic becomes
    broken when device tree probe gets supported.

    The patch change the logic to check "pdev->id > 0" as the part of the
    condition for identifying fec1.

    Signed-off-by: Shawn Guo
    Signed-off-by: David S. Miller

    Shawn Guo
     
  • FEC can work without a phy reset on some platforms, which means not
    very platform necessarily have a phy-reset gpio encoded in device tree.
    Even on the platforms that have the gpio, FEC can work without
    resetting phy for some cases, e.g. boot loader has done that.

    So it makes more sense to have the phy-reset-gpio request failure as
    a debug message rather than a warning, and get fec_reset_phy() return
    void since the caller does not check the return anyway.

    Signed-off-by: Shawn Guo
    Signed-off-by: David S. Miller

    Shawn Guo
     
  • Finish conversion to unified ethtool ops: convert get_flags.

    Signed-off-by: Michał Mirosław
    Tested-by: Aaron Brown
    Signed-off-by: Jeff Kirsher
    Signed-off-by: David S. Miller

    Michał Mirosław
     
  • Really trivial fix, use kmalloc/kfree instead of stack space.
    use static const instead of const to further reduce stack usage.

    V2: reflect changes suggested by Joe Perches

    before:
    [jbrandeb@jbrandeb-mobl2 linux-2.6]$ make checkstack|grep '\[ixgb\]'
    0x00000fc1 ixgb_set_multi [ixgb]: 768
    0x00001031 ixgb_set_multi [ixgb]: 768
    0x000010f2 ixgb_set_multi [ixgb]: 768
    0x061c ixgb_check_options [ixgb]: 448
    0x09c3 ixgb_check_options [ixgb]: 448
    0x0000649e ixgb_set_ringparam [ixgb]: 192
    0x0000130d ixgb_xmit_frame [ixgb]: 184
    0x000019e0 ixgb_xmit_frame [ixgb]: 184
    0x00002267 ixgb_clean [ixgb]: 152
    0x00002673 ixgb_clean [ixgb]: 152

    after:
    0x000064ee ixgb_set_ringparam [ixgb]: 192
    0x0000135d ixgb_xmit_frame [ixgb]: 184
    0x00001a30 ixgb_xmit_frame [ixgb]: 184
    0x000022b7 ixgb_clean [ixgb]: 152
    0x000026c3 ixgb_clean [ixgb]: 152

    Signed-off-by: Jesse Brandeburg
    Tested-by: Aaron Brown
    Signed-off-by: Jeff Kirsher
    Signed-off-by: David S. Miller

    Jesse Brandeburg
     
  • David S. Miller
     
  • The SEEQ drivers should depend on HAS_IOMEM to prevent compile breakage
    on !HAS_IOMEM architectures:

    drivers/net/ethernet/seeq/seeq8005.c: In function 'seeq8005_probe1':
    drivers/net/ethernet/seeq/seeq8005.c:179:2: error:
    implicit declaration of function 'inw' [-Werror=implicit-function-declaration]

    Cc: Jeff Kirsher
    Signed-off-by: Heiko Carstens
    Signed-off-by: David S. Miller

    Heiko Carstens
     
  • Reloading FW during resets can cause issues. Remove the full reset
    as it is not needed.

    Signed-off-by: Emil Tantilov
    Tested-by: Phil Schmitt
    Signed-off-by: Jeff Kirsher

    Emil Tantilov
     
  • Add support for WOL as determined by the EEPROM.

    Signed-off-by: Emil Tantilov
    Tested-by: Phil Schmitt
    Signed-off-by: Jeff Kirsher

    Emil Tantilov
     
  • This change is meant to avoid a hardware lockup when Tx work is still
    pending and we request a reset.

    Signed-off-by: Emil Tantilov
    Tested-by: Phil Schmitt
    Signed-off-by: Jeff Kirsher

    Emil Tantilov
     
  • This patch adds support for configuring the priority to
    traffic class mapping.

    Signed-off-by: John Fastabend
    Tested-by: Ross Brattain
    Signed-off-by: Jeff Kirsher

    John Fastabend
     
  • We don't need SFP+ plugable support for X540 hardware (copper only) so
    don't enable the SFP+ interrupts.

    Signed-off-by: Don Skidmore
    Tested-by: Phil Schmitt
    Signed-off-by: Jeff Kirsher

    Don Skidmore
     
  • The DCB CEE command set_state() will complete successfully
    but is misleading because it enables IEEE mode. After
    this patch the command is failed.

    And IEEE PFC/ETS is managed from ieee paths now instead
    of using CEE primitives.

    Signed-off-by: John Fastabend
    Tested-by: Ross Brattain
    Signed-off-by: Jeff Kirsher

    John Fastabend
     
  • Use the PCI device flag indicating if a VF is assigned to a guest VM
    to guard against destroying VFs upon driver removal. Implement
    additional feature to detect if VFs already exist when the driver
    is loaded and if so configure them and set the driver state to
    SR-IOV enabled.

    Signed-off-by: Greg Rose
    Signed-off-by: Jeff Kirsher

    Greg Rose
     
  • Device drivers that create and destroy SR-IOV virtual functions via
    calls to pci_enable_sriov() and pci_disable_sriov can cause catastrophic
    failures if they attempt to destroy VFs while they are assigned to
    guest virtual machines. By adding a flag for use by the KVM module
    to indicate that a device is assigned a device driver can check that
    flag and avoid destroying VFs while they are assigned and avoid system
    failures.

    CC: Ian Campbell
    CC: Konrad Wilk
    Signed-off-by: Greg Rose
    Acked-by: Jesse Barnes
    Signed-off-by: Jeff Kirsher

    Greg Rose
     

23 Sep, 2011

5 commits