net/gve: fix bug in verify driver compatibility

Message ID 20230601031513.453016-1-rushilg@google.com (mailing list archive)
State Superseded, archived
Delegated to: Ferruh Yigit
Headers
Series net/gve: fix bug in verify driver compatibility |

Checks

Context Check Description
ci/checkpatch warning coding style issues
ci/loongarch-compilation success Compilation OK
ci/loongarch-unit-testing success Unit Testing PASS
ci/Intel-compilation success Compilation OK
ci/intel-Testing success Testing PASS
ci/iol-testing warning apply patch failure

Commit Message

Rushil Gupta June 1, 2023, 3:15 a.m. UTC
  gVNIC requires physical address to be passed in the adminq command.
This was initially rightly pointed by ferruh.yigit@.
Fixed by passing 'driver_info_mem->iova'.

Signed-off-by: Rushil Gupta <rushilg@google.com>
---
 drivers/net/gve/gve_ethdev.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)
  

Patch

diff --git a/drivers/net/gve/gve_ethdev.c b/drivers/net/gve/gve_ethdev.c
index 2c1e73d07a..1c5ce930a4 100644
--- a/drivers/net/gve/gve_ethdev.c
+++ b/drivers/net/gve/gve_ethdev.c
@@ -276,7 +276,8 @@  gve_verify_driver_compatibility(struct gve_priv *priv)
 			(char *)driver_info->os_version_str2);
 
 	err = gve_adminq_verify_driver_compatibility(priv,
-		sizeof(struct gve_driver_info), (dma_addr_t)driver_info);
+		sizeof(struct gve_driver_info),
+                (dma_addr_t)driver_info_mem->iova);
 	/* It's ok if the device doesn't support this */
 	if (err == -EOPNOTSUPP)
 		err = 0;