Thread (122 messages) 122 messages, 9 authors, 2021-11-08

Re: [dpdk-dev] [PATCH v3 02/10] vdpa/sfc: add support for device initialization

From: Xia, Chenbo <hidden>
Date: 2021-11-02 07:50:55

-----Original Message-----
From: Vijay Kumar Srivastava <redacted>
Sent: Tuesday, November 2, 2021 3:43 PM
To: Xia, Chenbo <redacted>; dev@dpdk.org
Cc: maxime.coquelin@redhat.com; andrew.rybchenko@oktetlabs.ru; Praveen Kumar
Jain [off-list ref]; Harpreet Singh Anand [off-list ref]
Subject: RE: [PATCH v3 02/10] vdpa/sfc: add support for device initialization

Hi Chenbo,
quoted
-----Original Message-----
From: Xia, Chenbo <redacted>
Sent: Monday, November 1, 2021 5:19 PM
To: Vijay Kumar Srivastava <redacted>; dev@dpdk.org
Cc: maxime.coquelin@redhat.com; andrew.rybchenko@oktetlabs.ru; Vijay
Kumar Srivastava [off-list ref]
Subject: RE: [PATCH v3 02/10] vdpa/sfc: add support for device initialization

Hi Vijay,
quoted
-----Original Message-----
From: Vijay Srivastava <redacted>
Sent: Friday, October 29, 2021 10:47 PM
To: dev@dpdk.org
Cc: maxime.coquelin@redhat.com; Xia, Chenbo <redacted>;
andrew.rybchenko@oktetlabs.ru; Vijay Kumar Srivastava
[off-list ref]
Subject: [PATCH v3 02/10] vdpa/sfc: add support for device
initialization

From: Vijay Kumar Srivastava <redacted>

Add HW initialization and vDPA device registration support.

Signed-off-by: Vijay Kumar Srivastava <redacted>
Acked-by: Andrew Rybchenko <redacted>
---
[SNIP]
quoted
quoted
+sfc_vdpa_hw_init(struct sfc_vdpa_adapter *sva) {
+	efx_bar_region_t mem_ebr;
+	efx_nic_t *enp;
+	int rc;
+
+	sfc_vdpa_log_init(sva, "entry");
+
+	sfc_vdpa_log_init(sva, "get family");
+	rc = sfc_efx_family(sva->pdev, &mem_ebr, &sva->family);
+	if (rc != 0)
+		goto fail_family;
+	sfc_vdpa_log_init(sva,
+			  "family is %u, membar is %u,"
+			  "function control window offset is %#" PRIx64,
+			  sva->family, mem_ebr.ebr_index,
mem_ebr.ebr_offset);

If ebr_idx is int, then %u -> %d. But if it's a bar index, its type should be
unsigned int and you should change the definition in sfc common code.
Yes. It’s BAR index.
Thanks for the catch. I agree that usage of 'unsigned int' looks better
for BAR index, however it should result in more changes in similar
places. Is it OK if we use %d here right now to be consistent with
current type and address the review note in a follow up patches
for common/sfc_efx, net/sfc and vdpa/sfc?
Sure. Ok for me.

/Chenbo
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help