21 Jul, 2014

7 commits

  • Pablo Neira Ayuso says:

    ====================
    Netfilter updates for net-next

    The following patchset contains updates for your net-next tree,
    they are:

    1) Use kvfree() helper function from x_tables, from Eric Dumazet.

    2) Remove extra timer from the conntrack ecache extension, use a
    workqueue instead to redeliver lost events to userspace instead,
    from Florian Westphal.

    3) Removal of the ulog targets for ebtables and iptables. The nflog
    infrastructure superseded this almost 9 years ago, time to get rid
    of this code.

    4) Replace the list of loggers by an array now that we can only have
    two possible non-overlapping logger flavours, ie. kernel ring buffer
    and netlink logging.

    5) Move Eric Dumazet's log buffer code to nf_log to reuse it from
    all of the supported per-family loggers.

    6) Consolidate nf_log_packet() as an unified interface for packet logging.
    After this patch, if the struct nf_loginfo is available, it explicitly
    selects the logger that is used.

    7) Move ip and ip6 logging code from xt_LOG to the corresponding
    per-family loggers. Thus, x_tables and nf_tables share the same code
    for packet logging.

    8) Add generic ARP packet logger, which is used by nf_tables. The
    format aims to be consistent with the output of xt_LOG.

    9) Add generic bridge packet logger. Again, this is used by nf_tables
    and it routes the packets to the real family loggers. As a result,
    we get consistent logging format for the bridge family. The ebt_log
    logging code has been intentionally left in place not to break
    backward compatibility since the logging output differs from xt_LOG.

    10) Update nft_log to explicitly request the required family logger when
    needed.

    11) Finish nft_log so it supports arp, ip, ip6, bridge and inet families.
    Allowing selection between netlink and kernel buffer ring logging.

    12) Several fixes coming after the netfilter core logging changes spotted
    by robots.

    13) Use IS_ENABLED() macros whenever possible in the netfilter tree,
    from Duan Jiong.

    14) Removal of a couple of unnecessary branch before kfree, from Fabian
    Frederick.
    ====================

    Signed-off-by: David S. Miller

    David S. Miller
     
  • Currently it's done silently (from the kernel part), and thus it might be
    hard to track the renames from logs.

    Add a simple netdev_info() to notify the rename, but only in case the
    previous name was valid.

    CC: "David S. Miller"
    CC: Eric Dumazet
    CC: Vlad Yasevich
    CC: stephen hemminger
    CC: Jerry Chu
    CC: Ben Hutchings
    CC: David Laight
    Signed-off-by: Veaceslav Falico
    Signed-off-by: David S. Miller

    Veaceslav Falico
     
  • Veaceslav Falico says:

    ====================
    net: print net_device name/state more often

    Currently we use net_device->name only if it's the NETREG_REGISTERED
    reg_state, otherwise we return "(unregistered device)".

    However, we always populate net_device->name on creation, so it's always
    available to us for use. The only caveat is that we might have a name like
    "eth%d", in which case we cannot use it as it might change in the future.

    Also, the net_device might not be NETREG_UNREGISTERED when the function is
    called (_UNINITIALIZED, _UNREGISTERING, _RELEASED, _DUMMY), so it's
    misleading.

    So, a better way would be to always return the dev->name in netdev_name(),
    unless it's in the form of "eth%d" or it's empty, then return
    "unnamed net_device". This way we'll always return the name in
    NETREG_REGISTERED reg_state, and also return it in other states, when
    possible.

    Also, to be more verbose on non-NETREG_REGISTERED states, add a function
    netdev_reg_state(), which returns a string describing the state, and use it
    in netdev_printk()-related functions. If the dev is in NETREG_REGISTERED
    state then a void string is regurned and, thus, nothing changes.

    After these two patches we'll have the same behaviour in the usual cases,
    and more verbose in non-standardad/buggy ones.

    v2->v3:
    Correct the string for _UNINITIALIZED and warn on a bad reg_state,
    per Joe Perches's comments.

    v1->v2:
    As Tom Gundersen suggested, there might be a case when we have an empty
    string as a name for a device, so account this also and return "unnamed
    device" for that case too.
    ====================

    Signed-off-by: Veaceslav Falico
    Signed-off-by: David S. Miller

    David S. Miller
     
  • This way we'll always know in what status the device is, unless it's
    running normally (i.e. NETDEV_REGISTERED).

    Also, emit a warning once in case of a bad reg_state.

    CC: "David S. Miller"
    CC: Jason Baron
    CC: Eric Dumazet
    CC: Vlad Yasevich
    CC: stephen hemminger
    CC: Jerry Chu
    CC: Ben Hutchings
    CC: Joe Perches
    Signed-off-by: Veaceslav Falico
    Signed-off-by: David S. Miller

    Veaceslav Falico
     
  • netdev_name() returns dev->name only when the net_device is in
    NETREG_REGISTERED state.

    However, dev->name is always populated on creation, so we can easily use
    it.

    There are two cases when there's no real name - when it's an empty string
    or when the name is in form of "eth%d", then netdev_name() returns "unnamed
    net_device".

    CC: "David S. Miller"
    CC: Tom Gundersen
    Signed-off-by: Veaceslav Falico
    Acked-by: Tom Gundersen
    Signed-off-by: David S. Miller

    Veaceslav Falico
     
  • Currently we're limited by a constant level of vlan nestings, and fail to
    find anything beyound that level (currently 2).

    To fix this - remove the limit of nestings when going through device tree,
    and when the end device is found - allocate the needed amount of vlan tags
    and return them, instead of found/not found.

    CC: Jay Vosburgh
    CC: Andy Gospodarek
    Signed-off-by: Veaceslav Falico
    Signed-off-by: David S. Miller

    Veaceslav Falico
     
  • We modify mirred action (m->tcfm_dev) in netdev event, we need to
    prevent on-going mirred actions from reading freed m->tcfm_dev.
    So we need to acquire this spin lock.

    Cc: Jamal Hadi Salim
    Cc: "David S. Miller"
    Signed-off-by: Cong Wang
    Signed-off-by: Cong Wang
    Signed-off-by: David S. Miller

    Cong Wang
     

