1. 08 12月, 2015 8 次提交
  2. 07 12月, 2015 16 次提交
    • I
      mac80211: handle HW ROC expired properly · 1b894521
      Ilan Peer 提交于
      In case of HW ROC, when the driver reports that the ROC expired,
      it is not sufficient to purge the ROCs based on the remaining
      time, as it possible that the device finished the ROC session
      before the actual requested duration.
      
      To handle such cases, in case of ROC expired notification from
      the driver, complete all the ROCs which are marked with hw_begun,
      regardless of the remaining duration.
      Signed-off-by: NIlan Peer <ilan.peer@intel.com>
      Signed-off-by: NJohannes Berg <johannes.berg@intel.com>
      1b894521
    • R
      af_unix: fix unix_dgram_recvmsg entry locking · 64874280
      Rainer Weikusat 提交于
      The current unix_dgram_recvsmg code acquires the u->readlock mutex in
      order to protect access to the peek offset prior to calling
      __skb_recv_datagram for actually receiving data. This implies that a
      blocking reader will go to sleep with this mutex held if there's
      presently no data to return to userspace. Two non-desirable side effects
      of this are that a later non-blocking read call on the same socket will
      block on the ->readlock mutex until the earlier blocking call releases it
      (or the readers is interrupted) and that later blocking read calls
      will wait longer than the effective socket read timeout says they
      should: The timeout will only start 'ticking' once such a reader hits
      the schedule_timeout in wait_for_more_packets (core.c) while the time it
      already had to wait until it could acquire the mutex is unaccounted for.
      
      The patch avoids both by using the __skb_try_recv_datagram and
      __skb_wait_for_more packets functions created by the first patch to
      implement a unix_dgram_recvmsg read loop which releases the readlock
      mutex prior to going to sleep and reacquires it as needed
      afterwards. Non-blocking readers will thus immediately return with
      -EAGAIN if there's no data available regardless of any concurrent
      blocking readers and all blocking readers will end up sleeping via
      schedule_timeout, thus honouring the configured socket receive timeout.
      Signed-off-by: NRainer Weikusat <rweikusat@mobileactivedefense.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      64874280
    • R
      core: enable more fine-grained datagram reception control · ea3793ee
      Rainer Weikusat 提交于
      The __skb_recv_datagram routine in core/ datagram.c provides a general
      skb reception factility supposed to be utilized by protocol modules
      providing datagram sockets. It encompasses both the actual recvmsg code
      and a surrounding 'sleep until data is available' loop. This is
      inconvenient if a protocol module has to use additional locking in order
      to maintain some per-socket state the generic datagram socket code is
      unaware of (as the af_unix code does). The patch below moves the recvmsg
      proper code into a new __skb_try_recv_datagram routine which doesn't
      sleep and renames wait_for_more_packets to
      __skb_wait_for_more_packets, both routines being exported interfaces. The
      original __skb_recv_datagram routine is reimplemented on top of these
      two functions such that its user-visible behaviour remains unchanged.
      Signed-off-by: NRainer Weikusat <rweikusat@mobileactivedefense.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      ea3793ee
    • A
      PHY: DP83867: Remove looking in parent device for OF properties · 7bf9ae01
      Andrew Lunn 提交于
      Device tree properties for a phy device are expected to be in the phy
      node. The current code for the DP83867 also tries to look in the
      parent node. The devices binding documentation does not mention this,
      no current device tree file makes use of this, and it is not behaviour
      we want. So remove looking in the parent device.
      Signed-off-by: NAndrew Lunn <andrew@lunn.ch>
      Acked-by: NFlorian Fainelli <f.fainelli@gmail.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      7bf9ae01
    • B
      net: cdc_ncm: add "ndp_to_end" sysfs attribute · 404814af
      Bjørn Mork 提交于
      Adding a writable sysfs attribute for the "NDP to end"
      quirk flag.
      
      This makes it easier for end users to test new devices for
      this firmware bug.  We've been lucky so far, but we should
      not depend on reporters capable of rebuilding the driver.
      
      Cc: Enrico Mioso <mrkiko.rs@gmail.com>
      Signed-off-by: NBjørn Mork <bjorn@mork.no>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      404814af
    • D
      Merge branch 'mlx4-HA-LAG-SRIOV-VF' · 0fe3e204
      David S. Miller 提交于
      Or Gerlitz says:
      
      ====================
      Add HA and LAG support for mlx4 SRIOV VFs
      
      This series is built upon the code added in commit ce388fff "Merge branch
      'mlx4-next'" which added HA and LAG support to mlx4 RoCE and SRIOV services.
      
      We add HA and Link Aggregation support to single ported mlx4 Ethernet VFs.
      
      In this case, the PF Ethernet interfaces are bonded, the VFs see single
      port HW devices (already supported) -- however, now this port is highly
      available. This means that all VF HW QPs (both VF Ethernet driver and VF
      RoCE / RAW QPs) are subject to the V2P (Virtual-To-Physical) mapping which
      is managed by the PF driver, and hence resilient across link failures and
      such events.
      
      When bonding operates in Dynamic link aggregation (802.3ad) mode, traffic
      from each VF will go over the VF "base port" (the port this VF is assigned
      to by the admin) as long as this port is up. When the port fails, traffic
      from all VFs that are defined on this port will move to the other port, and
      be back to their base-port when it recovers.
      
      Moni and Or.
      ====================
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      0fe3e204
    • M
      net/mlx4_core: Support the HA mode for SRIOV VFs too · e57968a1
      Moni Shoua 提交于
      When the mlx4 driver runs in HA mode, and all VFs are single ported
      ones, we make their single port Highly-Available.
      
      This is done by taking advantage of the HA mode properties (following
      bonding changes with programming the port V2P map, etc) and adding
      the missing parts which are unique to SRIOV such as mirroring VF
      steering rules on both ports.
      
      Due to limits on the MAC and VLAN table this mode is enabled only when
      number of total VFs is under 64.
      Signed-off-by: NMoni Shoua <monis@mellanox.com>
      Reviewed-by: NJack Morgenstein <jackm@dev.mellanox.co.il>
      Signed-off-by: NOr Gerlitz <ogerlitz@mellanox.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      e57968a1
    • O
      IB/mlx4: Use the VF base-port when demuxing mad from wire · f1b4e12a
      Or Gerlitz 提交于
      Under HA mode, it's possible that the VF registered its GID
      (and expects to get mads through the PV scheme) on a port which is
      different from the one this mad arrived on, due to HA fail over.
      
      Therefore, if the gid is not matched on the port that the packet arrived
      on, check for a match on the other port if HA mode is active -- and if a
      match is found on the other port, continue processing the mad using that
      other port.
      Signed-off-by: NOr Gerlitz <ogerlitz@mellanox.com>
      Reviewed-by: NJack Morgenstein <jackm@dev.mellanox.co.il>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      f1b4e12a
    • M
      net/mlx4_core: Keep VLAN/MAC tables mirrored in multifunc HA mode · 5f61385d
      Moni Shoua 提交于
      Due to HW limitations, indexes to MAC and VLAN tables are always taken
      from the table of the actual port. So, if a resource holds an index to
      a table, it may refer to different values during the lifetime of the
      resource,  unless the tables are mirrored. Also, even when
      driver is not in HA mode the policy of allocating an index to these
      tables is such to make sure, as much as possible, that when the time
      comes the mirroring will be successful. This means that in multifunction
      mode the allocation of a free index in a port's table tries to make sure
      that the same index in the other's port table is also free.
      Signed-off-by: NMoni Shoua <monis@mellanox.com>
      Reviewed-by: NJack Morgenstein <jackm@dev.mellanox.co.il>
      Signed-off-by: NOr Gerlitz <ogerlitz@mellanox.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      5f61385d
    • M
      net/mlx4_core: Support mirroring VF DMFS rules on both ports · 78efed27
      Moni Shoua 提交于
      Under HA mode, steering rules set by VFs should be mirrored on both
      ports of the device so packets will be accepted no matter on which
      port they arrived.
      
      Since getting into HA mode is done dynamically when the user bonds mlx4
      Ethernet netdevs, we keep hold of the VF DMFS rule mbox with the port
      value flipped (1->2,2->1) and execute the mirroring when getting into
      HA mode. Later, when going out of HA mode, we unset the mirrored rules.
      In that context note that mirrored rules cannot be removed explicitly.
      Signed-off-by: NMoni Shoua <monis@mellanox.com>
      Reviewed-by: NJack Morgenstein <jackm@dev.mellanox.co.il>
      Signed-off-by: NOr Gerlitz <ogerlitz@mellanox.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      78efed27
    • M
      net/mlx4_core: Use both physical ports to dispatch link state events to VF · 8d80d04a
      Moni Shoua 提交于
      Under HA mode, the link down event should be sent to VFs only if both
      ports are down.
      Signed-off-by: NMoni Shoua <monis@mellanox.com>
      Reviewed-by: NJack Morgenstein <jackm@dev.mellanox.co.il>
      Signed-off-by: NOr Gerlitz <ogerlitz@mellanox.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      8d80d04a
    • O
      net/mlx4_core: Use both physical ports to set the VF link state · e34305c8
      Or Gerlitz 提交于
      In HA mode, the link state for VFs for which the policy is "auto"
      (i.e. follow the physical link state) should be ORed from both ports.
      Signed-off-by: NOr Gerlitz <ogerlitz@mellanox.com>
      Reviewed-by: NJack Morgenstein <jackm@dev.mellanox.co.il>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      e34305c8
    • J
      VSOCK: fix returnvar.cocci warnings · 0d76d6e8
      Julia Lawall 提交于
      Remove unneeded variable used to store return value.
      
      Generated by: scripts/coccinelle/misc/returnvar.cocci
      
      CC: Asias He <asias@redhat.com>
      Signed-off-by: NFengguang Wu <fengguang.wu@intel.com>
      Signed-off-by: NJulia Lawall <julia.lawall@lip6.fr>
      Reviewed-by: NStefan Hajnoczi <stefanha@redhat.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      0d76d6e8
    • B
      net: qmi_wwan: should hold RTNL while changing netdev type · 6c730080
      Bjørn Mork 提交于
      The notifier calls were thrown in as a last-minute fix for an
      imagined "this device could be part of a bridge" problem. That
      revealed a certain lack of locking.  Not to mention testing...
      
      Avoid this splat:
      
      RTNL: assertion failed at net/core/dev.c (1639)
      CPU: 0 PID: 4293 Comm: bash Not tainted 4.4.0-rc3+ #358
      Hardware name: LENOVO 2776LEG/2776LEG, BIOS 6EET55WW (3.15 ) 12/19/2011
       0000000000000000 ffff8800ad253d60 ffffffff8122f7cf ffff8800ad253d98
       ffff8800ad253d88 ffffffff813833ab 0000000000000002 ffff880230f48560
       ffff880230a12900 ffff8800ad253da0 ffffffff813833da 0000000000000002
      Call Trace:
       [<ffffffff8122f7cf>] dump_stack+0x4b/0x63
       [<ffffffff813833ab>] call_netdevice_notifiers_info+0x3d/0x59
       [<ffffffff813833da>] call_netdevice_notifiers+0x13/0x15
       [<ffffffffa09be227>] raw_ip_store+0x81/0x193 [qmi_wwan]
       [<ffffffff8131e149>] dev_attr_store+0x20/0x22
       [<ffffffff811d858b>] sysfs_kf_write+0x49/0x50
       [<ffffffff811d8027>] kernfs_fop_write+0x10a/0x151
       [<ffffffff8117249a>] __vfs_write+0x26/0xa5
       [<ffffffff81085ed4>] ? percpu_down_read+0x53/0x7f
       [<ffffffff81174c9e>] ? __sb_start_write+0x5f/0xb0
       [<ffffffff81174c9e>] ? __sb_start_write+0x5f/0xb0
       [<ffffffff81172c37>] vfs_write+0xa3/0xe7
       [<ffffffff811734ad>] SyS_write+0x50/0x7e
       [<ffffffff8145c517>] entry_SYSCALL_64_fastpath+0x12/0x6f
      
      Fixes: 32f7adf6 ("net: qmi_wwan: support "raw IP" mode")
      Signed-off-by: NBjørn Mork <bjorn@mork.no>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      6c730080
    • S
      Revert "i40e: remove CONFIG_I40E_VXLAN" · 6633d381
      Singhai, Anjali 提交于
      This reverts commit 8fe26999.
      The case where VXLAN is a module and i40e driver is inbuilt
      will not be handled properly with this change since i40e
      will have an undefined symbol vxlan_get_rx_port in it.
      
      v2: Add a signed-off-by.
      Signed-off-by: NAnjali Singhai Jain <anjali.singhai@intel.com>
      Acked-by: NJeff Kirsher <jeffrey.t.kirsher@intel.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      6633d381
    • D
      Merge branch '100GbE' of git://git.kernel.org/pub/scm/linux/kernel/git/jkirsher/next-queue · b48565f5
      David S. Miller 提交于
      Jeff Kirsher says:
      
      ====================
      100GbE Intel Wired LAN Driver Updates 2015-12-05
      
      This series contains updates to fm10k only.
      
      Jacob provides the remaining fm10k patches in the series.  First change
      ensures that all the logic regarding the setting of netdev features is
      consolidated in one place of the driver.  Fixed an issue where an assumption
      was being made on how many queues are available, especially when init_hw_vf()
      errors out.  Fixed up an number of issues with init_hw() where failures
      were not being handled properly or at all, so update the driver to check
      returned error codes and respond appropriately.  Fixed up typecasting
      issues found where either the incorrect typecast size was used or
      explicitly typecast values.  Added additional debugging statistics and
      rename statistic to better reflect its true value.  Added support for
      ITR scaling based on PCIe link speed for fm10k.  Fixed up code comment
      where "hardware" was misspelled.
      
      v2: Dropped patches #1 and #10 from original submission, patch #1 was from
          Nick Krause and due to his past kernel interactions, dropping his patch.
          Patch #10 had questions and concerns from Tom Herbert which cannot be
          addressed at this time since the author (Jacob Keller) is currently on
          sabbatical, so dropping this patch for now until we can properly address
          Tom's questions and concerns.
      ====================
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      b48565f5
  3. 06 12月, 2015 16 次提交