Skip to content
  1. Apr 05, 2015
  2. Apr 04, 2015
    • Herbert Xu's avatar
      test_rhashtable: Remove bogus max_size setting · b81b7be6
      Herbert Xu authored
      
      
      Now that resizing is completely automatic, we need to remove
      the max_size setting or the test will fail.
      
      Reported-by: default avatarFengguang Wu <fengguang.wu@intel.com>
      Signed-off-by: default avatarHerbert Xu <herbert@gondor.apana.org.au>
      Acked-by: default avatarThomas Graf <tgraf@suug.ch>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      b81b7be6
    • David S. Miller's avatar
      Merge branch 'mvneta-sgmii' · b98d8075
      David S. Miller authored
      Stas Sergeev says:
      
      ====================
      mvneta: SGMII-based in-band link state signaling
      
      Currently the fixed-link DT binding is pre-configured and
      cannot be changed in run-time. This means the cable unplug
      events are not being detected, and the link parameters can't
      be negotiated.
      
      The following patches are needed when mvneta is used
      in fixed-link mode (without MDIO).
      They add an API to fixed_phy that allows to update
      status, and use that API in the mvneta driver when parsing
      the SGMII in-band status.
      
      There is also another implementation that doesn't add any API
      and does everything in mvneta driver locally:
      https://lkml.org/lkml/2015/3/31/327
      
      
      I'll let people decide which approach is better.
      No strong opinion on my side.
      ====================
      
      Signed-off-by: default avatarStas Sergeev <stsp@users.sourceforge.net>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      b98d8075
    • Stas Sergeev's avatar
      mvneta: implement SGMII-based in-band link state signaling · 898b2970
      Stas Sergeev authored
      
      
      When MDIO bus is unavailable (common setup for SGMII), the in-band
      signaling must be used to correctly track link state.
      This patch enables the in-band status delivery for link state changes, namely:
      - link up/down
      - link speed
      - duplex full/half
      fixed_phy_update_state() is used to update phy status.
      
      CC: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
      CC: Florian Fainelli <f.fainelli@gmail.com>
      CC: netdev@vger.kernel.org
      CC: linux-kernel@vger.kernel.org
      
      Signed-off-by: default avatarStas Sergeev <stsp@users.sourceforge.net>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      898b2970
    • Stas Sergeev's avatar
      add fixed_phy_update_state() - update state of fixed_phy · a3bebdce
      Stas Sergeev authored
      
      
      Currently fixed_phy uses a callback to periodically poll the link state.
      This patch adds the fixed_phy_update_state() API.
      It solves the following problems:
      - On link state interrupt, MAC driver can't update status.
      Instead it needs to provide the callback to periodically query
      the HW about the link state. It is more efficient to update status
      after interrupt.
      - The callback needs to be unregistered before phy_disconnect(),
      or otherwise it will be called with net_dev==NULL. phy_disconnect()
      does not have enough info to unregister the callback automatically.
      - The callback needs to be registered before of_phy_connect() to
      avoid running with outdated state, but of_phy_connect() returns the
      phy_device pointer, which is needed to register the callback. Registering
      it before of_phy_connect() will therefore require a hack to get the
      pointer earlier.
      
      Overall, this addition makes the subsequent patch that implements
      SGMII link status for mvneta, much cleaner.
      
      CC: Florian Fainelli <f.fainelli@gmail.com>
      CC: netdev@vger.kernel.org
      CC: linux-kernel@vger.kernel.org
      
      Signed-off-by: default avatarStas Sergeev <stsp@users.sourceforge.net>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      a3bebdce
    • Daniel Borkmann's avatar
      ebpf: add skb->priority to offset map for usage in {cls, act}_bpf · bcad5718
      Daniel Borkmann authored
      
      
      This adds the ability to read out the skb->priority from an eBPF
      program, so that it can be taken into account from a tc filter
      or action for the use-case where the priority is not being used
      to directly override the filter classification in a qdisc, but
      to tag traffic otherwise for the classifier; the priority can be
      assigned from various places incl. user space, in future we may
      also mangle it from an eBPF program.
      
      Signed-off-by: default avatarDaniel Borkmann <daniel@iogearbox.net>
      Cc: Alexei Starovoitov <ast@plumgrid.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      bcad5718
    • Alexander Duyck's avatar
      jhash: Update jhash_[321]words functions to use correct initval · 2e7056c4
      Alexander Duyck authored
      Looking over the implementation for jhash2 and comparing it to jhash_3words
      I realized that the two hashes were in fact very different.  Doing a bit of
      digging led me to "The new jhash implementation" in which lookup2 was
      supposed to have been replaced with lookup3.
      
      In reviewing the patch I noticed that jhash2 had originally initialized a
      and b to JHASH_GOLDENRATIO and c to initval, but after the patch a, b, and
      c were initialized to initval + (length << 2) + JHASH_INITVAL.  However the
      changes in jhash_3words simply replaced the initialization of a and b with
      JHASH_INITVAL.
      
      This change corrects what I believe was an oversight so that a, b, and c in
      jhash_3words all have the same value added consisting of initval + (length
      << 2) + JHASH_INITVAL so that jhash2 and jhash_3words will now produce the
      same hash result given the same inputs.
      
      Fixes: 60d509c8
      
       ("The new jhash implementation")
      Signed-off-by: default avatarAlexander Duyck <alexander.h.duyck@redhat.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      2e7056c4
    • David S. Miller's avatar
      Merge branch 'master' of git://git.kernel.org/pub/scm/linux/kernel/git/jkirsher/next-queue · 5c5e0ad3
      David S. Miller authored
      
      
      Jeff Kirsher says:
      
      ====================
      Intel Wired LAN Driver Updates 2015-04-03
      
      This series contains updates to i40e and i40evf only.
      
      Anjali provides a fix for verifying outer UDP receive checksum.  Also
      adds helpful information to display when figuring out the cause of
      HMC errors.
      
      Mitch provides a fix to prevent a malicious or buggy VF driver from
      sending an invalid index into the VSI array which could panic the host.
      Cleans up the code where a function was moved, but the message did
      not follow.  Adds protection to the VLAN filter list, same as the
      MAC filter list, to protect from corruption if the watchdog happens
      to run at the same time as a VLAN filter is being added/deleted.
      
      Jesse changes several memcpy() statements to struct assignments which
      are type safe and preferable.  Fixed a bug when skb allocation fails,
      where we should not continue using the skb pointer.  Also fixed a void
      function in FCoE which should not be returning anything.
      
      Greg fixes both i40e and i40evf to set the Ethernet protocol correctly
      when transmit VLAN offloads are disabled.
      
      Shannon fixes up VLAN messages when ports are added or removed, which
      were giving bogus index info.  Also aligned the message text style
      with other messages in the driver.
      ====================
      
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      5c5e0ad3
    • Rusty Russell's avatar
      netdevice: document NETDEV_TX_BUSY deprecation. · e79d8429
      Rusty Russell authored
      This paraphrases DaveM (and steals some of his words) explaining why
      a device shouldn't return NETDEV_TX_BUSY, even though it looks so inviting
      to driver authors.
      
      See http://www.spinics.net/lists/netdev/msg322350.html
      
      
      
      Inspired-by: default avatarDavid Miller <davem@davemloft.net>
      Signed-off-by: default avatarRusty Russell <rusty@rustcorp.com.au>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      e79d8429
    • David S. Miller's avatar
      Merge branch 'ipv4-null-cmp' · 0bd66827
      David S. Miller authored
      
      
      Ian Morris says:
      
      ====================
      ipv4: coding style - comparisons with NULL
      
      Per the suggestion of Joe Perches, attached is a patch which aligns the
      coding style in ipv4 for comparisons with NULL.
      
      The code uses multiple different styles when comparing with NULL (I.e.
      x == NULL and !x as well as x != NULL and x). Generally the latter form
      is preferred in netdev and so this changes aligns the code to this style.
      ====================
      
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      0bd66827
    • Ian Morris's avatar
      ipv4: coding style: comparison for inequality with NULL · 00db4124
      Ian Morris authored
      
      
      The ipv4 code uses a mixture of coding styles. In some instances check
      for non-NULL pointer is done as x != NULL and sometimes as x. x is
      preferred according to checkpatch and this patch makes the code
      consistent by adopting the latter form.
      
      No changes detected by objdiff.
      
      Signed-off-by: default avatarIan Morris <ipm@chirality.org.uk>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      00db4124
    • Ian Morris's avatar
      ipv4: coding style: comparison for equality with NULL · 51456b29
      Ian Morris authored
      
      
      The ipv4 code uses a mixture of coding styles. In some instances check
      for NULL pointer is done as x == NULL and sometimes as !x. !x is
      preferred according to checkpatch and this patch makes the code
      consistent by adopting the latter form.
      
      No changes detected by objdiff.
      
      Signed-off-by: default avatarIan Morris <ipm@chirality.org.uk>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      51456b29
  3. Apr 03, 2015