1. 15 Mar, 2014 26 commits
    • Eric W. Biederman's avatar
      amd8111e: Don't receive packets when the napi budget == 0 · 278d5385
      Eric W. Biederman authored
      Processing any incoming packets with a with a napi budget of 0
      is incorrect driver behavior.
      
      This matters as netpoll will shortly call drivers with a budget of 0
      to avoid receive packet processing happening in hard irq context.
      Signed-off-by: default avatar"Eric W. Biederman" <ebiederm@xmission.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      278d5385
    • Eric W. Biederman's avatar
      ixgbe: Don't receive packets when the napi budget == 0 · fdabfc8a
      Eric W. Biederman authored
      Processing any incoming packets with a with a napi budget of 0
      is incorrect driver behavior.
      
      This matters as netpoll will shortly call drivers with a budget of 0
      to avoid receive packet processing happening in hard irq context.
      Signed-off-by: default avatar"Eric W. Biederman" <ebiederm@xmission.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      fdabfc8a
    • Eric W. Biederman's avatar
      igb: Don't receive packets when the napi budget == 0 · 57ba34c9
      Eric W. Biederman authored
      Processing any incoming packets with a with a napi budget of 0
      is incorrect driver behavior.
      
      This matters as netpoll will shortly call drivers with a budget of 0
      to avoid receive packet processing happening in hard irq context.
      Signed-off-by: default avatar"Eric W. Biederman" <ebiederm@xmission.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      57ba34c9
    • Eric W. Biederman's avatar
      i40e: Don't receive packets when the napi budget == 0 · 390f86df
      Eric W. Biederman authored
      Processing any incoming packets with a with a napi budget of 0
      is incorrect driver behavior.
      
      This matters as netpoll will shortly call drivers with a budget of 0
      to avoid receive packet processing happening in hard irq context.
      Signed-off-by: default avatar"Eric W. Biederman" <ebiederm@xmission.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      390f86df
    • Eric W. Biederman's avatar
      bnx2x: Don't receive packets when the napi budget == 0 · b3529744
      Eric W. Biederman authored
      Processing any incoming packets with a with a napi budget of 0
      is incorrect driver behavior.
      
      This matters as netpoll will shortly call drivers with a budget of 0
      to avoid receive packet processing happening in hard irq context.
      Signed-off-by: default avatar"Eric W. Biederman" <ebiederm@xmission.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      b3529744
    • David S. Miller's avatar
      Merge branch 'cxgb4-next' · 1c79a5a8
      David S. Miller authored
      Hariprasad Shenai says:
      
      ====================
      Doorbell drop Avoidance Bug fix for iw_cxgb4
      
      This patch series provides fixes for Chelsio T4/T5 adapters
      related to DB Drop avoidance and other small fix related to keepalive on
      iw-cxgb4.
      
      The patches series is created against David Miller's 'net-next' tree.
      And includes patches on cxgb4 and iw_cxgb4 driver.
      
      We would like to request this patch series to get merged via David Miller's
      'net-next' tree.
      
      We have included all the maintainers of respective drivers. Kindly review the
      change and let us know in case of any review comments.
      ====================
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      1c79a5a8
    • Steve Wise's avatar
      cxgb4/iw_cxgb4: Doorbell Drop Avoidance Bug Fixes · 05eb2389
      Steve Wise authored
      The current logic suffers from a slow response time to disable user DB
      usage, and also fails to avoid DB FIFO drops under heavy load. This commit
      fixes these deficiencies and makes the avoidance logic more optimal.
      This is done by more efficiently notifying the ULDs of potential DB
      problems, and implements a smoother flow control algorithm in iw_cxgb4,
      which is the ULD that puts the most load on the DB fifo.
      
      Design:
      
      cxgb4:
      
      Direct ULD callback from the DB FULL/DROP interrupt handler.  This allows
      the ULD to stop doing user DB writes as quickly as possible.
      
      While user DB usage is disabled, the LLD will accumulate DB write events
      for its queues.  Then once DB usage is reenabled, a single DB write is
      done for each queue with its accumulated write count.  This reduces the
      load put on the DB fifo when reenabling.
      
      iw_cxgb4:
      
      Instead of marking each qp to indicate DB writes are disabled, we create
      a device-global status page that each user process maps.  This allows
      iw_cxgb4 to only set this single bit to disable all DB writes for all
      user QPs vs traversing the idr of all the active QPs.  If the libcxgb4
      doesn't support this, then we fall back to the old approach of marking
      each QP.  Thus we allow the new driver to work with an older libcxgb4.
      
      When the LLD upcalls iw_cxgb4 indicating DB FULL, we disable all DB writes
      via the status page and transition the DB state to STOPPED.  As user
      processes see that DB writes are disabled, they call into iw_cxgb4
      to submit their DB write events.  Since the DB state is in STOPPED,
      the QP trying to write gets enqueued on a new DB "flow control" list.
      As subsequent DB writes are submitted for this flow controlled QP, the
      amount of writes are accumulated for each QP on the flow control list.
      So all the user QPs that are actively ringing the DB get put on this
      list and the number of writes they request are accumulated.
      
      When the LLD upcalls iw_cxgb4 indicating DB EMPTY, which is in a workq
      context, we change the DB state to FLOW_CONTROL, and begin resuming all
      the QPs that are on the flow control list.  This logic runs on until
      the flow control list is empty or we exit FLOW_CONTROL mode (due to
      a DB DROP upcall, for example).  QPs are removed from this list, and
      their accumulated DB write counts written to the DB FIFO.  Sets of QPs,
      called chunks in the code, are removed at one time. The chunk size is 64.
      So 64 QPs are resumed at a time, and before the next chunk is resumed, the
      logic waits (blocks) for the DB FIFO to drain.  This prevents resuming to
      quickly and overflowing the FIFO.  Once the flow control list is empty,
      the db state transitions back to NORMAL and user QPs are again allowed
      to write directly to the user DB register.
      
      The algorithm is designed such that if the DB write load is high enough,
      then all the DB writes get submitted by the kernel using this flow
      controlled approach to avoid DB drops.  As the load lightens though, we
      resume to normal DB writes directly by user applications.
      Signed-off-by: default avatarSteve Wise <swise@opengridcomputing.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      05eb2389
    • Steve Wise's avatar
      cxgb4/iw_cxgb4: Treat CPL_ERR_KEEPALV_NEG_ADVICE as negative advice · 7a2cea2a
      Steve Wise authored
      Based on original work by Anand Priyadarshee <anandp@chelsio.com>.
      Signed-off-by: default avatarSteve Wise <swise@opengridcomputing.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      7a2cea2a
    • Eric W. Biederman's avatar
      net: Replace u64_stats_fetch_begin_bh to u64_stats_fetch_begin_irq · 57a7744e
      Eric W. Biederman authored
      Replace the bh safe variant with the hard irq safe variant.
      
      We need a hard irq safe variant to deal with netpoll transmitting
      packets from hard irq context, and we need it in most if not all of
      the places using the bh safe variant.
      
      Except on 32bit uni-processor the code is exactly the same so don't
      bother with a bh variant, just have a hard irq safe variant that
      everyone can use.
      Signed-off-by: default avatar"Eric W. Biederman" <ebiederm@xmission.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      57a7744e
    • David S. Miller's avatar
      Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net · 85dcce7a
      David S. Miller authored
      Conflicts:
      	drivers/net/usb/r8152.c
      	drivers/net/xen-netback/netback.c
      
      Both the r8152 and netback conflicts were simple overlapping
      changes.
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      85dcce7a
    • David S. Miller's avatar
      Merge branch 'alb_learning' · 4c4e4113
      David S. Miller authored
      Veaceslav Falico says:
      
      ====================
      bonding: use correct ether type for alb
      
      There have been reports that, while using the ETH_P_LOOP ether type
      (0x0060), the ether type is treated as its packet length.
      
      To avoid that and to not break already existing apps - add new ether type
      ETH_P_LOOPBACK that contains the correct id - 0x9000.
      ====================
      Signed-off-by: default avatarVeaceslav Falico <vfalico@redhat.com>
      4c4e4113
    • Veaceslav Falico's avatar
      bonding: use the correct ether type for alb · 96a0922c
      Veaceslav Falico authored
      Currently it's using the wrong ETH_P_LOOP type, which is sometimes treated
      as packet length instead of ether type (because it's 0x0060).
      
      Use the new ETH_P_LOOPBACK type.
      
      CC: Jay Vosburgh <fubar@us.ibm.com>
      CC: Andy Gospodarek <andy@greyhouse.net>
      Signed-off-by: default avatarVeaceslav Falico <vfalico@redhat.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      96a0922c
    • Veaceslav Falico's avatar
      ether: add loopback type ETH_P_LOOPBACK · 61ccbb68
      Veaceslav Falico authored
      Per IEEE 802.3*, the correct packet type for loopback 0x9000. There's
      already one ETH_P_LOOP 0x0060, which has been there for ages, however it's
      plainly wrong as anything that small is considered a length field.
      
      We can't remove it because legacy, so add a new type which corresponds to
      the correct id.
      
      http://www.iana.org/assignments/ieee-802-numbers/ieee-802-numbers.xhtml
      
      CC: "David S. Miller" <davem@davemloft.net>
      CC: Stefan Richter <stefanr@s5r6.in-berlin.de>
      CC: Simon Wunderlich <sw@simonwunderlich.de>
      CC: Neil Jerram <Neil.Jerram@metaswitch.com>
      CC: Simon Horman <horms@verge.net.au>
      CC: Arvid Brodin <Arvid.Brodin@xdin.com>
      Signed-off-by: default avatarVeaceslav Falico <vfalico@redhat.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      61ccbb68
    • David S. Miller's avatar
      Merge branch 'master' of git://git.kernel.org/pub/scm/linux/kernel/git/jkirsher/net-next · 21396689
      David S. Miller authored
      Jeff Kirsher says:
      
      ====================
      Intel Wired LAN Driver Updates
      
      This series contains updates to igb, i40e and i40evf.
      
      I provide a code comment fix which David Miller noticed in the last
      series of patches I submitted.
      
      Shannon provides a patch to cleanup the NAPI structs when deleting the
      netdev.
      
      Anjali provides several patches for i40e, first fixes a bug in the update
      filter logic which was causing a kernel panic.  Then provides a fix to
      rename an error bit to correctly indicate the error.  Adds a definition
      for a new state variable to keep track of features automatically disabled
      due to hardware resource limitations versus user enforced feature disabled.
      Anjali provides a patch to add code to handle when there is a filter
      programming error due to a full table, which also resolves a previous
      compile warning about an unused "*pf" variable introduced in the last i40e
      series patch submission.
      
      Jesse provides three i40e patches to cleanup strings to make more
      consistent and to align with other Intel drivers.
      
      Akeem cleans up a misleading function header comment for i40e.
      
      Mitch provides a fix for i40e/i40evf to use the correctly reported number
      of MSI-X vectors in the PF an VF.  Then provides a patch to use
      dma_set_mask_and_coherent() which was introduced in v3.13 and simplifies
      the DMA mapping code a bit.
      
      v2:
      - dropped the 2 ixgbe patches from Emil based on feedback from David Miller,
        where the 2 fixes should be handled in the net core to fix all drivers
      ====================
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      21396689
    • David S. Miller's avatar
      Merge branch 'ieee802154-next' · 983f5961
      David S. Miller authored
      Phoebe Buckheister says:
      
      ====================
      ieee802154: fix endianness and header handling
      
      This patch set enforces network byte order on all internal operations and
      fields of the 802.15.4 stack and adds a general representation of 802.15.4
      headers with operations to create and parse those headers. This reduces code
      duplication in the current stack and also allows for upper layers to read
      headers of packets they have just received; it is also necessary for 802.15.4
      link layer security, which requires header mangling.
      
      Changes since v1:
       * fixed lowpan packet rx after reassembly. Control blocks were used to
         retrieve source/dest addresses, but the CB is clobbered by reassembly.
         Instead, parse the header anew in lowpan.
      ====================
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      983f5961
    • Phoebe Buckheister's avatar
      ieee802154: add proper length checks to header creations · d1d7358e
      Phoebe Buckheister authored
      Have mac802154 header_ops.create fail with -EMSGSIZE if the length
      passed will be too large to fit a frame. Since 6lowpan will ensure that
      no packet payload will be too large, pass a length of 0 there. 802.15.4
      dgram sockets will also return -EMSGSIZE on payloads larger than the
      device MTU instead of -EINVAL.
      Signed-off-by: default avatarPhoebe Buckheister <phoebe.buckheister@itwm.fraunhofer.de>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      d1d7358e
    • Phoebe Buckheister's avatar
      6lowpan: move lowpan frag_info out of 802.15.4 headers · a13061ec
      Phoebe Buckheister authored
      Fragmentation and reassembly information for 6lowpan is independent from
      the 802.15.4 stack and used only by the 6lowpan reassembly process. Move
      the ieee802154_frag_info struct to a private are, it needn't be in the
      802.15.4 skb control block.
      Signed-off-by: default avatarPhoebe Buckheister <phoebe.buckheister@itwm.fraunhofer.de>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      a13061ec
    • Phoebe Buckheister's avatar
      ieee802154: use ieee802154_addr instead of *_sa variants · ae531b94
      Phoebe Buckheister authored
      Change all internal uses of ieee802154_addr_sa to ieee802154_addr,
      except for those instances that communicate directly with userspace.
      Signed-off-by: default avatarPhoebe Buckheister <phoebe.buckheister@itwm.fraunhofer.de>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      ae531b94
    • Phoebe Buckheister's avatar
      mac802154: use header operations to create/parse headers · e6278d92
      Phoebe Buckheister authored
      Use the operations on 802.15.4 header structs introduced in a previous
      patch to create and parse all headers in the mac802154 stack. This patch
      reduces code duplication between different parts of the mac802154 stack
      that needed information from headers, and also fixes a few bugs that
      seem to have gone unnoticed until now:
      
       * 802.15.4 dgram sockets would return a slightly incorrect value for
         the SIOCINQ ioctl
       * mac802154 would not drop frames with the "security enabled" bit set,
         even though it does not support security, in violation of the
         standard
      Signed-off-by: default avatarPhoebe Buckheister <phoebe.buckheister@itwm.fraunhofer.de>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      e6278d92
    • Phoebe Buckheister's avatar
      ieee802154: add header structs with endiannes and operations · 94b4f6c2
      Phoebe Buckheister authored
      This patch provides a set of structures to represent 802.15.4 MAC
      headers, and a set of operations to push/pull/peek these structs from
      skbs. We cannot simply pointer-cast the skb MAC header pointer to these
      structs, because 802.15.4 headers are wildly variable - depending on the
      first three bytes, virtually all other fields of the header may be
      present or not, and be present with different lengths.
      
      The new header creation/parsing routines also support 802.15.4 security
      headers, which are currently not supported by the mac802154
      implementation of the protocol.
      Signed-off-by: default avatarPhoebe Buckheister <phoebe.buckheister@itwm.fraunhofer.de>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      94b4f6c2
    • Phoebe Buckheister's avatar
      ieee802154: enforce consistent endianness in the 802.15.4 stack · b70ab2e8
      Phoebe Buckheister authored
      Enable sparse warnings about endianness, replace the remaining fields
      regarding network operations without explicit endianness annotations
      with such that are annotated, and propagate this through the entire
      stack.
      
      Uses of ieee802154_addr_sa are not changed yet, this patch is only
      concerned with all other fields (such as address filters, operation
      parameters and the likes).
      Signed-off-by: default avatarPhoebe Buckheister <phoebe.buckheister@itwm.fraunhofer.de>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      b70ab2e8
    • Phoebe Buckheister's avatar
      ieee802154: add address struct with proper endiannes and some operations · 46ef0eb3
      Phoebe Buckheister authored
      Add a replacement ieee802154_addr struct with proper endianness on
      fields. Short address fields are stored as __le16 as on the network,
      extended (EUI64) addresses are __le64 as opposed to the u8[8] format
      used previously. This disconnect with the netdev address, which is
      stored as big-endian u8[8], is intentional.
      Signed-off-by: default avatarPhoebe Buckheister <phoebe.buckheister@itwm.fraunhofer.de>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      46ef0eb3
    • Phoebe Buckheister's avatar
      ieee802154: rename struct ieee802154_addr to *_sa · 376b7bd3
      Phoebe Buckheister authored
      The struct as currently defined uses host byte order for some fields,
      and most big endian/EUI display byte order for other fields. Inside the
      stack, endianness should ideally match network byte order where possible
      to minimize the number of byteswaps done in critical paths, but this
      patch does not address this; it is only preparatory.
      Signed-off-by: default avatarPhoebe Buckheister <phoebe.buckheister@itwm.fraunhofer.de>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      376b7bd3
    • Linus Torvalds's avatar
      Merge branch 'x86-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip · a4ecdf82
      Linus Torvalds authored
      Pull x86 fixes from Peter Anvin:
       "Two x86 fixes: Suresh's eager FPU fix, and a fix to the NUMA quirk for
        AMD northbridges.
      
        This only includes Suresh's fix patch, not the "mostly a cleanup"
        patch which had __init issues"
      
      * 'x86-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip:
        x86/amd/numa: Fix northbridge quirk to assign correct NUMA node
        x86, fpu: Check tsk_used_math() in kernel_fpu_end() for eager FPU
      a4ecdf82
    • Linus Torvalds's avatar
      Merge tag 'pm+acpi-3.14-rc7' of git://git.kernel.org/pub/scm/linux/kernel/git/rafael/linux-pm · cee152ff
      Linus Torvalds authored
      Pull ACPI and power management fixes from Rafael Wysocki:
       "Three of these are regression fixes, for two recent regressions and
        one introduced during the 3.13 cycle, and the fourth one is a working
        version of the fix that had to be reverted last time.
      
        Specifics:
      
         - A recent ACPI resources handling fix overlooked the fact that it
           had to update the ACPI PNP subsystem's resources parsing too and
           caused confusing warning messages to be printed during system
           intialization on some systems (with arguably buggy ACPI tables).
           Fix from Zhang Rui.
      
         - Moving the early ACPI initialization before timekeeping_init()
           earlier in this cycle broke fast TSC calibration on at least one
           system, so it needs to be done later, but still before
           efi_enter_virtual_mode() to allow the EFI initialization to refer
           to ACPI.
      
         - A change related to code duplication reduction in the cpufreq core
           inadvertently caused cpufreq intialization to fail for some CPUs
           handled by intel_pstate by adding checks that may fail for that
           driver, but aren't even necessary when it is used.  The issue is
           addressed by preventing those checks from run in the configurations
           in which they aren't needed.
      
         - If the Hardware Reduced ACPI flag is set in the ACPI tables, system
           suspend, hibernation and ACPI power off will only work when special
           sleep control and sleep status registeres are provided (their
           addresses in the ACPI tables are not zero).  If those registers are
           not available, the features in question have no chances to work, so
           they shouldn't even be regarded as supported.  That helps with
           power off in particular, because alternative power off methods may
           be used then and they may actually work"
      
      * tag 'pm+acpi-3.14-rc7' of git://git.kernel.org/pub/scm/linux/kernel/git/rafael/linux-pm:
        ACPI / sleep: Add extra checks for HW Reduced ACPI mode sleep states
        ACPI / init: Invoke early ACPI initialization later
        cpufreq: Skip current frequency initialization for ->setpolicy drivers
        PNP / ACPI: proper handling of ACPI IO/Memory resource parsing failures
      cee152ff
    • Linus Torvalds's avatar
      Merge tag 'dm-3.14-fixes-4' of git://git.kernel.org/pub/scm/linux/kernel/git/device-mapper/linux-dm · 0c01b452
      Linus Torvalds authored
      Pull device-mapper fixes form Mike Snitzer:
       "Two small fixes for the DM cache target:
      
         - fix corruption with >2TB fast device due to truncation bug
         - fix access beyond end of origin device due to a partial block"
      
      * tag 'dm-3.14-fixes-4' of git://git.kernel.org/pub/scm/linux/kernel/git/device-mapper/linux-dm:
        dm cache: fix access beyond end of origin device
        dm cache: fix truncation bug when copying a block to/from >2TB fast device
      0c01b452
  2. 14 Mar, 2014 14 commits