26 Feb, 2016

1 commit


20 Jan, 2016

2 commits


23 Dec, 2015

2 commits

  • In order to make sure API users don't try to use SGIDs which don't
    conform to the routing table, validate the route before searching
    the RoCE GID table.

    Signed-off-by: Matan Barak
    Signed-off-by: Doug Ledford

    Matan Barak
     
  • Providers should tell IB core the wc's network type.
    This is used in order to search for the proper GID in the
    GID table. When using HCAs that can't provide this info,
    IB core tries to deep examine the packet and extract
    the GID type by itself.

    We choose sgid_index and type from all the matching entries in
    RDMA-CM based on hint from the IP stack and we set hop_limit for
    the IP packet based on above hint from IP stack.

    Signed-off-by: Matan Barak
    Signed-off-by: Somnath Kotur
    Signed-off-by: Doug Ledford

    Somnath Kotur
     

29 Oct, 2015

1 commit

  • Add network namespace support to the ib_addr module. For that, all the
    address resolution and matching should be done using the appropriate
    namespace instead of init_net.

    This is achieved by:

    1. Adding an explicit network namespace argument to exported function that
    require a namespace.
    2. Saving the namespace in the rdma_addr_client structure.
    3. Using it when calling networking functions.

    In order to preserve the behavior of calling modules, &init_net is
    passed as the parameter in calls from other modules. This is modified as
    namespace support is added on more levels.

    Signed-off-by: Haggai Eran
    Signed-off-by: Yotam Kenneth
    Signed-off-by: Shachar Raindel
    Signed-off-by: Guy Shapiro
    Signed-off-by: Doug Ledford

    Guy Shapiro
     

22 Oct, 2015

1 commit

  • Previously, vlan id and source MAC were used from QP attributes. Since
    the net device is now stored in the GID attributes, they could be used
    instead of getting this information from the QP attributes.

    IB_QP_SMAC, IB_QP_ALT_SMAC, IB_QP_VID and IB_QP_ALT_VID were removed
    because there is no known libibverbs that uses them.

    This commit also modifies the vendors (mlx4, ocrdma) drivers in order
    to use the new approach.

    ocrdma driver changes were done by Somnath Kotur

    Signed-off-by: Matan Barak
    Signed-off-by: Doug Ledford

    Matan Barak
     

02 Jun, 2015

1 commit


06 May, 2015

1 commit


19 Jan, 2014

1 commit

  • Currently, the IB core and specifically the RDMA-CM assumes that IBoE
    (RoCE) gids encode related Ethernet netdevice interface MAC address
    and possibly VLAN id.

    Change GIDs to be treated as they encode interface IP address.

    Since Ethernet layer 2 address parameters are not longer encoded
    within gids, we have to extend the Infiniband address structures (e.g.
    ib_ah_attr) with layer 2 address parameters, namely mac and vlan.

    Signed-off-by: Moni Shoua
    Signed-off-by: Or Gerlitz
    Signed-off-by: Roland Dreier

    Moni Shoua
     

15 Jan, 2014

1 commit

  • This patch add the support for Ethernet L2 attributes in the
    verbs/cm/cma structures.

    When dealing with L2 Ethernet, we should use smac, dmac, vlan ID and priority
    in a similar manner that the IB L2 (and the L4 PKEY) attributes are used.

    Thus, those attributes were added to the following structures:

    * ib_ah_attr - added dmac
    * ib_qp_attr - added smac and vlan_id, (sl remains vlan priority)
    * ib_wc - added smac, vlan_id
    * ib_sa_path_rec - added smac, dmac, vlan_id
    * cm_av - added smac and vlan_id

    For the path record structure, extra care was taken to avoid the new
    fields when packing it into wire format, so we don't break the IB CM
    and SA wire protocol.

    On the active side, the CM fills. its internal structures from the
    path provided by the ULP. We add there taking the ETH L2 attributes
    and placing them into the CM Address Handle (struct cm_av).

    On the passive side, the CM fills its internal structures from the WC
    associated with the REQ message. We add there taking the ETH L2
    attributes from the WC.

    When the HW driver provides the required ETH L2 attributes in the WC,
    they set the IB_WC_WITH_SMAC and IB_WC_WITH_VLAN flags. The IB core
    code checks for the presence of these flags, and in their absence does
    address resolution from the ib_init_ah_from_wc() helper function.

    ib_modify_qp_is_ok is also updated to consider the link layer. Some
    parameters are mandatory for Ethernet link layer, while they are
    irrelevant for IB. Vendor drivers are modified to support the new
    function signature.

    Signed-off-by: Matan Barak
    Signed-off-by: Or Gerlitz
    Signed-off-by: Roland Dreier

    Matan Barak
     

