Re: [PATCH rdma-core 3/8] verbs: Introduce a new query GID entry API

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On 9/21/2020 7:49 PM, Jason Gunthorpe wrote:
On Mon, Sep 14, 2020 at 09:34:58AM +0300, Yishai Hadas wrote:
+static int query_sysfs_gid_ndev_ifindex(struct ibv_context *context,
+					uint8_t port_num, uint32_t gid_index,
+					uint32_t *ndev_ifindex)
+{
+	struct verbs_device *verbs_device = verbs_get_device(context->device);
+	char buff[IF_NAMESIZE] = {};
This init is not necessary

OK


diff --git a/libibverbs/verbs.c b/libibverbs/verbs.c
index 9507ffd..9427aba 100644
+++ b/libibverbs/verbs.c
@@ -240,6 +240,14 @@ LATEST_SYMVER_FUNC(ibv_query_gid, 1_1, "IBVERBS_1.1",
  	return 0;
  }
+int _ibv_query_gid_ex(struct ibv_context *context, uint32_t port_num,
+		      uint32_t gid_index, struct ibv_gid_entry *entry,
+		      uint32_t flags, size_t entry_size)
+{
+	return ibv_cmd_query_gid_entry(context, port_num, gid_index, entry,
+				       flags, entry_size);
+}
This extra function seems unncessary.

We've been creating C files for each object type, the gid stuff could
go in device.c

Jason

In two patches ahead we introduce some mask to optimize ibv_query_gid() and ibv_query_gid_type() once they fallback over sysfs, so we may need to differentiate between this external verb API to the internal command, but YES, all of this can be done under cmd_device.c, will be part of V1.

Thanks,
Yishai




[Index of Archives]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Photo]     [Yosemite News]     [Yosemite Photos]     [Linux Kernel]     [Linux SCSI]     [XFree86]

  Powered by Linux