20 Jul, 2014

1 commit


18 Jul, 2014

28 commits

  • Fixed error introduced in commit id 7730b4c (" cxgb4/iw_cxgb4: work request
    logging feature") while compiling on 32 bit architecture reported by kbuild.

    Signed-off-by: Hariprasad Shenai
    Signed-off-by: David S. Miller

    Hariprasad Shenai
     
  • Implement per channel software TX and RX packet counters
    accessed as ethtool statistics.

    This allows confirmation with MAC statistics.

    Signed-off-by: Shradha Shah
    Signed-off-by: David S. Miller

    Andrew Rybchenko
     
  • Sathya Perla says:

    ====================
    be2net: patch set

    Patches 1 to 6 address issues with return values of some ndo/ethtool
    driver methods. In error scenarios, either an inappropriate error or
    a +ve return value (where the stack expects a -ve value) was being returned.

    Patch 7 updates description strings for certain UE bits.

    Patch 8 cleans up (reduces) argument passing for a few routines in be_cmds.c.

    Patch 9 removes some unused code (unused definitions.)

    Patch 10 updates NULL check in the driver to a consistent "if (!foo)" style.

    Patchs 11 to 13 fix a few minor issues with the earlier patch bec84e6
    ("create optimal number of queues on SR-IOV config"):
    - patch 11 fixes BEx_get_resources() code to use be_max_vfs() macro
    - patch 12 skips SR-IOV config code for BE2 that doesn't support SRIOV
    - patch 13 uses adapter->flags to track SRIOV enabled state

    Patch 14 updates the driver version.
    ====================

    Signed-off-by: David S. Miller

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

    Sathya Perla
     
  • The driver so far used adapter->num_vfs value to check if SR-IOV is enabled
    or not. But, the patch bec84e6("create optimal number of queues on SR-IOV
    config") changed this logic. The adapter->num_vfs value is validated and set
    much before SR-IOV is enabled. So, we now use an explicit flag to track
    SR-IOV enabled state.

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

    Vasundhara Volam
     
  • As SRIOV is not supported on BE2 chip, avoid calling be_get/set_sriov_config()
    for BE2 chip.

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

    Vasundhara Volam
     
  • max-vfs value must be accessed via the macro be_max_vfs(adapter).
    The earlier patch "create optimal number of queues on SR-IOV config"
    by mistake, did not use this macro. This patch fixes it.

    fixes: bec84e6b ("be2net: create optimal number of queues on SR-IOV config")
    Signed-off-by: Vasundhara Volam
    Signed-off-by: Sathya Perla
    Signed-off-by: David S. Miller

    Vasundhara Volam
     
  • Replace "if (foo == NULL)" statements with "if (!foo)" to be consistent
    across the driver.

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

    Kalesh AP
     
  • Signed-off-by: Kalesh AP
    Signed-off-by: Sathya Perla
    Signed-off-by: David S. Miller

    Kalesh AP
     
  • A pointer to adapter struct is passed anyway to all of the FW-cmd routines
    in be_cmds.c. For routines which query data from FW, the adapter pointer
    is enough to return the queried fields.
    There is no need to separately pass pointers to individual members of
    the adapter structure. This patch fixes this for be_cmd_get_fw_ver()
    and be_cmd_get_fw_cfg() routines.

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

    Kalesh AP
     
  • This patch updates some description strings for BEx/Skyhawk-R
    UE (unrecoverable error) status register bits. The appropriate strings
    are logged when a UE is detected in the adapter.
    Signed-off-by: Vasundhara Volam
    Signed-off-by: Sathya Perla
    Signed-off-by: David S. Miller

    Vasundhara Volam
     
  • The netlink layer expects a -ve status value to be returned when a driver
    ndo method encounters an error. The driver was directly passing the
    error status returned by FW (a positive value) to the stack.
    This patch fixes this by returning -EIO status when a FW-cmd reports an error.

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

    Kalesh AP
     
  • ethtool expects a -ve status value to be returned when a driver method
    encounters an error. The driver was directly passing the
    error status returned by FW (a positive value) to ethtool.
    This patch fixes this by returning -EIO status in cases where FW returns
    an error.
    Signed-off-by: Kalesh AP
    Signed-off-by: Sathya Perla
    Signed-off-by: David S. Miller

    Kalesh AP
     
  • Signed-off-by: Sathya Perla
    Signed-off-by: David S. Miller

    Kalesh AP
     
  • When the FW stops responding with completions, return -ETIMEDOUT error
    (instead of -1) to the stack.
    Signed-off-by: Kalesh AP
    Signed-off-by: Sathya Perla
    Signed-off-by: David S. Miller

    Kalesh AP
     
  • For FW download ethtool cmd, if the user provides an FW-image incompatible
    with the chip, return -EINVAL instead of -1.

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

    Kalesh AP
     
  • Updating VF's tx-rate and FW-download are not allowed when the interface is
    down. In such cases return -ENETDOWN to the stack.
    Signed-off-by: Kalesh AP
    Signed-off-by: Sathya Perla
    Signed-off-by: David S. Miller

    Kalesh AP
     
  • Currently we might arrive to bond_net_exit() with some bonds left (that
    were created while the module is unloading). We take care of that by
    destroying sysfs (the last possibility to add new bonds) and then
    destroying all the remaining bonds.

    However, we destroy the /proc/net/bonding directory before destroying those
    last bonds, and get a warning that we're trying to destroy a non-empty
    proc directory (containing /proc/net/bonding/bondX).

    Fix this by moving bond_destroy_proc_dir() after all the bonds are
    destroyed, so that we're sure that no bonds exist.

    CC: Jay Vosburgh
    CC: Andy Gospodarek
    Signed-off-by: Veaceslav Falico
    Signed-off-by: David S. Miller

    Veaceslav Falico
     
  • As it's always called with RTNL held, via dev_set_allmulti/promiscuity.
    Also, remove the wrong comment.

    CC: Jay Vosburgh
    CC: Andy Gospodarek
    Signed-off-by: Veaceslav Falico
    Acked-by: Eric Dumazet
    Signed-off-by: David S. Miller

    Veaceslav Falico
     
  • Anish Bhatt says:

    ====================
    cxgb4i: Add ipv6 support

    The following patchset add ipv6 support for the cxgb4i(iscsi) driver.

    Patch 1 moves a define from the iw_cxgb4 to cxgb4 to prevent code duplication,
    as it is used by cxgb4i and iw_cxgb4 both.
    Patch 2 exports symbols needed by cxgb4i for ipv6 support from cxgb4.
    Patch 3 & 4 deal with actual ipv6 code in libcxgbi/cxgb4i.

    Submitting to net-next as changes were needed in cxgb4/iw_cxgb4, and submitting
    to scsi separately would break compilation, cc-ing scsi & rdma.

    v2 : Cleanup macro that prints ip addresses by using %pIS in patch 3
    ====================

    Signed-off-by: David S. Miller

    David S. Miller
     
  • Signed-off-by: Anish Bhatt
    Signed-off-by: Karen Xie
    Signed-off-by: Manoj Malviya
    Signed-off-by: David S. Miller

    Anish Bhatt
     
  • Signed-off-by: Anish Bhatt
    Signed-off-by: Karen Xie
    Signed-off-by: Manoj Malviya
    Signed-off-by: David S. Miller

    Anish Bhatt
     
  • Signed-off-by: Anish Bhatt
    Signed-off-by: David S. Miller

    Anish Bhatt
     
  • This define is used by cxgb4i and iw_cxgb4, moving to avoid code duplication

    Signed-off-by: Anish Bhatt
    Acked-by: Steve Wise
    Signed-off-by: David S. Miller

    Anish Bhatt
     
  • Document the Layer 2 hash factors with packet type ID field.

    CC: Jay Vosburgh
    CC: Veaceslav Falico
    CC: Andy Gospodarek
    CC: David S. Miller
    CC: Pan Jiafei

    Signed-off-by: Jianhua Xie
    Signed-off-by: David S. Miller

    Jianhua Xie
     
  • Current L2 hash helper calculates destination eth addr and
    source ether addr as L2 hash factors. This patch is adding
    packet type ID field into L2 hash factors. While one of
    BOND_XMIT_POLICY_LAYER2 or BOND_XMIT_POLICY_{LAYER|ENCAP}23
    is applied, for the 2nd level hash, enhanced hash method can
    help to distribute different types of packets like IPv4/IPv6
    packets to different slave devices.

    CC: Jay Vosburgh
    CC: Veaceslav Falico
    CC: Andy Gospodarek
    CC: David S. Miller
    CC: Pan Jiafei

    Acked-by: Eric Dumazet
    Signed-off-by: Jianhua Xie
    Signed-off-by: David S. Miller

    Jianhua Xie
     
  • v2: fixed issue with checking return of dcbnl_rtnl_ops->getapp()

    Signed-off-by: Anish Bhatt
    Signed-off-by: David S. Miller

    Anish Bhatt
     
  • Like other places, we need to cancel the nest attribute after
    we start. Fortunately the netlink message will not be sent on
    failure, so it's not a big problem at all.

    Cc: Jamal Hadi Salim
    Cc: "David S. Miller"
    Signed-off-by: Cong Wang
    Signed-off-by: Cong Wang
    Signed-off-by: Jamal Hadi Salim
    Signed-off-by: David S. Miller

    Cong Wang
     

17 Jul, 2014

4 commits

  • Jeff Kirsher says:

    ====================
    Intel Wired LAN Driver Updates 2014-07-16

    This series contains updates to i40e only.

    Neerav adds support to get the port MAC address from firmware and adds
    support to the ndo_get_phys_port_id() callback to provide port specific
    unique ids to the netdev layer.

    Jakub Kicinski provides 2 fixes, first fixes i40e to never generate a software
    time stamp if the hardware time stamp is provided. Second fixes a race
    condition on queueing skb for hardware time by using a simple bit lock to
    avoid race conditions and leaking skbs when multiple transmit rings try
    to claim time stamping.

    Paul does some general cleanup of the driver to remove unneeded spaces,
    comments that are no longer valid, and break that will never get touched.

    Jacob Keller adds a verbose warning message when the incorrect PF attempts
    to control timestamping for a port to which it was not assigned. The primary
    intent of this message is to help debugging the reason why the SIOCSHWSTAMP
    ioctl has failed and to help narrow the cause of the issue.
    ====================

    Signed-off-by: David S. Miller

    David S. Miller
     
  • Generic netlink tables can be const.

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

    stephen hemminger
     
  • In TLB mode if tlb_dynamic_lb is NOT set, slaves from the bond
    group are selected based on the hash distribution. This does not
    exclude dead links which are part of the bond. Also if there is a
    temporary link event which brings down the interface, packets
    hashed on that interface would be dropped too.

    This patch fixes these issues and distributes flows across the
    UP links only. Also the array construction of links which are
    capable of sending packets happen in the control path leaving
    only link-selection during the data-path.

    One possible side effect of this is - at a link event; all
    flows will be shuffled to get good distribution. But impact of
    this should be minimum with the assumption that a member or
    members of the bond group are not available is a very temporary
    situation.

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

    Mahesh Bandewar
     
  • Grygorii Strashko says:

    ====================
    net: davinci_mdio: reuse for keystone2 arch

    The similar MDIO HW blocks is used by keystone 2 SoCs as
    in Davinci SoCs:
    - one in Gigabit Ethernet (GbE) Switch Subsystem
    See http://www.ti.com/lit/ug/sprugv9d/sprugv9d.pdf
    - one in 10 Gigabit Ethernet Subsystem
    See http://www.ti.com/lit/ug/spruhj5/spruhj5.pdf

    Hence, reuse Davinci MDIO driver for Keystone 2 and
    enable TI networking for Keystone 2 devices.

    Also, as part of this series, enable PHY's creation from DT, because
    Keystone 2 supports DT boot mode only.

    Changes in v2:
    - review comments applied.
    Keystone 2 compatibility string changed to "ti,keystone_mdio".
    ====================

    Signed-off-by: David S. Miller

    David S. Miller