Merge tag 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/dledford/rdma
authorLinus Torvalds <torvalds@linux-foundation.org>
Tue, 22 Mar 2016 22:48:44 +0000 (15:48 -0700)
committerLinus Torvalds <torvalds@linux-foundation.org>
Tue, 22 Mar 2016 22:48:44 +0000 (15:48 -0700)
Pull more rdma updates from Doug Ledford:
 "Round two of 4.6 merge window patches.

  This is a monster pull request.  I held off on the hfi1 driver updates
  (the hfi1 driver is intimately tied to the qib driver and the new
  rdmavt software library that was created to help both of them) in my
  first pull request.  The hfi1/qib/rdmavt update is probably 90% of
  this pull request.  The hfi1 driver is being left in staging so that
  it can be fixed up in regards to the API that Al and yourself didn't
  like.  Intel has agreed to do the work, but in the meantime, this
  clears out 300+ patches in the backlog queue and brings my tree and
  their tree closer to sync.

  This also includes about 10 patches to the core and a few to mlx5 to
  create an infrastructure for configuring SRIOV ports on IB devices.
  That series includes one patch to the net core that we sent to netdev@
  and Dave Miller with each of the three revisions to the series.  We
  didn't get any response to the patch, so we took that as implicit
  approval.

  Finally, this series includes Intel's new iWARP driver for their x722
  cards.  It's not nearly the beast as the hfi1 driver.  It also has a
  linux-next merge issue, but that has been resolved and it now passes
  just fine.

  Summary:

   - A few minor core fixups needed for the next patch series

   - The IB SRIOV series.  This has bounced around for several versions.
     Of note is the fact that the first patch in this series effects the
     net core.  It was directed to netdev and DaveM for each iteration
     of the series (three versions total).  Dave did not object, but did
     not respond either.  I've taken this as permission to move forward
     with the series.

   - The new Intel X722 iWARP driver

   - A huge set of updates to the Intel hfi1 driver.  Of particular
     interest here is that we have left the driver in staging since it
     still has an API that people object to.  Intel is working on a fix,
     but getting these patches in now helps keep me sane as the upstream
     and Intel's trees were over 300 patches apart"

* tag 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/dledford/rdma: (362 commits)
  IB/ipoib: Allow mcast packets from other VFs
  IB/mlx5: Implement callbacks for manipulating VFs
  net/mlx5_core: Implement modify HCA vport command
  net/mlx5_core: Add VF param when querying vport counter
  IB/ipoib: Add ndo operations for configuring VFs
  IB/core: Add interfaces to control VF attributes
  IB/core: Support accessing SA in virtualized environment
  IB/core: Add subnet prefix to port info
  IB/mlx5: Fix decision on using MAD_IFC
  net/core: Add support for configuring VF GUIDs
  IB/{core, ulp} Support above 32 possible device capability flags
  IB/core: Replace setting the zero values in ib_uverbs_ex_query_device
  net/mlx5_core: Introduce offload arithmetic hardware capabilities
  net/mlx5_core: Refactor device capability function
  net/mlx5_core: Fix caching ATOMIC endian mode capability
  ib_srpt: fix a WARN_ON() message
  i40iw: Replace the obsolete crypto hash interface with shash
  IB/hfi1: Add SDMA cache eviction algorithm
  IB/hfi1: Switch to using the pin query function
  IB/hfi1: Specify mm when releasing pages
  ...

27 files changed:
1  2 
MAINTAINERS
drivers/infiniband/core/sa_query.c
drivers/infiniband/hw/mlx5/main.c
drivers/infiniband/ulp/srpt/ib_srpt.c
drivers/net/ethernet/intel/i40e/i40e.h
drivers/net/ethernet/intel/i40e/i40e_main.c
drivers/net/ethernet/intel/i40e/i40e_type.h
drivers/net/ethernet/intel/i40e/i40e_virtchnl_pf.c
drivers/net/ethernet/intel/i40e/i40e_virtchnl_pf.h
drivers/net/ethernet/mellanox/mlx5/core/cmd.c
drivers/net/ethernet/mellanox/mlx5/core/main.c
drivers/staging/rdma/hfi1/chip.c
drivers/staging/rdma/hfi1/diag.c
drivers/staging/rdma/hfi1/driver.c
drivers/staging/rdma/hfi1/efivar.c
drivers/staging/rdma/hfi1/file_ops.c
drivers/staging/rdma/hfi1/init.c
drivers/staging/rdma/hfi1/mad.c
drivers/staging/rdma/hfi1/pcie.c
drivers/staging/rdma/hfi1/pio_copy.c
drivers/staging/rdma/hfi1/user_sdma.c
include/linux/mlx5/device.h
include/linux/mlx5/driver.h
include/linux/mlx5/mlx5_ifc.h
include/linux/netdevice.h
include/uapi/linux/if_link.h
net/core/rtnetlink.c

