Skip to contentSkip to conversation

net/vhost: fix compliant offloading flag

PATCH NAK [email protected] 3 participants 4 messages Jun 28, 2022 Network drivers

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 net/vhost: fix compliant offloading flag

From: Xuan Ding <[email protected]>

This patch fixes the check to set compliant offloading flag. Compliant offloading flag should be set when the 'legacy-ol-flags' is true.

Fixes 3a6ee8dafb21("net/vhost: enable compliant offloading mode")
---
 drivers/net/vhost/rte_eth_vhost.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/net/vhost/rte_eth_vhost.c +1 -1
index d75d256040..24049df58a 100644
@@ -1735,7 +1735,7 @@ rte_pmd_vhost_probe(struct rte_vdev_device *dev)
 			goto out_free;
 	}
 
-	if (legacy_ol_flags == 0)
+	if (legacy_ol_flags == 1)
 		flags |= RTE_VHOST_USER_NET_COMPLIANT_OL_FLAGS;
 
 	if (dev->device.numa_node == SOCKET_ID_ANY)
Signature · 1 line
2.17.1
#1 lore raw
Quoted 18 lines · On 6/28/22 11:42, [email protected] wrote:

From: Xuan Ding <[email protected]>

This patch fixes the check to set compliant offloading flag. Compliant offloading flag should be set when the 'legacy-ol-flags' is true.

Fixes 3a6ee8dafb21("net/vhost: enable compliant offloading mode")
---
  drivers/net/vhost/rte_eth_vhost.c | 2 +-
  1 file changed, 1 insertion(+), 1 deletion(-)
drivers/net/vhost/rte_eth_vhost.c +0 -0
index d75d256040..24049df58a 100644

drivers/net/vhost/rte_eth_vhost.c rte_pmd_vhost_probe(struct rte_vdev_device *dev) · line 1741

Quoted 8 lines
drivers/net/vhost/rte_eth_vhost.c +1 -1
@@ -1735,7 +1735,7 @@ rte_pmd_vhost_probe(struct rte_vdev_device *dev)
  			goto out_free;
  	}
 
-	if (legacy_ol_flags == 0)
+	if (legacy_ol_flags == 1)
  		flags |= RTE_VHOST_USER_NET_COMPLIANT_OL_FLAGS;
 
  	if (dev->device.numa_node == SOCKET_ID_ANY)

Nack, legacy OL flags is NOT compliant. So current implementation is good.

Regards,
Maxime

author
#2 lore raw
Quoted 35 lines

-----Original Message-----
From: Maxime Coquelin <[email protected]>
Sent: Tuesday, June 28, 2022 5:57 PM
To: Ding, Xuan <[email protected]>; Xia, Chenbo <[email protected]>
Cc: [email protected]; Ling, WeiX <[email protected]>
Subject: Re: [PATCH] net/vhost: fix compliant offloading flag

drivers/net/vhost/rte_eth_vhost.c rte_pmd_vhost_probe(struct rte_vdev_device

Quoted 19 lines · On 6/28/22 11:42, [email protected] wrote:

From: Xuan Ding <[email protected]>

This patch fixes the check to set compliant offloading flag. Compliant offloading flag should be set when the 'legacy-ol-flags' is true.

Fixes 3a6ee8dafb21("net/vhost: enable compliant offloading mode")
---
  drivers/net/vhost/rte_eth_vhost.c | 2 +-
  1 file changed, 1 insertion(+), 1 deletion(-)
drivers/net/vhost/rte_eth_vhost.c +0 -0
index d75d256040..24049df58a 100644
@@ -1735,7 +1735,7 @@ rte_pmd_vhost_probe(struct rte_vdev_device

*dev)

Quoted 3 lines
drivers/net/vhost/rte_eth_vhost.c +0 -0
  			goto out_free;
  	}
 
Quoted 7 lines

drivers/net/vhost/rte_eth_vhost.c rte_pmd_vhost_probe(struct rte_vdev_device *dev) · line 1741

Quoted 5 lines
drivers/net/vhost/rte_eth_vhost.c +1 -1
-	if (legacy_ol_flags == 0)
+	if (legacy_ol_flags == 1)
  		flags |= RTE_VHOST_USER_NET_COMPLIANT_OL_FLAGS;
 
  	if (dev->device.numa_node == SOCKET_ID_ANY)

Nack, legacy OL flags is NOT compliant. So current implementation is good.

Sorry, it's a wrong fix, the compliant mode is enabled by default.

Regards,
Xuan

Quoted 3 lines

Regards,
Maxime

Tested-by
#3 lore raw
Quoted 31 lines

-----Original Message-----
From: Ding, Xuan <[email protected]>
Sent: Tuesday, June 28, 2022 6:29 PM
To: Maxime Coquelin <[email protected]>; Xia, Chenbo <[email protected]>
Cc: [email protected]; Ling, WeiX <[email protected]>
Subject: RE: [PATCH] net/vhost: fix compliant offloading flag

Quoted 21 lines

-----Original Message-----
From: Maxime Coquelin <[email protected]>
Sent: Tuesday, June 28, 2022 5:57 PM
To: Ding, Xuan <[email protected]>; Xia, Chenbo <[email protected]>
Cc: [email protected]; Ling, WeiX <[email protected]>
Subject: Re: [PATCH] net/vhost: fix compliant offloading flag

Quoted 10 lines · On 6/28/22 11:42, [email protected] wrote:

From: Xuan Ding <[email protected]>

This patch fixes the check to set compliant offloading flag. Compliant offloading flag should be set when the 'legacy-ol-flags' is true.

Fixes 3a6ee8dafb21("net/vhost: enable compliant offloading mode")

---