01 Aug, 2013

18 commits

  • With the addition of the suppress operation
    (7764a45a8f1fe74d4f7d301eaca2e558e7e2831a ("fib_rules: add .suppress
    operation") we rely on accurate error reporting of the fib_rules.actions.

    fib6_rule_action always returned -EAGAIN in case we could not find a
    matching route and 0 if a rule was matched. This also included a match
    for blackhole or prohibited rule actions which could get suppressed by
    the new logic.

    So adapt fib6_rule_action to always return the correct error code as
    its counterpart fib4_rule_action does. This also fixes a possiblity of
    nullptr-deref where we don't find a table, thus rt == NULL. Because
    the condition rt != ip6_null_entry still holdes it seems we could later
    get a nullptr bug on dereference rt->dst.

    v2:
    a) Fixed a brain fart in the commit msg (the rule => a table, etc). No
    changes to the patch.

    Cc: Stefan Tomanek
    Cc: Hideaki YOSHIFUJI
    Signed-off-by: Hannes Frederic Sowa
    Signed-off-by: David S. Miller

    Hannes Frederic Sowa
     
  • There are a mix of function prototypes with and without extern
    in the kernel sources. Standardize on not using extern for
    function prototypes.

    Function prototypes don't need to be written with extern.
    extern is assumed by the compiler. Its use is as unnecessary as
    using auto to declare automatic/local variables in a block.

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

    Joe Perches
     
  • There are a mix of function prototypes with and without extern
    in the kernel sources. Standardize on not using extern for
    function prototypes.

    Function prototypes don't need to be written with extern.
    extern is assumed by the compiler. Its use is as unnecessary as
    using auto to declare automatic/local variables in a block.

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

    Joe Perches
     
  • There are a mix of function prototypes with and without extern
    in the kernel sources. Standardize on not using extern for
    function prototypes.

    Function prototypes don't need to be written with extern.
    extern is assumed by the compiler. Its use is as unnecessary as
    using auto to declare automatic/local variables in a block.

    Reflow modified prototypes to 80 columns.

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

    Joe Perches
     
  • There are a mix of function prototypes with and without extern
    in the kernel sources. Standardize on not using extern for
    function prototypes.

    Function prototypes don't need to be written with extern.
    extern is assumed by the compiler. Its use is as unnecessary as
    using auto to declare automatic/local variables in a block.

    Reflow modified prototypes to 80 columns.

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

    Joe Perches
     
  • There are a mix of function prototypes with and without extern
    in the kernel sources. Standardize on not using extern for
    function prototypes.

    Function prototypes don't need to be written with extern.
    extern is assumed by the compiler. Its use is as unnecessary as
    using auto to declare automatic/local variables in a block.

    Reflow modified prototypes to 80 columns.

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

    Joe Perches
     
  • There are a mix of function prototypes with and without extern
    in the kernel sources. Standardize on not using extern for
    function prototypes.

    Function prototypes don't need to be written with extern.
    extern is assumed by the compiler. Its use is as unnecessary as
    using auto to declare automatic/local variables in a block.

    Reflow modified prototypes to 80 columns.

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

    Joe Perches
     
  • There are a mix of function prototypes with and without extern
    in the kernel sources. Standardize on not using extern for
    function prototypes.

    Function prototypes don't need to be written with extern.
    extern is assumed by the compiler. Its use is as unnecessary as
    using auto to declare automatic/local variables in a block.

    Reflow modified prototypes to 80 columns.

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

    Joe Perches
     
  • There are a mix of function prototypes with and without extern
    in the kernel sources. Standardize on not using extern for
    function prototypes.

    Function prototypes don't need to be written with extern.
    extern is assumed by the compiler. Its use is as unnecessary as
    using auto to declare automatic/local variables in a block.

    Reflow modified prototypes to 80 columns.

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

    Joe Perches
     
  • A collection of expectations and operational details about how
    networking development takes place in the context of the netdev
    mailing list.

    The content is meant to capture specific items that are unique
    to netdev workflow, and not re-document generic linux expectations
    that are already captured elsewhere.

    This was originally proposed[1] as a regular posting mailing list
    FAQ, but it probably is more universally accessible here in tree.

    [1] https://lwn.net/Articles/559211/

    Signed-off-by: Paul Gortmaker
    Signed-off-by: David S. Miller

    Paul Gortmaker
     
  • This change adds a new operation to the fib_rules_ops struct; it allows the
    suppression of routing decisions if certain criteria are not met by its
    results.

    The first implemented constraint is a minimum prefix length added to the
    structures of routing rules. If a rule is added with a minimum prefix length
    >0, only routes meeting this threshold will be considered. Any other (more
    general) routing table entries will be ignored.

    When configuring a system with multiple network uplinks and default routes, it
    is often convinient to reference the main routing table multiple times - but
    omitting the default route. Using this patch and a modified "ip" utility, this
    can be achieved by using the following command sequence:

    $ ip route add table secuplink default via 10.42.23.1

    $ ip rule add pref 100 table main prefixlength 1
    $ ip rule add pref 150 fwmark 0xA table secuplink

    With this setup, packets marked 0xA will be processed by the additional routing
    table "secuplink", but only if no suitable route in the main routing table can
    be found. By using a minimal prefixlength of 1, the default route (/0) of the
    table "main" is hidden to packets processed by rule 100; packets traveling to
    destinations with more specific routing entries are processed as usual.

    Signed-off-by: Stefan Tomanek
    Signed-off-by: David S. Miller

    Stefan Tomanek
     
  • There are a mix of function prototypes with and without extern
    in the kernel sources. Standardize on not using extern for
    function prototypes.

    Function prototypes don't need to be written with extern.
    extern is assumed by the compiler. Its use is as unnecessary as
    using auto to declare automatic/local variables in a block.

    Reflow modified prototypes to 80 columns.

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

    Joe Perches
     
  • It is illegal to set skb->sk without corresponding destructor.

    Its therefore safe for skb_orphan() to not clear skb->sk if
    skb->destructor is not set.

    Also avoid clearing skb->destructor if already NULL.

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

    Eric Dumazet
     
  • Commit 547669d483e578 ("tcp: xps: fix reordering issues") added
    unexpected reorders in case netem is used in a MQ setup for high
    performance test bed.

    ETH=eth0
    tc qd del dev $ETH root 2>/dev/null
    tc qd add dev $ETH root handle 1: mq
    for i in `seq 1 32`
    do
    tc qd add dev $ETH parent 1:$i netem delay 100ms
    done

    As all tcp packets are orphaned by netem, TCP stack believes it can
    set skb->ooo_okay on all packets.

    In order to allow producers to send more packets, we want to
    keep sk_wmem_alloc from reaching sk_sndbuf limit.

    We can do that by accounting one byte per skb in netem queues,
    so that TCP stack is not fooled too much.

    Tested:

    With above MQ/netem setup, scaling number of concurrent flows gives
    linear results and no reorders/retransmits

    lpq83:~# for n in 1 10 20 30 40 50 60 70 80 90 100
    do echo -n "n:$n " ; ./super_netperf $n -H 10.7.7.84; done
    n:1 198.46
    n:10 2002.69
    n:20 4000.98
    n:30 6006.35
    n:40 8020.93
    n:50 10032.3
    n:60 12081.9
    n:70 13971.3
    n:80 16009.7
    n:90 17117.3
    n:100 17425.5

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

    Eric Dumazet
     
  • Current net name space has only one genid for both IPv4 and IPv6, it has below
    drawbacks:

    - Add/delete an IPv4 address will invalidate all IPv6 routing table entries.
    - Insert/remove XFRM policy will also invalidate both IPv4/IPv6 routing table
    entries even when the policy is only applied for one address family.

    Thus, this patch attempt to split one genid for two to cater for IPv4 and IPv6
    separately in a fine granularity.

    Signed-off-by: Fan Du
    Acked-by: Hannes Frederic Sowa
    Signed-off-by: David S. Miller

    fan.du
     
  • The RFE interrupt is enabled for the r8a7790 but isn't handled,
    resulting in the interrupts core noticing unhandled interrupts, and
    eventually disabling the ethernet IRQ.

    Fix it by adding RFE to the bitmask of error interrupts to be handled
    for r8a7790.

    Signed-off-by: Laurent Pinchart
    Signed-off-by: Simon Horman
    Signed-off-by: David S. Miller

    Laurent Pinchart
     
  • Jeff Kirsher says:

    ====================
    This series contains updates to ixgbe and pci.

    The first patch for ixgbe from Greg Rose is the second submission. The
    first submission of "ixgbe: Retain VLAN filtering in promiscuous + VT
    mode" had a typo, which Joe Perches pointed out and is fixed in this
    submission.

    Alex updates the ixgbe driver to use the generic helper pci_vfs_assigned
    instead of the driver specific function ixgbe_vfs_are_assigned.

    Don Skidmore provides 4 patches for ixgbe, the first being a fix for
    flow control ethtool reporting. Originally ixgbe_device_supports_autoneg_fc()
    was expected to be called by only copper devices, which lead to false
    information being displayed via ethtool. Two other patches add support
    for fixed fiber for SFP+ devices and the addition of a quad-port x520
    adapter. The last patch simply bumps the driver version.

    Emil Tantilov provides 3 fixes for ixgbe, two of which resolve
    semaphore lock issues. The third fix resolves several issues in the
    previous implementation of the SFF data dumps of SFP+ modules.

    The remaining ixgbe and pci patches are from Jacob Keller. The pci
    patches exposes bus speed, link speed and bus width so that drivers
    can take advantage of this information. In addition, adds a pci function
    which obtains minimum link width and speed. Jacob also provides the
    ixgbe patch to incorporate the pci function. He provides a patch that
    fixes a lockdep issue created due to ixgbe_ptp_stop always running
    cancel_work_sync even if the work item had not been created properly with
    INIT_WORK. This issue was found and reported by Stephen Hemminger.

    -v2-
    * fix patch 3 to be a bool function based on David Miller's feedback
    * fix patch 4 debug message based on David Miller's feedback
    * fix patch 8 moved the extern declarations to pci.h based on Bjorn
    Helgaas's feedback
    * fix patch 11 update the error message to include encoding loss based
    * fix patch 8/9/10 title based on Bjorn's feedback
    ====================

    Signed-off-by: David S. Miller

    David S. Miller
     
  • Remove declaration, 4 defines and confusing comment that are no longer used
    since 1a2c6181c4 ("tcp: Remove TCPCT").

    Signed-off-by: Dmitry Popov
    Acked-by: Christoph Paasch
    Signed-off-by: David S. Miller

    Dmitry Popov
     

31 Jul, 2013

22 commits

  • This is a x520 based quad-port (4x10Gbps) NIC with a single QSFP+
    connector. Changes were required to our identify functions due to
    different eeprom address which is also included here.

    Signed-off-by: Don Skidmore
    Signed-off-by: Jeff Kirsher

    Don Skidmore
     
  • This patch changes the error code path in ixgbe_acquire_swfw_sync() to deal
    with cases where acquiring SW semaphore times out.

    In cases where the SW/FW semaphore bits were set (i.e. due to a crash) the
    driver will hang on load. With this patch the driver will clear
    the stuck bits if the semaphore was not acquired in the allotted time.

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

    Emil Tantilov
     
  • This patch renames the stats introduced by the busy poll feature so that they
    are more inline with the current statistics naming schemes.

    Signed-off-by: Jacob Keller
    Tested-by: Phil Schmitt
    Signed-off-by: Jeff Kirsher

    Jacob Keller
     
  • This patch fixes a lockdep issue created due to ixgbe_ptp_stop always running
    cancel_work_sync even if the work item had not been created properly with
    INIT_WORK. This is caused because ixgbe_ptp_stop did not check to actually
    ensure PTP was running first. The new implementation introduces a state in the
    &adapter->state field which is used to indicate that PTP is running. (This
    replaces the IXGBE_FLAG2_PTP_ENABLED field). This state will use the atomic
    set_bit, test_bit, and test_and_clear_bit functions. ixgbe_ptp_stop will check
    to ensure that PTP was enabled, (and if not, it will not attempt to do any
    cleanup work from ixgbe_ptp_init). This resolves the lockdep annotation warning
    found by Stephen Hemminger

    Reported-by: Stephen Hemminger
    Signed-off-by: Jacob Keller
    Acked-by: Don Skidmore
    Tested-by: Phil Schmitt
    Signed-off-by: Jeff Kirsher

    Jacob Keller
     
  • This patch uses the new pcie_get_minimum_link function to perform a check to
    ensure that the adapter is hooked into a slot which is capable of providing the
    necessary bandwidth. This check supersedes the original method which only
    checked the current pci device. The new method is capable of determining the
    minimum speed and link of an entire PCI chain.

    -v2-
    * update the error message to include encoding loss

    CC: Bjorn Helgaas
    Signed-off-by: Jacob Keller
    Signed-off-by: Jeff Kirsher

    Jacob Keller
     
  • A PCI Express device can potentially report a link width and speed which it will
    not properly fulfill due to being plugged into a slower link higher in the
    chain. This function walks up the PCI bus chain and calculates the minimum link
    width and speed of this entire chain. This can be useful to enable a device to
    determine if it has enough bandwidth for optimum functionality.

    Signed-off-by: Jacob Keller
    Tested-by: Phil Schmitt
    Acked-by: Bjorn Helgaas
    Signed-off-by: Jeff Kirsher

    Jacob Keller
     
  • "ifa->ifa_label" is an array inside the in_ifaddr struct. It can never
    be NULL so we can remove this check.

    Signed-off-by: Dan Carpenter
    Reviewed-by: Jiri Pirko
    Signed-off-by: David S. Miller

    Dan Carpenter
     
  • Support IPPROTO_IPV6 similar to IPPROTO_IPIP

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

    Tom Herbert
     
  • Explicitly set proto to ETH_P_IP and jump directly to ip processing.

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

    Tom Herbert
     
  • pcie_link_width is the enum used to define the link width values for a pcie
    device. This enum should not be contained solely in pci_hotplug.h, and this
    patch moves it next to pci_bus_speed in pci.h

    Signed-off-by: Jacob Keller
    Tested-by: Phil Schmitt
    Acked-by: Bjorn Helgaas
    Signed-off-by: Jeff Kirsher

    Jacob Keller
     
  • pcie_link_speed and pcix_bus_speed are arrays used by probe.c to correctly
    convert lnksta register values into the pci_bus_speed enum. These static arrays
    are useful outside probe for this purpose. This patch makes these defines into
    conist arrays and exposes them with an extern header in drivers/pci/pci.h

    -v2-
    * move extern declarations to drivers/pci/pci.h

    CC: Bjorn Helgaas
    Signed-off-by: Jacob Keller
    Signed-off-by: Jeff Kirsher

    Jacob Keller
     
  • This patch fixes several issues with the previous implementation of the
    SFF data dump of SFP+ modules:

    - removed the __IXGBE_READ_I2C flag - I2C access locking is handled in the
    HW specific routines

    - fixed the read loop to read data from ee->offset to ee->len

    - the reads fail if __IXGBE_IN_SFP_INIT is set in the process - this is
    needed because on some HW I2C operations can take long time and disrupt
    the SFP and link detection process

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

    Emil Tantilov
     
  • ixgbe_read/write_i2c_phy_82598() does not hold the SWFW_SYNC
    semaphore for the entire function. Instead the lock is held only
    during the phy.ops.read/write_reg operations. As result when the
    function is being called simultaneously the I2C read/writes can
    be corrupted.

    The following patch introduces the SWFW_SYNC semaphore for the
    entire ixgbe_read/write_i2c_phy_82598() function. To accomplish
    this I had to create 2 separate functions:

    ixgbe_read_phy_reg_mdi()
    ixgbe_write_phy_reg_mdi()

    Those functions are identical to ixgbe_read/write_phy_reg_generic()
    sans the locking, and can be used in ixgbe_read/write_i2c_phy_82598()
    with the SWFW_SYNC semaphore being held.

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

    Emil Tantilov
     
  • Bump the version number to better match with a similar version of the
    out of tree driver.

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

    Don Skidmore
     
  • This patch adds support for a new media type fiber_fixed. This is useful
    to avoid all the SFP+ hot plug support path on devices who's fix fiber need
    not worry about such things. This patch is needed for a following patch
    that adds support for "fiber_fixed" devices.

    v2: cleaned up logging message based on feedback from David Miller

    Signed-off-by: Don Skidmore
    Signed-off-by: Jeff Kirsher

    Don Skidmore
     
  • Jiri Pirko says:

    ====================
    This patchset is based on patch by Narendra_K@Dell.com
    Once device which can change phys port id during its lifetime adopts this,
    NETDEV_CHANGEPHYSPORTID event will be added and driver will call
    call_netdevice_notifiers(NETDEV_NETDEV_CHANGEPHYSPORTID, dev) to propagate
    the change to userspace.

    v1->v2: as suggested by Ben, handle -EOPNOTSUPP in rtnl code (wrapped up ndo call)
    v2->v3: adjusted patch 1 commit message
    v3->v4: used "%phN" for sysfs printf as suggested by DaveM
    added igb/igbvf implementation as requested by Or Gerlitz
    v4->v5: used prandom_u32 to generate id in igb_probe
    removed duplicate code in ibgvf_probe
    pushed dev_err string into one line in igbvf_refresh_ppid
    v5->v6: use uuid_le_gen for generating 16-byte phys port id for igb/igbvf
    as suggested by BenH

    1) Why do we need this, and why do existing facilities fail to provide
    a way to accomplish this?

    Currenty there's very hard to tell if two netdevs are using the same physical
    port. For sr-iov this can be get by sysfs. For other mechanisms, like NPAR
    there's very hard to do it (one must learn it from NIC BIOS). But even for
    sr-iov there's no way to say if two netdevs are using the same phys port when
    these are passed through to virtual guests.

    This patchset provides the generic way of letting this information know to
    userspace. This info can be used by apps like NetworkManager, teamd, Wicked,
    ovs daemon, etc, to do smarter bonding decisions.

    2) Why is the physical port ID defined as a 32 byte opaque cookie?
    What formats and layouts need to be accomodated, and which
    influenced the design of the ID?

    For user to distinguish if two netdevs are using the same port, he only needs
    to compare their phys port ids. Nothing else is needed. This id has no
    structure for security reasons. VF should not know anything about PF.

    3) Are IDs globally unique? Why or why not? If IDs should be
    globally unique, but only in certain cases, what exactly are those
    cases.

    Most of the time only uniqueness needed is in scope of single machine.
    There might be case when the id should be unique between couple of machines
    in virtualization environment. Given that for example for igb/igbvf 16B uuid
    is used, there is no problem for this case as well. But each driver can
    implement this differently focusing the hw capabilities and needs.
    ====================

    Signed-off-by: David S. Miller

    David S. Miller
     
  • Signed-off-by: Jiri Pirko
    Acked-by: Ben Hutchings
    Signed-off-by: Narendra K
    Signed-off-by: David S. Miller

    Jiri Pirko
     
  • Signed-off-by: Jiri Pirko
    Acked-by: Ben Hutchings
    Signed-off-by: Narendra K
    Signed-off-by: David S. Miller

    Jiri Pirko
     
  • This patch adds a ndo for getting physical port of the device. Driver
    which is aware of being virtual function of some physical port should
    implement this ndo. This is applicable not only for IOV, but for other
    solutions (NPAR, multichannel) as well. Basically if there is possible
    to have multiple netdevs on the single hw port.

    Signed-off-by: Jiri Pirko
    Acked-by: Ben Hutchings
    Signed-off-by: David S. Miller

    Jiri Pirko
     
  • Originally ixgbe_device_supports_autoneg_fc() was only expected to
    be called by copper devices. This would lead to false information
    to be displayed via ethtool.

    v2: changed ixgbe_device_supports_autoneg_fc() to a bool function,
    it returns bool. Based on feedback from David Miller

    Signed-off-by: Don Skidmore
    Signed-off-by: Jeff Kirsher

    Don Skidmore
     
  • This change makes it so that the ixgbe driver uses the generic helper
    pci_vfs_assigned instead of the ixgbe specific function
    ixgbe_vfs_are_assigned.

    Signed-off-by: Alexander Duyck
    Tested-by: Stephen Ko
    Signed-off-by: Jeff Kirsher

    Alexander Duyck
     
  • When using the new bridge FDB interface to allow SR-IOV virtual function
    network devices to communicate with SW bridged network devices the
    physical function is placed into promiscuous mode and hardware VLAN
    filtering is disabled. This defeats the ability to use VLAN tagging
    to isolate user networks. When the device is in promiscuous mode and
    VT mode simultaneously ensure that VLAN hardware filtering remains
    enabled.

    Signed-off-by: Greg Rose
    Tested-by: Stephen Ko
    Signed-off-by: Jeff Kirsher

    Greg Rose