All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH v8 for-next 0/3] IB/core: Obtaining subnet_prefix from cache in
@ 2021-07-12 12:26 Anand Khoje
  2021-07-12 12:26 ` [PATCH v8 for-next 1/3] IB/core: Updating cache for subnet_prefix in config_non_roce_gid_cache() Anand Khoje
                   ` (3 more replies)
  0 siblings, 4 replies; 5+ messages in thread
From: Anand Khoje @ 2021-07-12 12:26 UTC (permalink / raw)
  To: linux-rdma, linux-kernel; +Cc: dledford, jgg, haakon.bugge, leon

This v8 of patch series is used to read the port_attribute subnet_prefix
from a valid cache entry instead of having to call
device->ops.query_gid() for Infiniband link-layer devices in
__ib_query_port().

In the event of a cache update, the value for subnet_prefix gets read
using device->ops.query_gid() in config_non_roce_gid_cache().

It also re-orders the initialization of lock cache_lock of struct ib_device
such that the lock is initialized before its first use in __ib_query_port()
during device initialization.

Anand Khoje (3):
  IB/core: Updating cache for subnet_prefix in
    config_non_roce_gid_cache()
  IB/core: Shifting initialization of device->cache_lock
  IB/core: Read subnet_prefix in ib_query_port via cache.

 drivers/infiniband/core/cache.c  | 10 +++++-----
 drivers/infiniband/core/device.c | 10 ++++------
 2 files changed, 9 insertions(+), 11 deletions(-)

---
v1 -> v2:
    -   Split the v1 patch in 3 patches as per Leon's suggestion.

v2 -> v3:
    -   Added changes as per Mark Zhang's suggestion of clearing
        flags in git_table_cleanup_one().
v3 -> v4:
    -   Removed the enum ib_port_data_flags and 8 byte flags from
        struct ib_port_data, and the set_bit()/clear_bit() API
        used to update this flag as that was not necessary.
        Done to keep the code simple.
    -   Added code to read subnet_prefix from updated GID cache in the
        event of cache update. Prior to this change, ib_cache_update
        was reading the value for subnet_prefix via ib_query_port(),
        due to this patch, we ended up reading a stale cached value of
        subnet_prefix.
v4 -> v5:
    -   Removed the code to reset cache_is_initialised bit from cleanup
        as per Leon's suggestion.
    -   Removed ib_cache_is_initialised() function.

v5 -> v6:
    -   Added changes as per Jason's suggestion of updating subnet_prefix
        in config_non_roce_gid_cache() and removing the flag
        cache_is_initialized in __ib_query_port().

v6 -> v7:
    -   Reordering the initialization of cache_lock, as the previous
        version caused an access to uninitialized cache_lock.

v7 -> v8:
    -   Resending the v7 of the patch-set after rebasing on the new rc1.
        There has been no change in the patches between v7 and v8 as v7
        patches applied cleanly after rebasing to 5.14-rc1.
---

-- 
1.8.3.1


^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2021-07-16 14:08 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2021-07-12 12:26 [PATCH v8 for-next 0/3] IB/core: Obtaining subnet_prefix from cache in Anand Khoje
2021-07-12 12:26 ` [PATCH v8 for-next 1/3] IB/core: Updating cache for subnet_prefix in config_non_roce_gid_cache() Anand Khoje
2021-07-12 12:26 ` [PATCH v8 for-next 2/3] IB/core: Shifting initialization of device->cache_lock Anand Khoje
2021-07-12 12:26 ` [PATCH v8 for-next 3/3] IB/core: Read subnet_prefix in ib_query_port via cache Anand Khoje
2021-07-16 14:08 ` [PATCH v8 for-next 0/3] IB/core: Obtaining subnet_prefix from cache in Jason Gunthorpe

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.