diff --cc MAINTAINERS
@@@ -9215,15 -9080,17 +9225,21 @@@ S:   Maintaine
  F:    drivers/net/ethernet/rdc/r6040.c
  
  RDS - RELIABLE DATAGRAM SOCKETS
 -M:    Chien Yen <chien.yen@oracle.com>
 +M:    Santosh Shilimkar <santosh.shilimkar@oracle.com>
 +L:    netdev@vger.kernel.org
 +L:    linux-rdma@vger.kernel.org
  L:    rds-devel@oss.oracle.com (moderated for non-subscribers)
 +W:    https://oss.oracle.com/projects/rds/
  S:    Supported
  F:    net/rds/
 +F:    Documentation/networking/rds.txt
  
+ RDMAVT - RDMA verbs software
+ M:    Dennis Dalessandro <dennis.dalessandro@intel.com>
+ L:    linux-rdma@vger.kernel.org
+ S:    Supported
+ F:    drivers/infiniband/sw/rdmavt
  READ-COPY UPDATE (RCU)
  M:    "Paul E. McKenney" <paulmck@linux.vnet.ibm.com>
  M:    Josh Triplett <josh@joshtriplett.org>
Simple merge
Simple merge
Simple merge
@@@ -5375,10 -5368,11 +5395,12 @@@ int i40e_open(struct net_device *netdev
        vxlan_get_rx_port(netdev);
  #endif
  #ifdef CONFIG_I40E_GENEVE
 -      geneve_get_rx_port(netdev);
 +      if (pf->flags & I40E_FLAG_GENEVE_OFFLOAD_CAPABLE)
 +              geneve_get_rx_port(netdev);
  #endif
  
+       i40e_notify_client_of_netdev_open(vsi);
        return 0;
  }
  