21 Jun, 2013

1 commit

  • Add support for AF_IB to ip_addr_size, and rename the function to
    account for the change. Give the compiler more control over whether
    the call should be inline or not by moving the definition into the .c
    file, removing the static inline, and exporting it.

    Signed-off-by: Sean Hefty
    Signed-off-by: Roland Dreier

    Sean Hefty
     

05 Jan, 2012

1 commit


16 Sep, 2011

1 commit

  • This patch does several things:
    - introduces __ethtool_get_settings which is called from ethtool code and
    from drivers as well. Put ASSERT_RTNL there.
    - dev_ethtool_get_settings() is replaced by __ethtool_get_settings()
    - changes calling in drivers so rtnl locking is respected. In
    iboe_get_rate was previously ->get_settings() called unlocked. This
    fixes it. Also prb_calc_retire_blk_tmo() in af_packet.c had the same
    problem. Also fixed by calling __dev_get_by_index() instead of
    dev_get_by_index() and holding rtnl_lock for both calls.
    - introduces rtnl_lock in bnx2fc_vport_create() and fcoe_vport_create()
    so bnx2fc_if_create() and fcoe_if_create() are called locked as they
    are from other places.
    - use __ethtool_get_settings() in bonding code

    Signed-off-by: Jiri Pirko

    v2->v3:
    -removed dev_ethtool_get_settings()
    -added ASSERT_RTNL into __ethtool_get_settings()
    -prb_calc_retire_blk_tmo - use __dev_get_by_index() and lock
    around it and __ethtool_get_settings() call
    v1->v2:
    add missing export_symbol
    Reviewed-by: Ben Hutchings [except FCoE bits]
    Acked-by: Ralf Baechle
    Signed-off-by: David S. Miller

    Jiri Pirko
     

30 Apr, 2011

1 commit

  • This makes sure that when a driver calls the ethtool's
    get/set_settings() callback of another driver, the data passed to it
    is clean. This guarantees that speed_hi will be zeroed correctly if
    the called callback doesn't explicitely set it: we are sure we don't
    get a corrupted speed from the underlying driver. We also take care of
    setting the cmd field appropriately (ETHTOOL_GSET/SSET).

    This applies to dev_ethtool_get_settings(), which now makes sure it
    sets up that ethtool command parameter correctly before passing it to
    drivers. This also means that whoever calls dev_ethtool_get_settings()
    does not have to clean the ethtool command parameter. This function
    also becomes an exported symbol instead of an inline.

    All drivers visible to make allyesconfig under x86_64 have been
    updated.

    Signed-off-by: David Decotigny
    Signed-off-by: David S. Miller

    David Decotigny
     

26 Oct, 2010

1 commit

  • Add 802.1q VLAN support to IBoE. The VLAN tag is encoded within the
    GID derived from a link local address in the following way:

    GID[11] GID[12] contain the VLAN ID when the GID contains a VLAN.

    The 3 bits user priority field of the packets are identical to the 3
    bits of the SL.

    In case of rdma_cm apps, the TOS field is used to generate the SL
    field by doing a shift right of 5 bits effectively taking to 3 MS bits
    of the TOS field.

    Signed-off-by: Eli Cohen
    Signed-off-by: Roland Dreier

    Eli Cohen
     

14 Oct, 2010

1 commit

  • Add support for IBoE device binding and IP --> GID resolution. Path
    resolving and multicast joining are implemented within cma.c by
    filling in the responses and running callbacks in the CMA work queue.

    IP --> GID resolution always yields IPv6 link local addresses; remote
    GIDs are derived from the destination MAC address of the remote port.
    Multicast GIDs are always mapped to multicast MACs as is done in IPv6.
    (IPv4 multicast is enabled by translating IPv4 multicast addresses to
    IPv6 multicast as described in
    .)

    Some helper functions are added to ib_addr.h.

    Signed-off-by: Eli Cohen
    Signed-off-by: Roland Dreier

    Eli Cohen
     

20 Nov, 2009

