04 Apr, 2015

11 commits

  • Now that resizing is completely automatic, we need to remove
    the max_size setting or the test will fail.

    Reported-by: Fengguang Wu
    Signed-off-by: Herbert Xu
    Acked-by: Thomas Graf
    Signed-off-by: David S. Miller

    Herbert Xu
     
  • 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: Stas Sergeev
    Signed-off-by: David S. Miller

    David S. Miller
     
  • 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
    CC: Florian Fainelli
    CC: netdev@vger.kernel.org
    CC: linux-kernel@vger.kernel.org

    Signed-off-by: Stas Sergeev
    Signed-off-by: David S. Miller

    Stas Sergeev
     
  • 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
    CC: netdev@vger.kernel.org
    CC: linux-kernel@vger.kernel.org

    Signed-off-by: Stas Sergeev
    Signed-off-by: David S. Miller

    Stas Sergeev
     
  • 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: Daniel Borkmann
    Cc: Alexei Starovoitov
    Signed-off-by: David S. Miller

    Daniel Borkmann
     
  • 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: 60d509c823cca ("The new jhash implementation")
    Signed-off-by: Alexander Duyck
    Signed-off-by: David S. Miller

    Alexander Duyck
     
  • 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: David S. Miller

    David S. Miller
     
  • 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: David Miller
    Signed-off-by: Rusty Russell
    Signed-off-by: David S. Miller

    Rusty Russell
     
  • 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: David S. Miller

    David S. Miller
     
  • 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: Ian Morris
    Signed-off-by: David S. Miller

    Ian Morris
     
  • 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: Ian Morris
    Signed-off-by: David S. Miller

    Ian Morris
     

03 Apr, 2015

29 commits