On Tue, Jun 05, 2018 at 08:40:12AM +0300, Leon Romanovsky wrote: > >From Jason and Parav, > > Currently a GID entry can be deleted from the GID table while it is > in use by ULPs, CM modules, drivers, or user space applications. > It may even get replaced with new attributes and/or GID value which > may lead to undesired traffic in the network. The previous and new > GID entry might be in two different net namespace; this may lead > to send traffic to undesired namespace. > > GID entry reference count is based on standard kref structure. The > GID table entries are re-organized so they are written once before being > added to the table, and then never changed during the lifetime of the > entry. > > For IB port GID table entry location is decided by the HCA provider > driver. Which means that when GID table entries are in use by the > users of it, ib_cache_update() can overwrite the GID entry and > attributes for IB link layer. Therefore, when an entry is deleted/added > (RoCE) or replaced (IB) new memory is allocated to replace the old entry > and the old entry lives on via a kref until all users finally drop it. > > This series also introduces GID entry get, put and hold APIs. It > also uses them in ib_core and smc modules. Additionally it introduces > pointer returning variants of the query API, with the expectation that > all callers will be converted to use them and the copy returning > functions will be deleted. > > Thanks > > Jason Gunthorpe (2): > IB/core: Provide rdma_ versions of the gid cache API > IB/core: Make rdma_find_gid_by_filter support all protocols > > Parav Pandit (9): > IB/core: Do not set the gid type when reserving default entries > IB/core: Store default GID property per-table instead of per-entry > IB/core: Introduce GID entry reference counts > RDMA: Use GID from the ib_gid_attr during the add_gid() callback > IB/core: Introduce GID attribute get, put and hold APIs > IB/core: Replace ib_query_gid with rdma_get_gid_attr > net/smc: Replace ib_query_gid with rdma_get_gid_attr > IB: Replace ib_query_gid/ib_get_cached_gid with rdma_query_gid > IB/rxe: Use rdma GID API Applied to the interm for-next, thanks Jason -- To unsubscribe from this list: send the line "unsubscribe linux-rdma" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html