3 commits

  • The RDMA CM is intended to support the use of a loopback address
    when establishing a connection; however, the behavior of the CM
    when loopback addresses are used is confusing and does not always
    work, depending on whether loopback was specified by the server,
    the client, or both.

    The defined behavior of rdma_bind_addr is to associate an RDMA
    device with an rdma_cm_id, as long as the user specified a non-
    zero address. (ie they weren't just trying to reserve a port)
    Currently, if the loopback address is passed to rdam_bind_addr,
    no device is associated with the rdma_cm_id. Fix this.

    If a loopback address is specified by the client as the destination
    address for a connection, it will fail to establish a connection.
    This is true even if the server is listing across all addresses or
    on the loopback address itself. The issue is that the server tries
    to translate the IP address carried in the REQ message to a local
    net_device address, which fails. The translation is not needed in
    this case, since the REQ carries the actual HW address that should
    be used.

    Finally, cleanup loopback support to be more transport neutral.
    Replace separate calls to get/set the sgid and dgid from the
    device address to a single call that behaves correctly depending
    on the format of the device address. And support both IPv4 and
    IPv6 address formats.

    Signed-off-by: Sean Hefty

    [ Fixed RDS build by s/ib_addr_get/rdma_addr_get/ - Roland ]

    Signed-off-by: Roland Dreier

    Sean Hefty
     
  • The struct rdma_dev_addr stores net_device address information:
    the source device address, destination hardware address, and
    broadcast address. For consistency, store the net_device type
    rather than converting it to the rdma_node_type.

    The type indicates the format of the various hardware addresses,
    which is what we're concerned with, and not the RDMA node type
    that the address may map to.

    Signed-off-by: Sean Hefty
    Signed-off-by: Roland Dreier

    Sean Hefty
     
  • Provide the device interface when resolving route information to
    ensure that the correct outbound device is used. This will also
    simplify processing of sin6_scope_id for IPv6 support.

    Based on work from:
    David Wilder
    Jason Gunthorpe

    Signed-off-by: Sean Hefty
    Signed-off-by: Roland Dreier

    Sean Hefty
     

15 Jul, 2008

2 commits

  • Keep a pointer to the local (src) netdevice in struct rdma_dev_addr,
    and copy it in as part of rdma_copy_addr(). Use rdma_translate_ip()
    in cma_new_conn_id() to reduce some code duplication and also make
    sure the src_dev member gets set.

    In a high-availability configuration the netdevice pointer can be used
    by the RDMA CM to align RDMA sessions to use the same links as the IP
    stack does under fail-over and route change cases.

    Signed-off-by: Or Gerlitz
    Signed-off-by: Roland Dreier

    Or Gerlitz
     
  • The license text for several files references a third software license
    that was inadvertently copied in. Update the license to what was
    intended. This update was based on a request from HP.

    Signed-off-by: Sean Hefty
    Signed-off-by: Roland Dreier

    Sean Hefty
     

17 Feb, 2007

1 commit

  • The IB SA tracks multicast join/leave requests on a per port basis and
    does not do any reference counting: if two users of the same port join
    the same group, and one leaves that group, then the SA will remove the
    port from the group even though there is one user who wants to stay a
    member left. Therefore, in order to support multiple users of the
    same multicast group from the same port, we need to perform reference
    counting locally.

    To do this, add an multicast submodule to ib_sa to perform reference
    counting of multicast join/leave operations. Modify ib_ipoib (the
    only in-kernel user of multicast) to use the new interface.

    Signed-off-by: Roland Dreier

    Sean Hefty
     

03 Nov, 2006

1 commit


23 Sep, 2006

1 commit

  • Modifications to the existing rdma header files, core files, drivers,
    and ulp files to support iWARP, including:
    - Hook iWARP CM into the build system and use it in rdma_cm.
    - Convert enum ib_node_type to enum rdma_node_type, which includes
    the possibility of RDMA_NODE_RNIC, and update everything for this.

    Signed-off-by: Tom Tucker
    Signed-off-by: Steve Wise
    Signed-off-by: Roland Dreier

    Tom Tucker
     

15 Jul, 2006

1 commit

  • The device address contains unsigned character arrays, which contain raw GID
    addresses. The GIDs may not be naturally aligned, so do not cast them to
    structures or unions.

    Signed-off-by: Sean Hefty
    Signed-off-by: Michael S. Tsirkin
    Cc: Roland Dreier
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Michael S. Tsirkin
     

18 Jun, 2006

1 commit