@@@ -11245,9 -11234,16 +11339,16 @@@ static void i40e_remove(struct pci_dev 
        if (pf->vsi[pf->lan_vsi])
                i40e_vsi_release(pf->vsi[pf->lan_vsi]);
  
+       /* remove attached clients */
+       ret_code = i40e_lan_del_device(pf);
+       if (ret_code) {
+               dev_warn(&pdev->dev, "Failed to delete client device: %d\n",
+                        ret_code);
+       }
        /* shutdown and destroy the HMC */
 -      if (pf->hw.hmc.hmc_obj) {
 -              ret_code = i40e_shutdown_lan_hmc(&pf->hw);
 +      if (hw->hmc.hmc_obj) {
 +              ret_code = i40e_shutdown_lan_hmc(hw);
                if (ret_code)
                        dev_warn(&pdev->dev,
                                 "Failed to destroy the HMC resources: %d\n",
Simple merge
Simple merge
Simple merge
Simple merge
Simple merge
Simple merge
@@@ -2737,49 -2845,21 +2845,21 @@@ static int pma_get_opa_porterrors(struc
        ppd = ppd_from_ibp(ibp);
  
        memset(rsp, 0, sizeof(*rsp));
-       rsp->port_number = (u8)port_num;
+       rsp->port_number = port_num;
+       pma_get_opa_port_ectrs(ibdev, rsp, port_num);
  
-       rsp->port_rcv_constraint_errors =
-               cpu_to_be64(read_port_cntr(ppd, C_SW_RCV_CSTR_ERR,
-                                          CNTR_INVALID_VL));
-       /* port_rcv_switch_relay_errors is 0 for HFIs */
-       rsp->port_xmit_discards =
-               cpu_to_be64(read_port_cntr(ppd, C_SW_XMIT_DSCD,
-                                               CNTR_INVALID_VL));
        rsp->port_rcv_remote_physical_errors =
                cpu_to_be64(read_dev_cntr(dd, C_DC_RMT_PHY_ERR,
-                                               CNTR_INVALID_VL));
-       tmp = read_dev_cntr(dd, C_DC_RX_REPLAY, CNTR_INVALID_VL);
-       tmp2 = tmp + read_dev_cntr(dd, C_DC_TX_REPLAY, CNTR_INVALID_VL);
-       if (tmp2 < tmp) {
-               /* overflow/wrapped */
-               rsp->local_link_integrity_errors = cpu_to_be64(~0);
-       } else {
-               rsp->local_link_integrity_errors = cpu_to_be64(tmp2);
-       }
-       tmp = read_dev_cntr(dd, C_DC_SEQ_CRC_CNT, CNTR_INVALID_VL);
-       tmp2 = tmp + read_dev_cntr(dd, C_DC_REINIT_FROM_PEER_CNT,
-                                       CNTR_INVALID_VL);
-       if (tmp2 > (u32)UINT_MAX || tmp2 < tmp) {
-               /* overflow/wrapped */
-               rsp->link_error_recovery = cpu_to_be32(~0);
-       } else {
-               rsp->link_error_recovery = cpu_to_be32(tmp2);
-       }
-       rsp->port_xmit_constraint_errors =
-               cpu_to_be64(read_port_cntr(ppd, C_SW_XMIT_CSTR_ERR,
-                                          CNTR_INVALID_VL));
-       rsp->excessive_buffer_overruns =
-               cpu_to_be64(read_dev_cntr(dd, C_RCV_OVF, CNTR_INVALID_VL));
+                                         CNTR_INVALID_VL));
        rsp->fm_config_errors =
                cpu_to_be64(read_dev_cntr(dd, C_DC_FM_CFG_ERR,
-                                               CNTR_INVALID_VL));
-       rsp->link_downed = cpu_to_be32(read_port_cntr(ppd, C_SW_LINK_DOWN,
-                                               CNTR_INVALID_VL));
+                                         CNTR_INVALID_VL));
        tmp = read_dev_cntr(dd, C_DC_UNC_ERR, CNTR_INVALID_VL);
        rsp->uncorrectable_errors = tmp < 0x100 ? (tmp & 0xff) : 0xff;
  
 -      vlinfo = (struct _vls_ectrs *)&rsp->vls[0];
 +      vlinfo = &rsp->vls[0];
        vfi = 0;
        vl_select_mask = be32_to_cpu(req->vl_select_mask);
        for_each_set_bit(vl, (unsigned long *)&(vl_select_mask),
Simple merge
@@@ -562,10 -565,12 +565,12 @@@ static void mid_copy_mix(struct pio_bu
                void __iomem *send;             /* SOP end */
                void __iomem *xend;
  
-               /* calculate the end of data or end of block, whichever
-                  comes first */
+               /*
+                * calculate the end of data or end of block, whichever
+                * comes first
+                */
                send = pbuf->start + PIO_BLOCK_SIZE;
 -              xend = send < dend ? send : dend;
 +              xend = min(send, dend);
  
                /* shift up to SOP=1 space */
                dest += SOP_DISTANCE;
@@@ -656,10 -661,12 +661,12 @@@ static void mid_copy_straight(struct pi
                void __iomem *send;             /* SOP end */
                void __iomem *xend;
  
-               /* calculate the end of data or end of block, whichever
-                  comes first */
+               /*
+                * calculate the end of data or end of block, whichever
+                * comes first
+                */
                send = pbuf->start + PIO_BLOCK_SIZE;
 -              xend = send < dend ? send : dend;
 +              xend = min(send, dend);
  
                /* shift up to SOP=1 space */
                dest += SOP_DISTANCE;
Simple merge
Simple merge
Simple merge
Simple merge
Simple merge
Simple merge
@@@ -1389,8 -1387,19 +1389,10 @@@ static const struct nla_policy ifla_vf_
        [IFLA_VF_RSS_QUERY_EN]  = { .len = sizeof(struct ifla_vf_rss_query_en) },
        [IFLA_VF_STATS]         = { .type = NLA_NESTED },
        [IFLA_VF_TRUST]         = { .len = sizeof(struct ifla_vf_trust) },
+       [IFLA_VF_IB_NODE_GUID]  = { .len = sizeof(struct ifla_vf_guid) },
+       [IFLA_VF_IB_PORT_GUID]  = { .len = sizeof(struct ifla_vf_guid) },
  };
  
 -static const struct nla_policy ifla_vf_stats_policy[IFLA_VF_STATS_MAX + 1] = {
 -      [IFLA_VF_STATS_RX_PACKETS]      = { .type = NLA_U64 },
 -      [IFLA_VF_STATS_TX_PACKETS]      = { .type = NLA_U64 },
 -      [IFLA_VF_STATS_RX_BYTES]        = { .type = NLA_U64 },
 -      [IFLA_VF_STATS_TX_BYTES]        = { .type = NLA_U64 },
 -      [IFLA_VF_STATS_BROADCAST]       = { .type = NLA_U64 },
 -      [IFLA_VF_STATS_MULTICAST]       = { .type = NLA_U64 },
 -};
 -
  static const struct nla_policy ifla_port_policy[IFLA_PORT_MAX+1] = {
        [IFLA_PORT_VF]          = { .type = NLA_U32 },
        [IFLA_PORT_PROFILE]     = { .type = NLA_STRING,