1. 18 Jun, 2016 26 commits
  2. 17 Jun, 2016 14 commits
    • Daniel Borkmann's avatar
      net, cls: also reject deleting all filters when TCA_KIND present · 9f6ed032
      Daniel Borkmann authored
      When we check for RTM_DELTFILTER, we should also reject the request
      for deleting all filters under a given parent when TCA_KIND attribute
      is present. If present, it's currently just ignored but there's also
      no point to let it pass in the first place either since this doesn't
      have any meaning with wild-card removal.
      
      Fixes: ea7f8277
      
       ("net, cls: allow for deleting all filters for given parent")
      Signed-off-by: default avatarDaniel Borkmann <daniel@iogearbox.net>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      9f6ed032
    • David S. Miller's avatar
      Merge branch 'vmxnet3-upgrade-to-version3' · 5b706e5c
      David S. Miller authored
      
      
      Shrikrishna Khare says:
      
      ====================
      vmxnet3: upgrade to version 3
      
      vmxnet3 emulation has recently added several new features which includes
      support for new commands the driver can issue to emulation, change in
      descriptor fields etc. This patch series extends the vmxnet3 driver to
      leverage these new features.
      
      Compatibility is maintained using existing vmxnet3 versioning mechanism as
      follows:
       - new features added to vmxnet3 emulation are associated with new vmxnet3
         version viz. vmxnet3 version 3.
       - emulation advertises all the versions it supports to the driver.
       - during initialization, vmxnet3 driver picks the highest version number
       supported by both the emulation and the driver and configures emulation
       to run at that version.
      
      In particular, following changes are introduced:
      
      Patch 1:
        Some command definitions from previous vmxnet3 versions are
        missing. This patch adds those definitions before moving to vmxnet3
        version 3. It also fixes copyright info and maintained by.
      
      Patch 2:
        This patch introduces generalized command interface which allows
        for easily adding new commands that vmxnet3 driver can issue to the
        emulation. Further patches in this series make use of this facility.
      
      Patch 3:
        Transmit data ring buffer is used to copy packet headers or small
        packets. It is a fixed size buffer. This patch extends the driver to
        allow variable sized transmit data ring buffer.
      
      Patch 4:
        This patch introduces receive data ring buffer - a set of small sized
        buffers that are always mapped by the emulation. This avoids memory
        mapping/unmapping overhead for small packets.
      
      Patch 5:
        The vmxnet3 emulation supports a variety of coalescing modes. This patch
        extends vmxnet3 driver to allow querying and configuring these modes.
      
      Patch 6:
        In vmxnet3 version 3, the emulation added support for the vmxnet3 driver
        to communicate information about the memory regions the driver will use
        for rx/tx buffers. This patch exposes related commands to the driver.
      
      Patch 7:
        With all vmxnet3 version 3 changes incorporated in the vmxnet3 driver,
        with this patch, the driver can configure emulation to run at vmxnet3
        version 3.
      
      Changes in v2:
       - v1 patch used special values of rx-usecs to differentiate between
       coalescing modes. v2 uses relevant fields in struct ethtool_coalesce
       to choose modes. Also, a new command VMXNET3_CMD_GET_COALESCE
       is introduced which allows driver to query the device for default
       coalescing configuration.
      
      Changes in v3:
       - fix subject line to use vmxnet3: instead of Driver:Vmxnet3
       - resubmit when net-next is open
      
      Changes in v4:
       - Address code review comments by Ben Hutchings: remove unnecessary memset
         from vmxnet3_get_coalesce.
      
      Changes in v5:
       - Updated all the patches to add detailed commit messages.
      ====================
      
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      5b706e5c
    • Shrikrishna Khare's avatar
      vmxnet3: update to version 3 · 6af9d787
      Shrikrishna Khare authored
      
      
      With all vmxnet3 version 3 changes incorporated in the vmxnet3 driver,
      the driver can configure emulation to run at vmxnet3 version 3, provided
      the emulation advertises support for version 3.
      
      Signed-off-by: default avatarShrikrishna Khare <skhare@vmware.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      6af9d787
    • Shrikrishna Khare's avatar
      vmxnet3: introduce command to register memory region · 47443222
      Shrikrishna Khare authored
      
      
      In vmxnet3 version 3, the emulation added support for the vmxnet3 driver
      to communicate information about the memory regions the driver will use
      for rx/tx buffers. The driver can also indicate which rx/tx queue the
      memory region is applicable for. If this information is communicated
      to the emulation, the emulation will always keep these memory regions
      mapped, thereby avoiding the mapping/unmapping overhead for every packet.
      
      Currently, Linux vmxnet3 driver does not leverage this capability. The
      feasibility of using this approach for the Linux vmxnet3 driver will be
      investigated independently and if possible, will be part of a different
      patch. This patch only exposes the emulation capability to the driver
      (vmxnet3_defs.h is identical between the driver and the emulation).
      
      Signed-off-by: default avatarGuolin Yang <gyang@vmware.com>
      Signed-off-by: default avatarShrikrishna Khare <skhare@vmware.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      47443222
    • Shrikrishna Khare's avatar
      vmxnet3: add support for get_coalesce, set_coalesce ethtool operations · 4edef40e
      Shrikrishna Khare authored
      
      
      The emulation supports a variety of coalescing modes viz. disabled
      (no coalescing), adaptive, static (number of packets to batch before
      raising an interrupt), rate based (number of interrupts per second).
      
      This patch implements get_coalesce and set_coalesce methods to allow
      querying and configuring different coalescing modes.
      
      Signed-off-by: default avatarKeyong Sun <sunk@vmware.com>
      Signed-off-by: default avatarManoj Tammali <tammalim@vmware.com>
      Signed-off-by: default avatarShrikrishna Khare <skhare@vmware.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      4edef40e
    • Shrikrishna Khare's avatar
      vmxnet3: add receive data ring support · 50a5ce3e
      Shrikrishna Khare authored
      
      
      vmxnet3 driver preallocates buffers for receiving packets and posts the
      buffers to the emulation. In order to deliver a received packet to the
      guest, the emulation must map buffer(s) and copy the packet into it.
      
      To avoid this memory mapping overhead, this patch introduces the receive
      data ring - a set of small sized buffers that are always mapped by
      the emulation. If a packet fits into the receive data ring buffer, the
      emulation delivers the packet via the receive data ring (which must be
      copied by the guest driver), or else the usual receive path is used.
      
      Receive Data Ring buffer length is configurable via ethtool -G ethX rx-mini
      
      Signed-off-by: default avatarShrikrishna Khare <skhare@vmware.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      50a5ce3e
    • Shrikrishna Khare's avatar
      vmxnet3: allow variable length transmit data ring buffer · 3c8b3efc
      Shrikrishna Khare authored
      
      
      vmxnet3 driver supports transmit data ring viz. a set of fixed size
      buffers used by the driver to copy packet headers. Small packets that
      fit these buffers are copied into these buffers entirely.
      
      Currently this buffer size of fixed at 128 bytes. This patch extends
      transmit data ring implementation to allow variable length transmit
      data ring buffers. The length of the buffer is read from the emulation
      during initialization.
      
      Signed-off-by: default avatarSriram Rangarajan <rangarajans@vmware.com>
      Signed-off-by: default avatarShrikrishna Khare <skhare@vmware.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      3c8b3efc
    • Shrikrishna Khare's avatar
      vmxnet3: introduce generalized command interface to configure the device · f35c7480
      Shrikrishna Khare authored
      
      
      Shared memory is used to exchange information between the vmxnet3 driver
      and the emulation. In order to request emulation to perform a task, the
      driver first populates specific fields in this shared memory and then
      issues corresponding command by writing to the command register(CMD). The
      layout of the shared memory was defined by vmxnet3 version 1 and cannot
      be extended for every new command without breaking backward compatibility.
      
      To address this problem, in vmxnet3 version 3, the emulation repurposed
      a reserved field in the shared memory to represent command information
      instead. For new commands, the driver first populates the command
      information field in the shared memory and then issues the command. The
      emulation interprets the data written to the command information depending
      on the type of the command. This patch exposes this capability to the driver.
      
      Signed-off-by: default avatarGuolin Yang <gyang@vmware.com>
      Signed-off-by: default avatarShrikrishna Khare <skhare@vmware.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      f35c7480
    • Shrikrishna Khare's avatar
      vmxnet3: prepare for version 3 changes · 190af10f
      Shrikrishna Khare authored
      
      
      vmxnet3 is currently at version 2, but some command definitions from
      previous vmxnet3 versions are missing. Add those definitions before
      moving to version 3.
      
      Also, introduce utility macros for vmxnet3 version comparison and update
      Copyright information and Maintained by.
      
      Signed-off-by: default avatarShrikrishna Khare <skhare@vmware.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      190af10f
    • David S. Miller's avatar
      Merge branch 'qeth-next' · a264d830
      David S. Miller authored
      
      
      Ursula Braun says:
      
      ====================
      s390: qeth patches
      
      here are patches for the s390 qeth driver for net-next:
      
      Patch 01 is a minor improvement for the bridgeport code in qeth.
      
      Patches 02-07 take care about scatter/gather handling in qeth.
      
      Patch 08 improves handling of multicast IP addresses in the qeth layer3
      discipline.
      
      Patches 09-11 improve netdev features related functions in qeth.
      
      Patch 12 implements an outbound queue restriction for HiperSockets.
      
      Patch 13 fixes a wrong indentation in qeth_l3_main.c causing a warning
      with gcc-6.
      ====================
      
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      a264d830
    • Sebastian Ott's avatar
      s390/qeth: fix indentation in qeth_l3_arp_query · 77a83ed1
      Sebastian Ott authored
      
      
      gcc-6 warns about obviously wrong indentation:
      drivers/s390/net/qeth_l3_main.c: In function 'qeth_l3_arp_query':
      drivers/s390/net/qeth_l3_main.c:2315:3: warning: this 'if' clause does not
      guard... [-Wmisleading-indentation]
         if (copy_to_user(udata, qinfo.udata, 4))
         ^~
      drivers/s390/net/qeth_l3_main.c:2317:4: note: ...this statement, but the
      latter is misleadingly indented as if it is guarded by the 'if'
          goto free_and_out;
          ^~~~
      
      Although this particular case is harmless, fix the indentation to get rid
      of that warning and improve readability.
      
      Signed-off-by: default avatarSebastian Ott <sebott@linux.vnet.ibm.com>
      Signed-off-by: default avatarUrsula Braun <ubraun@linux.vnet.ibm.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      77a83ed1
    • Hans Wippel's avatar
      qeth: omit outbound queue 3 for unicast packets in Priority Queuing on HiperSockets · 70deb016
      Hans Wippel authored
      
      
      On HiperSockets only outbound queues 0 to 2 are available for unicast
      packets. Current Priority Queuing implementation in the qeth driver puts
      outgoing packets in outbound queues 0 to 3.
      
      This puts outgoing unicast packets into outbound queue 2 instead of
      outbound queue 3 when using Priority Queuing on a HiperSocket.
      Additionally, the default outbound queue cannot be set to outbound queue 3
      on HiperSockets.
      
      Signed-off-by: default avatarHans Wippel <hwippel@linux.vnet.ibm.com>
      Signed-off-by: default avatarUrsula Braun <ubraun@linux.vnet.ibm.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      70deb016
    • Hans Wippel's avatar
      qeth: improve set_features error handling · 6c7cd712
      Hans Wippel authored
      
      
      The function set_features is called to configure network device features
      on the hardware. If errors occur, the network device features should
      reflect the changed hardware state and the function should return an
      error in order to notify the user.
      
      In case of an error, the current implementation does not necessarily
      save the changed hardware state in the network device features before an
      error is returned.
      
      This patch improves error handling by saving features, that could be
      changed, to the network device features before returning an error. If
      the device is not running, an additional check in fix_features removes
      features, that require hardware changes, before they are passed to
      set_features. Thus, the corresponding check was removed in set_features.
      
      Signed-off-by: default avatarHans Wippel <hwippel@linux.vnet.ibm.com>
      Signed-off-by: default avatarUrsula Braun <ubraun@linux.vnet.ibm.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      6c7cd712
    • Hans Wippel's avatar
      qeth: add network device features for VLAN devices · 9bdc4411
      Hans Wippel authored
      
      
      Network device features indicate the capabilities of network devices (e.g.,
      TX checksum offloading and TSO) and their configuration state. Additional
      network device features (vlan_features) indicate for each network device,
      which capabilities can be used on VLAN devices, that are configured on the
      respective base network device.
      
      In the current qeth implementation, network device features are only set
      for the base network devices and not for the VLAN devices. Thus, features
      like TX checksum offloading cannot be used on VLAN devices.
      
      This patch adds network device features to vlan_features, so they can be
      used by VLAN devices.
      
      Signed-off-by: default avatarHans Wippel <hwippel@linux.vnet.ibm.com>
      Signed-off-by: default avatarUrsula Braun <ubraun@linux.vnet.ibm.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      9bdc4411