net/iavf: revert fix VLAN insertion
PATCH 1/1 net/iavf: revert fix VLAN insertion
The patch to be reverted forces to select normal Tx path when kernel driver tells that L2TAG2 is required, it results in a lot of performance loss.
We should support Tx context descriptor on vector path to handle the L2TAG2 case.
This commit reverts
commit 0d58caa7d6d1 ("net/iavf: fix VLAN insertion")
--- drivers/net/iavf/iavf_rxtx_vec_common.h | 3 --- 1 file changed, 3 deletions(-)
drivers/net/iavf/iavf_rxtx_vec_common.h +0 -3
@@ -253,9 +253,6 @@ iavf_tx_vec_queue_default(struct iavf_tx_queue *txq)if (txq->offloads &IAVF_TX_NO_VECTOR_FLAGS )return -1 ; -if (txq->vlan_flag ==IAVF_TX_FLAGS_VLAN_TAG_LOC_L2TAG2 ) -return -1 ; -if (txq->offloads &IAVF_TX_VECTOR_OFFLOAD )return IAVF_VECTOR_OFFLOAD_PATH ;
Signature · 1 line
2.34.1
Quoted 6 lines · Yiding Zhou
The patch to be reverted forces to select normal Tx path when kernel driver tells that L2TAG2 is required, it results in a lot of performance loss.
We should support Tx context descriptor on vector path to handle the L2TAG2 case.
Hi. Was the original fix in 0d58caa7d6d1 not needed? or is it just being reverted because of performance issues and the original functional issue still remains? It is not very clear in the commit message. It would be good to write what the status of the original issue with this patch applied is in the commit message.
Quoted 3 lines
This commit reverts
commit0d58caa7d6d1("net/iavf: fix VLAN insertion")
Better to add DPDK style tags here, so they can be picked up by scripts, thanks. i.e.
Quoted 19 lines
Signed-off-by Yiding Zhou <[email protected]>--- drivers/net/iavf/iavf_rxtx_vec_common.h | 3 --- 1 file changed, 3 deletions(-)drivers/net/iavf/iavf_rxtx_vec_common.h +0
-3@@ -253,9 +253,6 @@ iavf_tx_vec_queue_default(struct iavf_tx_queue *txq)if (txq->offloads &IAVF_TX_NO_VECTOR_FLAGS )return -1 ; -if (txq->vlan_flag ==IAVF_TX_FLAGS_VLAN_TAG_LOC_L2TAG2 ) -return -1 ; -if (txq->offloads &IAVF_TX_VECTOR_OFFLOAD )return IAVF_VECTOR_OFFLOAD_PATH ;
PATCH v2 1/1 net/iavf: revert fix VLAN insertion
In reply to Yiding ZhouWhen the kernel driver tells to use the L2TAG2 field for VLAN insertion, the context descriptor needs to be used. There is an issue on the vector Tx path, because it does not support the context descriptor.
The previous commit forces to select normal path to avoid the above issue, but it results in a performance loss of around 40%. So it needs to be reverted and the original issue needed to be fixed by rework.
To reverts
commit 0d58caa7d6d1 ("net/iavf: fix VLAN insertion")
--- drivers/net/iavf/iavf_rxtx_vec_common.h | 3 --- 1 file changed, 3 deletions(-)
drivers/net/iavf/iavf_rxtx_vec_common.h +0 -3
@@ -253,9 +253,6 @@ iavf_tx_vec_queue_default(struct iavf_tx_queue *txq)if (txq->offloads &IAVF_TX_NO_VECTOR_FLAGS )return -1 ; -if (txq->vlan_flag ==IAVF_TX_FLAGS_VLAN_TAG_LOC_L2TAG2 ) -return -1 ; -if (txq->offloads &IAVF_TX_VECTOR_OFFLOAD )return IAVF_VECTOR_OFFLOAD_PATH ;
Signature · 1 line
2.34.1
Quoted 8 lines · Yiding Zhou
When the kernel driver tells to use the L2TAG2 field for VLAN insertion, the context descriptor needs to be used. There is an issue on the vector Tx path, because it does not support the context descriptor.
The previous commit forces to select normal path to avoid the above issue, but it results in a performance loss of around 40%. So it needs to be reverted and the original issue needed to be fixed by rework.
Thank you, that is a much clearer explanation.
Now on the approach, the commit being reverted says:
"When the driver tells the VF to insert VLAN tag using the L2TAG2 field,
vector Tx path does not use Tx context descriptor and would cause VLAN tag inserted into the wrong location."
So it means this revert is solving a performance regression, but re-introducing the functional issue above.
Is there a correct fix for the original issue sent that can be applied too? If not, wouldn't it be better to wait until it is before doing the revert?
Quoted 24 lines
To reverts
commit0d58caa7d6d1("net/iavf: fix VLAN insertion")Fixes 0d58caa7d6d1 ("net/iavf: fix VLAN insertion")Signed-off-by Yiding Zhou <[email protected]>--- drivers/net/iavf/iavf_rxtx_vec_common.h | 3 --- 1 file changed, 3 deletions(-)drivers/net/iavf/iavf_rxtx_vec_common.h +0
-3@@ -253,9 +253,6 @@ iavf_tx_vec_queue_default(struct iavf_tx_queue *txq)if (txq->offloads &IAVF_TX_NO_VECTOR_FLAGS )return -1 ; -if (txq->vlan_flag ==IAVF_TX_FLAGS_VLAN_TAG_LOC_L2TAG2 ) -return -1 ; -if (txq->offloads &IAVF_TX_VECTOR_OFFLOAD )return IAVF_VECTOR_OFFLOAD_PATH ;
Quoted 25 lines
-----Original Message-----
From: Kevin Traynor <[email protected]>
Sent: Wednesday, October 19, 2022 4:53 PM
To: Zhou, YidingX <[email protected]>; [email protected]
Subject: Re: [PATCH v2] net/iavf: revert fix VLAN insertionQuoted 8 lines · Yiding Zhou
When the kernel driver tells to use the L2TAG2 field for VLAN insertion, the context descriptor needs to be used. There is an issue on the vector Tx path, because it does not support the context descriptor.
The previous commit forces to select normal path to avoid the above issue, but it results in a performance loss of around 40%. So it needs to be reverted and the original issue needed to be fixed by rework.
Thank you, that is a much clearer explanation.
Now on the approach, the commit being reverted says:
"When the driver tells the VF to insert VLAN tag using the L2TAG2 field, vector Tx path does not use Tx context descriptor and would cause VLAN tag inserted into the wrong location."
Quoted 6 lines
So it means this revert is solving a performance regression, but re-introducing the functional issue above.
Is there a correct fix for the original issue sent that can be applied too? If not, wouldn't it be better to wait until it is before doing the revert?
Sorry, there is no correct fix yet.
We plan to support context descriptor on vector path to fix the original issue, It may take more time and cannot be completed within this cycle.
Quoted 25 lines
Quoted 25 lines
To reverts
commit0d58caa7d6d1("net/iavf: fix VLAN insertion")Fixes 0d58caa7d6d1 ("net/iavf: fix VLAN insertion")Signed-off-by Yiding Zhou <[email protected]>--- drivers/net/iavf/iavf_rxtx_vec_common.h | 3 --- 1 file changed, 3 deletions(-)drivers/net/iavf/iavf_rxtx_vec_common.h +0
-3@@ -253,9 +253,6 @@ iavf_tx_vec_queue_default(struct iavf_tx_queue *txq)if (txq->offloads &IAVF_TX_NO_VECTOR_FLAGS )return -1 ; -if (txq->vlan_flag ==IAVF_TX_FLAGS_VLAN_TAG_LOC_L2TAG2 ) -return -1 ; -if (txq->offloads &IAVF_TX_VECTOR_OFFLOAD )return IAVF_VECTOR_OFFLOAD_PATH ;
Quoted 28 lines · YidingX
Quoted 28 lines
-----Original Message-----
From: Kevin Traynor <[email protected]>
Sent: Wednesday, October 19, 2022 4:53 PM
To: Zhou, YidingX <[email protected]>; [email protected]
Subject: Re: [PATCH v2] net/iavf: revert fix VLAN insertionQuoted 8 lines · Yiding Zhou
When the kernel driver tells to use the L2TAG2 field for VLAN insertion, the context descriptor needs to be used. There is an issue on the vector Tx path, because it does not support the context descriptor.
The previous commit forces to select normal path to avoid the above issue, but it results in a performance loss of around 40%. So it needs to be reverted and the original issue needed to be fixed by rework.
Thank you, that is a much clearer explanation.
Now on the approach, the commit being reverted says:
"When the driver tells the VF to insert VLAN tag using the L2TAG2 field, vector Tx path does not use Tx context descriptor and would cause VLAN tag inserted into the wrong location."So it means this revert is solving a performance regression, but re-introducing the functional issue above.
Quoted 8 lines
Quoted 3 lines
Is there a correct fix for the original issue sent that can be applied too? If not, wouldn't it be better to wait until it is before doing the revert?
Sorry, there is no correct fix yet.
We plan to support context descriptor on vector path to fix the original issue, It may take more time and cannot be completed within this cycle.
ok, but you didn't answer the second question.
"When the driver tells the VF to insert VLAN tag using the L2TAG2 field, vector Tx path does not use Tx context descriptor and would cause VLAN tag inserted into the wrong location."
Please explain your justification for (re-)introducing this bug?
Why is better to get (corrupt?) packets with incorrect VLAN tags than lose performance for this case? Or have I mis-interpreted the patches.
Quoted 26 lines
Quoted 25 lines
Quoted 25 lines
To reverts
commit0d58caa7d6d1("net/iavf: fix VLAN insertion")Fixes 0d58caa7d6d1 ("net/iavf: fix VLAN insertion")Signed-off-by Yiding Zhou <[email protected]>--- drivers/net/iavf/iavf_rxtx_vec_common.h | 3 --- 1 file changed, 3 deletions(-)drivers/net/iavf/iavf_rxtx_vec_common.h +0
-3@@ -253,9 +253,6 @@ iavf_tx_vec_queue_default(struct iavf_tx_queue *txq)if (txq->offloads &IAVF_TX_NO_VECTOR_FLAGS )return -1 ; -if (txq->vlan_flag ==IAVF_TX_FLAGS_VLAN_TAG_LOC_L2TAG2 ) -return -1 ; -if (txq->offloads &IAVF_TX_VECTOR_OFFLOAD )return IAVF_VECTOR_OFFLOAD_PATH ;
Quoted 42 lines
Quoted 8 lines
Quoted 8 lines
-----Original Message-----
From: Kevin Traynor <[email protected]>
Sent: Wednesday, October 19, 2022 4:53 PM
To: Zhou, YidingX <[email protected]>; [email protected]
Subject: Re: [PATCH v2] net/iavf: revert fix VLAN insertionQuoted 4 lines
Quoted 4 lines · Yiding Zhou
Quoted 3 lines
When the kernel driver tells to use the L2TAG2 field for VLAN insertion, the context descriptor needs to be used. There is an issue on the vector Tx path, because it does not support the context
descriptor.
Quoted 13 lines
Quoted 13 lines
Quoted 5 lines
The previous commit forces to select normal path to avoid the above issue, but it results in a performance loss of around 40%. So it needs to be reverted and the original issue needed to be fixed by rework.
Thank you, that is a much clearer explanation.
Now on the approach, the commit being reverted says:
"When the driver tells the VF to insert VLAN tag using the L2TAG2 field, vector Tx path does not use Tx context descriptor and would cause VLAN tag inserted into the wrong location."Quoted 5 lines
Quoted 5 lines
So it means this revert is solving a performance regression, but re-introducing the functional issue above.
Is there a correct fix for the original issue sent that can be applied too? If not, wouldn't it be better to wait until it is before doing the
revert?
Quoted 5 lines
Quoted 1 line
Sorry, there is no correct fix yet.
We plan to support context descriptor on vector path to fix the original issue, It may take more time and cannot be completed within thiscycle.
Quoted 1 line
ok, but you didn't answer the second question.
Quoted 10 lines
"When the driver tells the VF to insert VLAN tag using the L2TAG2 field, vector Tx path does not use Tx context descriptor and would cause VLAN tag inserted into the wrong location."
Please explain your justification for (re-)introducing this bug?
Why is better to get (corrupt?) packets with incorrect VLAN tags than lose performance for this case? Or have I mis-interpreted the patches.
Thanks for your review.
I agree with you. It should not re-introduce functional issue . This revert is not needed. I will resubmit a new patch for the performance loss.
Quoted 27 lines
Quoted 10 lines
Quoted 10 lines
Quoted 10 lines
To reverts
commit0d58caa7d6d1("net/iavf: fix VLAN insertion")Fixes 0d58caa7d6d1 ("net/iavf: fix VLAN insertion")Signed-off-by Yiding Zhou <[email protected]>--- drivers/net/iavf/iavf_rxtx_vec_common.h | 3 --- 1 file changed, 3 deletions(-)Quoted 6 lines
Quoted 6 lines
drivers/net/iavf/iavf_rxtx_vec_common.h iavf_tx_vec_queue_default(struct iavf_tx_queue
Quoted 6 lines
drivers/net/iavf/iavf_rxtx_vec_common.h +0
-0@@ -253,9 +253,6 @@ iavf_tx_vec_queue_default(struct iavf_tx_queue*txq)
Quoted 10 lines
Quoted 9 lines
Quoted 9 lines
drivers/net/iavf/iavf_rxtx_vec_common.h +0
-3if (txq->offloads &IAVF_TX_NO_VECTOR_FLAGS )return -1 ; -if (txq->vlan_flag ==IAVF_TX_FLAGS_VLAN_TAG_LOC_L2TAG2 ) -return -1 ; -if (txq->offloads &IAVF_TX_VECTOR_OFFLOAD )return IAVF_VECTOR_OFFLOAD_PATH ;
A message that is not in the archive (sent off-list or not yet received): CY4PR1101MB21039FCA7958A8B49BF5521885389@CY4PR1101MB2103.namprd11.prod.outlook.com
A message that is not in the archive (sent off-list or not yet received): [email protected]
re-adding dev mailing list
Quoted 133 lines · Kevin Traynor
Quoted 8 lines · YidingX
Hi, Kevin
According to suggestion, we did many deep investigation and various attempts, unfortunately that the performance drop(about 40%) caused by the previous commit:
0d58caa7d6d1("net/iavf: fix VLAN insertion")
Still can not be resolved in this cycle due to tight schedule.Because the performance drop is too serious and the scope of impact is relatively large, we think the previous commit is a mistake.
ok, I'm trying to understand why a performance drop is worse than some corrupt packets.
What is the scope of the performance drop? Does the scope impact more cases than just when the L2TAG2 is used?
IOW, is it a functional issue in a small use case, and performance issue in more use cases? If so, I can understand you wanting to revert.
Quoted 2 lines
For the original bug, we plan to fix it in the next cycle (by supporting L2TAG2 on the vector path).
With the revert, is there a way to disable use of L2TAG2 being used while it is incorrect? At very least, the issue should be documented/bugzilla so a user can know what doesn't work correctly.
Quoted 1 line
So we are expecting to revert the above commit from main branch and it should not be merged to stable branch.
It has already been merged but if the decision for main branch is to revert, then I can revert on stable also.
thanks,
Kevin.Quoted 98 lines
Sorry I'm a little late in explaining the situation. Your understanding would be appreciated.
/Yiding
Quoted 93 lines
-----Original Message-----
From: Zhou, YidingX
Sent: Friday, October 21, 2022 10:43 AM
To: Kevin Traynor <[email protected]>; [email protected]
Subject: RE: [PATCH v2] net/iavf: revert fix VLAN insertionQuoted 6 lines
Quoted 6 lines
Quoted 6 lines
-----Original Message-----
From: Kevin Traynor <[email protected]>
Sent: Wednesday, October 19, 2022 4:53 PM
To: Zhou, YidingX <[email protected]>; [email protected]
Subject: Re: [PATCH v2] net/iavf: revert fix VLAN insertionQuoted 10 lines
Quoted 5 lines
Quoted 5 lines · Yiding Zhou
Quoted 4 lines
When the kernel driver tells to use the L2TAG2 field for VLAN insertion, the context descriptor needs to be used. There is an issue on the vector Tx path, because it does not support the context
descriptor.
Quoted 4 lines
Quoted 4 lines
Quoted 4 lines
The previous commit forces to select normal path to avoid the above issue, but it results in a performance loss of around 40%. So it needs to be reverted and the original issue needed to be fixed by
rework.
Quoted 27 lines
Quoted 9 lines
Quoted 9 lines
Quoted 1 line
Thank you, that is a much clearer explanation.
Now on the approach, the commit being reverted says:
"When the driver tells the VF to insert VLAN tag using the L2TAG2 field, vector Tx path does not use Tx context descriptor and would cause VLAN tag inserted into the wrong location."Quoted 6 lines
Quoted 6 lines
So it means this revert is solving a performance regression, but re-introducing the functional issue above.
Is there a correct fix for the original issue sent that can be applied too? If not, wouldn't it be better to wait until it is before doing the
revert?
Quoted 6 lines
Quoted 1 line
Sorry, there is no correct fix yet.
We plan to support context descriptor on vector path to fix the original issue, It may take more time and cannot be completed within thiscycle.
Quoted 1 line
ok, but you didn't answer the second question.
Quoted 10 lines
"When the driver tells the VF to insert VLAN tag using the L2TAG2 field, vector Tx path does not use Tx context descriptor and would cause VLAN tag inserted into the wrong location."
Please explain your justification for (re-)introducing this bug?
Why is better to get (corrupt?) packets with incorrect VLAN tags than lose performance for this case? Or have I mis-interpreted the patches.
Thanks for your review.
I agree with you. It should not re-introduce functional issue . This revert is not needed. I will resubmit a new patch for the performance loss.Quoted 27 lines
Quoted 10 lines
Quoted 10 lines
Quoted 10 lines
To reverts
commit0d58caa7d6d1("net/iavf: fix VLAN insertion")Fixes 0d58caa7d6d1 ("net/iavf: fix VLAN insertion")Signed-off-by Yiding Zhou <[email protected]>--- drivers/net/iavf/iavf_rxtx_vec_common.h | 3 --- 1 file changed, 3 deletions(-)Quoted 6 lines
Quoted 6 lines
drivers/net/iavf/iavf_rxtx_vec_common.h iavf_tx_vec_queue_default(struct iavf_tx_queue
Quoted 6 lines
drivers/net/iavf/iavf_rxtx_vec_common.h +0
-0@@ -253,9 +253,6 @@ iavf_tx_vec_queue_default(struct iavf_tx_queue*txq)
Quoted 10 lines
Quoted 9 lines
Quoted 9 lines
drivers/net/iavf/iavf_rxtx_vec_common.h +0
-3if (txq->offloads &IAVF_TX_NO_VECTOR_FLAGS )return -1 ; -if (txq->vlan_flag ==IAVF_TX_FLAGS_VLAN_TAG_LOC_L2TAG2 ) -return -1 ; -if (txq->offloads &IAVF_TX_VECTOR_OFFLOAD )return IAVF_VECTOR_OFFLOAD_PATH ;
A message that is not in the archive (sent off-list or not yet received): MWHPR11MB18863EA1EEE5DA7452AF7899E5389@MWHPR11MB1886.namprd11.prod.outlook.com
Quoted 28 lines · Qiming
Hi, Kevin
Quoted 26 lines
-----Original Message-----
From: Kevin Traynor <[email protected]>
Sent: Thursday, November 3, 2022 6:52 PM
To: Zhou, YidingX <[email protected]>
Cc: Yang, Qiming <[email protected]>; Zhang, Qi Z <[email protected]>
Subject: Re: [PATCH v2] net/iavf: revert fix VLAN insertionQuoted 4 lines · YidingX
Hi, Kevin
According to suggestion, we did many deep investigation and various attempts, unfortunately that the performance drop(about 40%) caused by
the previous commit:
Quoted 4 lines
0d58caa7d6d1("net/iavf: fix VLAN insertion") Still can not be resolved in this cycle due to tight schedule.Because the performance drop is too serious and the scope of impact is
relatively large, we think the previous commit is a mistake.
ok, I'm trying to understand why a performance drop is worse than some corrupt packets.
What is the scope of the performance drop? Does the scope impact more cases than just when the L2TAG2 is used?
Quoted 8 lines
Quoted 3 lines
IOW, is it a functional issue in a small use case, and performance issue in more use cases? If so, I can understand you wanting to revert.
For the original issue, it is QinQ insert function can't work in vector path, because we don't support this function in vector path. And after revert the patch, user still can use QinQ insert by set the Tx function to normal path as a workaround. But with this unreasonable patch, all the case using vector mode will have 40% performance drop, the drop is too high to accept.
So I think we should revert it first and enable the QinQ insert in vector path in next release after well design and full performance test.
ok, thanks for the explanation. I will revert on 21.11 branch when it reverted on main.
Kevin.
Quoted 124 lines
Qiming
Quoted 121 lines
Quoted 1 line
For the original bug, we plan to fix it in the next cycle (by supporting
L2TAG2 on the vector path).
Quoted 1 line
With the revert, is there a way to disable use of L2TAG2 being used while it is incorrect? At very least, the issue should be documented/bugzilla so a user can know what doesn't work correctly.
Quoted 1 line
So we are expecting to revert the above commit from main branch and it
should not be merged to stable branch.
It has already been merged but if the decision for main branch is to revert, then I can revert on stable also.
thanks,
Kevin.Quoted 1 line
Sorry I'm a little late in explaining the situation. Your understanding would
be appreciated.
Quoted 64 lines
/Yiding
Quoted 61 lines
-----Original Message-----
From: Zhou, YidingX
Sent: Friday, October 21, 2022 10:43 AM
To: Kevin Traynor <[email protected]>; [email protected]
Subject: RE: [PATCH v2] net/iavf: revert fix VLAN insertionQuoted 6 lines
Quoted 6 lines
Quoted 6 lines
-----Original Message-----
From: Kevin Traynor <[email protected]>
Sent: Wednesday, October 19, 2022 4:53 PM
To: Zhou, YidingX <[email protected]>; [email protected]
Subject: Re: [PATCH v2] net/iavf: revert fix VLAN insertionQuoted 11 lines
Quoted 5 lines
Quoted 5 lines · Yiding Zhou
Quoted 4 lines
When the kernel driver tells to use the L2TAG2 field for VLAN insertion, the context descriptor needs to be used. There is an issue on the vector Tx path, because it does not support the context
descriptor.
Quoted 5 lines
Quoted 5 lines
Quoted 5 lines
The previous commit forces to select normal path to avoid the above issue, but it results in a performance loss of around 40%. So it needs to be reverted and the original issue needed to be fixed by
rework.
Quoted 35 lines
Quoted 9 lines
Quoted 9 lines
Quoted 1 line
Thank you, that is a much clearer explanation.
Now on the approach, the commit being reverted says:
"When the driver tells the VF to insert VLAN tag using the L2TAG2 field, vector Tx path does not use Tx context descriptor and would cause VLAN tag inserted into the wrong location."Quoted 6 lines
Quoted 6 lines
So it means this revert is solving a performance regression, but re-introducing the functional issue above.
Is there a correct fix for the original issue sent that can be applied too? If not, wouldn't it be better to wait until it is before doing the
revert?
Quoted 6 lines
Quoted 1 line
Sorry, there is no correct fix yet.
We plan to support context descriptor on vector path to fix the original issue, It may take more time and cannot be completed within thiscycle.
Quoted 1 line
ok, but you didn't answer the second question.
"When the driver tells the VF to insert VLAN tag using the L2TAG2 field, vector Tx path does not use Tx context descriptor and would cause VLAN tag inserted into the wrong location."
Please explain your justification for (re-)introducing this bug?
Why is better to get (corrupt?) packets with incorrect VLAN tags than lose performance for this case? Or have I mis-interpreted the
patches.
Quoted 5 lines
Quoted 5 lines
Quoted 2 lines
Thanks for your review.
I agree with you. It should not re-introduce functional issue . This revert is not needed. I will resubmit a new patch for the performanceloss.
Quoted 19 lines
Quoted 19 lines
Quoted 19 lines
Quoted 11 lines
Quoted 11 lines
Quoted 11 lines
To reverts
commit0d58caa7d6d1("net/iavf: fix VLAN insertion")Fixes 0d58caa7d6d1 ("net/iavf: fix VLAN insertion")Signed-off-by Yiding Zhou <[email protected]>--- drivers/net/iavf/iavf_rxtx_vec_common.h | 3 --- 1 file changed, 3 deletions(-)Quoted 7 lines
Quoted 7 lines
Quoted 7 lines
drivers/net/iavf/iavf_rxtx_vec_common.h +0
-0@@ -253,9 +253,6 @@ iavf_tx_vec_queue_default(struct
iavf_tx_queue*txq)
Quoted 4 lines
Quoted 4 lines
Quoted 4 lines
Quoted 4 lines
Quoted 4 lines
drivers/net/iavf/iavf_rxtx_vec_common.h
Quoted 4 lines
if (txq->offloads & IAVF_TX_NO_VECTOR_FLAGS) return -1;drivers/net/iavf/iavf_rxtx_vec_common.h +0
-1- if (txq->vlan_flag ==
IAVF_TX_FLAGS_VLAN_TAG_LOC_L2TAG2)Quoted 7 lines
Quoted 6 lines
Quoted 6 lines
Quoted 6 lines
Quoted 5 lines
Quoted 5 lines
drivers/net/iavf/iavf_rxtx_vec_common.h +0
-2-return -1 ; -if (txq->offloads &IAVF_TX_VECTOR_OFFLOAD )return IAVF_VECTOR_OFFLOAD_PATH ;
PATCH v3 1/1 net/iavf: revert fix VLAN insertion
In reply to Yiding ZhouThe vector Tx path does not support VLAN insertion via the L2TAG2 field, but the scalar path supports. The previous commit was to force to select scalar path as soon as kernel driver requests to use L2TAG2.
That logic is incorrect. Because other case like VLAN offloading not required but scalar path selected would have a significant performance drop . Therefore the following commit needs to revert.
commit 0d58caa7d6d1 ("net/iavf: fix VLAN insertion")
After this commit reverted, the user can select scalar path with the parameter '--force-max-simd-bitwidth' if necessary.
---
v3: rebase and change commit log
--- drivers/net/iavf/iavf_rxtx_vec_common.h | 3 --- 1 file changed, 3 deletions(-)
drivers/net/iavf/iavf_rxtx_vec_common.h +0 -3
@@ -253,9 +253,6 @@ iavf_tx_vec_queue_default(struct iavf_tx_queue *txq)if (txq->offloads &IAVF_TX_NO_VECTOR_FLAGS )return -1 ; -if (txq->vlan_flag ==IAVF_TX_FLAGS_VLAN_TAG_LOC_L2TAG2 ) -return -1 ; -if (txq->offloads &IAVF_TX_VECTOR_OFFLOAD )return IAVF_VECTOR_OFFLOAD_PATH ;
Signature · 1 line
2.34.1
Hi
Quoted 47 lines
-----Original Message-----
From: Zhou, YidingX <[email protected]>
Sent: Friday, November 4, 2022 2:10 PM
To: [email protected]
Cc: [email protected]; Yang, Qiming <[email protected]>; Zhou, YidingX <[email protected]>
Subject: [PATCH v3] net/iavf: revert fix VLAN insertionThe vector Tx path does not support VLAN insertion via the L2TAG2 field, but the scalar path supports. The previous commit was to force to select scalar path as soon as kernel driver requests to use L2TAG2.
That logic is incorrect. Because other case like VLAN offloading not required but scalar path selected would have a significant performance drop . Therefore the following commit needs to revert.
commit
0d58caa7d6d1("net/iavf: fix VLAN insertion")After this commit reverted, the user can select scalar path with the parameter '--force-max-simd-bitwidth' if necessary.
Fixes 0d58caa7d6d1 ("net/iavf: fix VLAN insertion")Signed-off-by Yiding Zhou <[email protected]>---
v3: rebase and change commit log--- drivers/net/iavf/iavf_rxtx_vec_common.h | 3 --- 1 file changed, 3 deletions(-)drivers/net/iavf/iavf_rxtx_vec_common.h +0
-4@@ -253,9 +253,6 @@ iavf_tx_vec_queue_default(struct iavf_tx_queue *txq)if (txq->offloads &IAVF_TX_NO_VECTOR_FLAGS )return -1 ; -if (txq->vlan_flag ==IAVF_TX_FLAGS_VLAN_TAG_LOC_L2TAG2 ) -return -1 ; -if (txq->offloads &IAVF_TX_VECTOR_OFFLOAD )return IAVF_VECTOR_OFFLOAD_PATH ; --2.34.1
Quoted 10 lines
-----Original Message-----
From: Yiding Zhou <[email protected]>
Sent: Friday, November 4, 2022 2:10 PM
To: [email protected]
Cc: [email protected]; Yang, Qiming <[email protected]>; Zhou, YidingX <[email protected]>
Subject: [PATCH v3] net/iavf: revert fix VLAN insertion
Quoted 3 lines
The vector Tx path does not support VLAN insertion via the L2TAG2 field, but the scalar path supports. The previous commit was to force to select scalar path as soon as kernel driver requests to use L2TAG2.
In which situation, that kernel driver will request to use L2TAG2?
Quoted 4 lines
That logic is incorrect. Because other case like VLAN offloading not required but scalar path selected would have a significant performance drop . Therefore the following commit needs to revert.
What will happen, if kernel driver request to use L2TAG2, but still vector path is selected?
Quoted 32 lines
commit
0d58caa7d6d1("net/iavf: fix VLAN insertion")After this commit reverted, the user can select scalar path with the parameter '--force-max-simd-bitwidth' if necessary.
Fixes 0d58caa7d6d1 ("net/iavf: fix VLAN insertion")Signed-off-by Yiding Zhou <[email protected]>---
v3: rebase and change commit log--- drivers/net/iavf/iavf_rxtx_vec_common.h | 3 --- 1 file changed, 3 deletions(-)drivers/net/iavf/iavf_rxtx_vec_common.h +0
-4@@ -253,9 +253,6 @@ iavf_tx_vec_queue_default(struct iavf_tx_queue *txq)if (txq->offloads &IAVF_TX_NO_VECTOR_FLAGS )return -1 ; -if (txq->vlan_flag ==IAVF_TX_FLAGS_VLAN_TAG_LOC_L2TAG2 ) -return -1 ; -if (txq->offloads &IAVF_TX_VECTOR_OFFLOAD )return IAVF_VECTOR_OFFLOAD_PATH ; --2.34.1
Quoted 7 lines
Quoted 5 lines
Subject: [PATCH v3] net/iavf: revert fix VLAN insertion
The vector Tx path does not support VLAN insertion via the L2TAG2 field, but the scalar path supports. The previous commit was to force to select scalar path as soon as kernel driver requests to use L2TAG2.
In which situation, that kernel driver will request to use L2TAG2?
According to my tests, this happens when the kernel driver version is newer than 1.8.9
Quoted 8 lines
Quoted 4 lines
That logic is incorrect. Because other case like VLAN offloading not required but scalar path selected would have a significant performance drop . Therefore the following commit needs to revert.
What will happen, if kernel driver request to use L2TAG2, but still vector path is selected?
The VLAN tag will be inserted to wrong location (inner of QinQ), and this behavior is inconsistent with PF (outer).
Quoted 32 lines
Quoted 32 lines
commit
0d58caa7d6d1("net/iavf: fix VLAN insertion")After this commit reverted, the user can select scalar path with the parameter '--force-max-simd-bitwidth' if necessary.
Fixes 0d58caa7d6d1 ("net/iavf: fix VLAN insertion")Signed-off-by Yiding Zhou <[email protected]>---
v3: rebase and change commit log--- drivers/net/iavf/iavf_rxtx_vec_common.h | 3 --- 1 file changed, 3 deletions(-)drivers/net/iavf/iavf_rxtx_vec_common.h +0
-4@@ -253,9 +253,6 @@ iavf_tx_vec_queue_default(struct iavf_tx_queue *txq)if (txq->offloads &IAVF_TX_NO_VECTOR_FLAGS )return -1 ; -if (txq->vlan_flag ==IAVF_TX_FLAGS_VLAN_TAG_LOC_L2TAG2 ) -return -1 ; -if (txq->offloads &IAVF_TX_VECTOR_OFFLOAD )return IAVF_VECTOR_OFFLOAD_PATH ; --2.34.1
Quoted 24 lines
-----Original Message-----
From: Zhou, YidingX <[email protected]>
Sent: Thursday, November 10, 2022 10:10 AM
To: Zhang, Qi Z <[email protected]>; [email protected]
Cc: [email protected]; Yang, Qiming <[email protected]>
Subject: RE: [PATCH v3] net/iavf: revert fix VLAN insertionQuoted 7 lines
Quoted 5 lines
Subject: [PATCH v3] net/iavf: revert fix VLAN insertion
The vector Tx path does not support VLAN insertion via the L2TAG2 field, but the scalar path supports. The previous commit was to force to select scalar path as soon as kernel driver requests to use L2TAG2.
In which situation, that kernel driver will request to use L2TAG2?
According to my tests, this happens when the kernel driver version is newer than 1.8.9
Quoted 3 lines
Quoted 3 lines
That logic is incorrect. Because other case like VLAN offloading not required but scalar path selected would have a significant performance
Quoted 8 lines
drop .
Quoted 5 lines
Quoted 1 line
Therefore the following commit needs to revert.
What will happen, if kernel driver request to use L2TAG2, but still vector path is selected?
The VLAN tag will be inserted to wrong location (inner of QinQ), and this behavior is inconsistent with PF (outer).
Ok, I assume we will have above limitation after applying this patch, right?
If that's true we'd better claim this in the commit log as well as document it as a knowing issue.
PATCH v4 1/1 net/iavf: revert fix VLAN insertion
In reply to Yiding ZhouThe vector Tx path does not support VLAN insertion via the L2TAG2 field, but the scalar path supports. The earlier commit was to force to select scalar path as soon as kernel driver requests to use L2TAG2. That logic is incorrect. Because other case like VLAN offloading not required but scalar path selected would have a significant performance drop.
Therefore the following commit was reverted accordingly.
commit 0d58caa7d6d1 ("net/iavf: fix VLAN insertion")
After reverting this commit, the AVX512 Tx path would insert the VLAN tag into the wrong location(inner of QinQ) when the kernel driver requested L2TAG2. This is inconsistent with the behavior of PF(outer of QinQ).
It is currently known that ice kernel drivers newer than 1.8.9 will request the use of L2TAG2. User can set parameter '--force-max-simd-bitwidth' to 64/128/256 to avoid this issue.
---
v4: document this issue as kown issue and add some commit log
v3: rebase and change commit log
--- doc/guides/rel_notes/known_issues.rst | 23 +++++++++++++++++++++++ drivers/net/iavf/iavf_rxtx_vec_common.h | 3 --- 2 files changed, 23 insertions(+), 3 deletions(-)
doc/guides/rel_notes/known_issues.rst +23 -0
@@ -906,3 +906,26 @@ Vhost multi-queue reconnection failed with QEMU version 4.2.0 to 5.1.0 **Driver/Module**: Virtual Device Poll Mode Driver (PMD). + +IAVF inserts VLAN tag incorrectly on AVX-512 Tx path +---------------------------------------------------------------------- + +**Description** + When the kernel driver requests the VF to use the L2TAG2 field of the Tx context + descriptor to insert the hardware offload VLAN tag, AVX-512 Tx path cannot handle + this case correctly due to its lack of support for the Tx context descriptor. + +**Implication** + The VLAN tag will be inserted to the wrong location(inner of QinQ) on AVX-512 Tx + path. That is inconsistent with the behavior of PF(outer of QinQ). The ice kernel + driver's version newer than 1.8.9 requests to use L2TAG2 and has this issue. + +**Resolution/Workaround**: + Set the parameter `--force-max-simd-bitwidth` as 64/128/256 to avoid selecting AVX-512 + Tx path + +**Affected Environment/Platform**: + ALL. + +**Driver/Module**: + Poll Mode Driver (PMD).
drivers/net/iavf/iavf_rxtx_vec_common.h +0 -3
@@ -253,9 +253,6 @@ iavf_tx_vec_queue_default(struct iavf_tx_queue *txq)if (txq->offloads &IAVF_TX_NO_VECTOR_FLAGS )return -1 ; -if (txq->vlan_flag ==IAVF_TX_FLAGS_VLAN_TAG_LOC_L2TAG2 ) -return -1 ; -if (txq->offloads &IAVF_TX_VECTOR_OFFLOAD )return IAVF_VECTOR_OFFLOAD_PATH ;
Signature · 1 line
2.34.1
PATCH v5 1/1 net/iavf: revert fix VLAN insertion
In reply to Yiding ZhouThe vector Tx path does not support VLAN insertion via the L2TAG2 field, but the scalar path supports. The earlier commit was to force to select scalar path as soon as kernel driver requests to use L2TAG2. That logic is incorrect. Because other case like VLAN offloading not required but scalar path selected would have a significant performance drop.
Therefore the following commit was reverted accordingly.
commit 0d58caa7d6d1 ("net/iavf: fix VLAN insertion")
After reverting this commit, the AVX512 Tx path would insert the VLAN tag into the wrong location(inner of QinQ) when the kernel driver requested L2TAG2. This is inconsistent with the behavior of PF(outer of QinQ).
It is currently known that ice kernel drivers newer than 1.8.9 will request the use of L2TAG2. User can set parameter '--force-max-simd-bitwidth' to 64/128/256 to avoid this issue.
---
v5: move the document
v4: document this issue as kown issue and add some commit log
v3: rebase and change commit log
--- doc/guides/nics/intel_vf.rst | 13 +++++++++++++ drivers/net/iavf/iavf_rxtx_vec_common.h | 3 --- 2 files changed, 13 insertions(+), 3 deletions(-)
doc/guides/nics/intel_vf.rst +13 -0
@@ -704,3 +704,16 @@ i40e: Vlan filtering of VF For i40e driver 2.17.15, configuring VLAN filters from the DPDK VF is unsupported. When applying VLAN filters on the VF it must first be configured from the corresponding PF. + +ice: VF inserts VLAN tag incorrectly on AVX-512 Tx path +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +When the kernel driver requests the VF to use the L2TAG2 field of the Tx context +descriptor to insert the hardware offload VLAN tag, AVX-512 Tx path cannot handle +this case correctly due to its lack of support for the Tx context descriptor. + +The VLAN tag will be inserted to the wrong location(inner of QinQ) on AVX-512 Tx +path. That is inconsistent with the behavior of PF(outer of QinQ). The ice kernel +driver's version newer than 1.8.9 requests to use L2TAG2 and has this issue. + +Set the parameter `--force-max-simd-bitwidth` as 64/128/256 to avoid selecting +AVX-512 Tx path.
drivers/net/iavf/iavf_rxtx_vec_common.h +0 -3
@@ -253,9 +253,6 @@ iavf_tx_vec_queue_default(struct iavf_tx_queue *txq)if (txq->offloads &IAVF_TX_NO_VECTOR_FLAGS )return -1 ; -if (txq->vlan_flag ==IAVF_TX_FLAGS_VLAN_TAG_LOC_L2TAG2 ) -return -1 ; -if (txq->offloads &IAVF_TX_VECTOR_OFFLOAD )return IAVF_VECTOR_OFFLOAD_PATH ;
Signature · 1 line
2.34.1
Quoted 24 lines
-----Original Message-----
From: Zhou, YidingX <[email protected]>
Sent: Monday, November 14, 2022 12:31 AM
To: [email protected]; Yang, Qiming <[email protected]>
Cc: Zhang, Qi Z <[email protected]>; [email protected]; Zhou, YidingX <[email protected]>; [email protected]
Subject: [PATCH v5] net/iavf: revert fix VLAN insertionThe vector Tx path does not support VLAN insertion via the L2TAG2 field, but the scalar path supports. The earlier commit was to force to select scalar path as soon as kernel driver requests to use L2TAG2. That logic is incorrect. Because other case like VLAN offloading not required but scalar path selected would have a significant performance drop.
Therefore the following commit was reverted accordingly.
commit
0d58caa7d6d1("net/iavf: fix VLAN insertion")After reverting this commit, the AVX512 Tx path would insert the VLAN tag into the wrong location(inner of QinQ) when the kernel driver requested L2TAG2. This is inconsistent with the behavior of PF(outer of QinQ).
Quoted 8 lines
It is currently known that ice kernel drivers newer than 1.8.9 will request the use of L2TAG2. User can set parameter '--force-max-simd-bitwidth' to 64/128/256 to avoid this issue.
Fixes 0d58caa7d6d1 ("net/iavf: fix VLAN insertion")Signed-off-by Yiding Zhou <[email protected]>
Applied to dpdk-next-net-intel.
Thanks
Qi