app/testpmd: fix vlan offload of rxq
PATCH v4 1/2 app/testpmd: fix vlan offload of rxq
After setting vlan offload in testpmd, the result is not updated to rxq. Therefore, the queue needs to be reconfigured after executing the "vlan offload" related commands.
--- app/test-pmd/cmdline.c | 1 + 1 file changed, 1 insertion(+)
app/test-pmd/cmdline.c +1 -0
@@ -4133,6 +4133,7 @@ cmd_vlan_offload_parsed(void *parsed_result,else vlan_extend_set (port_id, on); +cmd_reconfig_device_queue (port_id,1 ,1 );return ; }
Signature · 1 line
2.34.1
PATCH v4 2/2 net/ice: fix vlan offload
The vlan tag and flag in Rx descriptor are not processed on vector path, then the upper application can't fetch the tci from mbuf.
This commit add handling of vlan RX offloading.
v3:
* Fix macros in ice_rxtx_vec_sse.c source file.
v4:
* Fix ice_rx_desc_to_olflags_v define in ice_rxtx_vec_sse.c source file.
--- drivers/net/ice/ice_rxtx_vec_avx2.c | 136 +++++++++++++++++----- drivers/net/ice/ice_rxtx_vec_avx512.c | 156 +++++++++++++++++++++----- drivers/net/ice/ice_rxtx_vec_sse.c | 132 ++++++++++++++++------ 3 files changed, 335 insertions(+), 89 deletions(-)
drivers/net/ice/ice_rxtx_vec_avx2.c +108 -28
@@ -238,6 +238,7 @@ _ice_recv_raw_pkts_vec_avx2(struct ice_rx_queue *rxq, struct rte_mbuf **rx_pkts,RTE_MBUF_F_RX_VLAN |RTE_MBUF_F_RX_VLAN_STRIPPED , RTE_MBUF_F_RX_RSS_HASH, 0); +RTE_SET_USED (avx_aligned);/* for 32B descriptors we don't use this */ uint16_t i, received;
@@ -474,7 +475,7 @@ _ice_recv_raw_pkts_vec_avx2(struct ice_rx_queue *rxq, struct rte_mbuf **rx_pkts,* will cause performance drop to get into this context. */ if (rxq->vsi->adapter->pf.dev_data->dev_conf.rxmode.offloads & -RTE_ETH_RX_OFFLOAD_RSS_HASH ) { + (RTE_ETH_RX_OFFLOAD_RSS_HASH |RTE_ETH_RX_OFFLOAD_VLAN )) {/* load bottom half of every 32B desc */ const __m128i raw_desc_bh7 = _mm_load_si128
@@ -529,33 +530,112 @@ _ice_recv_raw_pkts_vec_avx2(struct ice_rx_queue *rxq, struct rte_mbuf **rx_pkts,* to shift the 32b RSS hash value to the * highest 32b of each 128b before mask */ -__m256i rss_hash6_7 = -_mm256_slli_epi64 (raw_desc_bh6_7,32 ); -__m256i rss_hash4_5 = -_mm256_slli_epi64 (raw_desc_bh4_5,32 ); -__m256i rss_hash2_3 = -_mm256_slli_epi64 (raw_desc_bh2_3,32 ); -__m256i rss_hash0_1 = -_mm256_slli_epi64 (raw_desc_bh0_1,32 ); - -__m256i rss_hash_msk = -_mm256_set_epi32 (0xFFFFFFFF ,0 ,0 ,0 , -0xFFFFFFFF ,0 ,0 ,0 ); - - rss_hash6_7 =_mm256_and_si256 - (rss_hash6_7, rss_hash_msk); - rss_hash4_5 =_mm256_and_si256 - (rss_hash4_5, rss_hash_msk); - rss_hash2_3 =_mm256_and_si256 - (rss_hash2_3, rss_hash_msk); - rss_hash0_1 =_mm256_and_si256 - (rss_hash0_1, rss_hash_msk); - - mb6_7 =_mm256_or_si256 (mb6_7, rss_hash6_7); - mb4_5 =_mm256_or_si256 (mb4_5, rss_hash4_5); - mb2_3 =_mm256_or_si256 (mb2_3, rss_hash2_3); - mb0_1 = _mm256_or_si256(mb0_1, rss_hash0_1); - }/* if() on RSS hash parsing */ +if (rxq->vsi->adapter->pf.dev_data->dev_conf.rxmode.offloads & +RTE_ETH_RX_OFFLOAD_RSS_HASH ) { +__m256i rss_hash6_7 = +_mm256_slli_epi64 (raw_desc_bh6_7,32 ); +__m256i rss_hash4_5 = +_mm256_slli_epi64 (raw_desc_bh4_5,32 ); +__m256i rss_hash2_3 = +_mm256_slli_epi64 (raw_desc_bh2_3,32 ); +__m256i rss_hash0_1 = +_mm256_slli_epi64 (raw_desc_bh0_1,32 ); + +__m256i rss_hash_msk = +_mm256_set_epi32 (0xFFFFFFFF ,0 ,0 ,0 , +0xFFFFFFFF ,0 ,0 ,0 ); + + rss_hash6_7 =_mm256_and_si256 + (rss_hash6_7, rss_hash_msk); + rss_hash4_5 =_mm256_and_si256 + (rss_hash4_5, rss_hash_msk); + rss_hash2_3 =_mm256_and_si256 + (rss_hash2_3, rss_hash_msk); + rss_hash0_1 =_mm256_and_si256 + (rss_hash0_1, rss_hash_msk); + + mb6_7 =_mm256_or_si256 (mb6_7, rss_hash6_7); + mb4_5 =_mm256_or_si256 (mb4_5, rss_hash4_5); + mb2_3 =_mm256_or_si256 (mb2_3, rss_hash2_3); + mb0_1 =_mm256_or_si256 (mb0_1, rss_hash0_1); + }/* if() on RSS hash parsing */ + +if (rxq->vsi->adapter->pf.dev_data->dev_conf.rxmode.offloads & +RTE_ETH_RX_OFFLOAD_VLAN ) { +/* merge the status/error-1 bits into one register */ +const __m256i status1_4_7 = +_mm256_unpacklo_epi32 (raw_desc_bh6_7, + raw_desc_bh4_5); +const __m256i status1_0_3 = +_mm256_unpacklo_epi32 (raw_desc_bh2_3, + raw_desc_bh0_1); + +const __m256i status1_0_7 = +_mm256_unpacklo_epi64 (status1_4_7, + status1_0_3); + +const __m256i l2tag2p_flag_mask = +_mm256_set1_epi32 (1 <<11 ); + +__m256i l2tag2p_flag_bits = +_mm256_and_si256 + (status1_0_7, l2tag2p_flag_mask); + + l2tag2p_flag_bits = +_mm256_srli_epi32 (l2tag2p_flag_bits, +11 ); + +__m256i vlan_flags =_mm256_setzero_si256 (); +const __m256i l2tag2_flags_shuf = +_mm256_set_epi8 (0 ,0 ,0 ,0 , +0 ,0 ,0 ,0 , +0 ,0 ,0 ,0 , +0 ,0 ,0 ,0 , +/* end up 128-bits */ +0 ,0 ,0 ,0 , +0 ,0 ,0 ,0 , +0 ,0 ,0 ,0 , +0 ,0 , +RTE_MBUF_F_RX_VLAN | +RTE_MBUF_F_RX_VLAN_STRIPPED , +0 ); + vlan_flags = +_mm256_shuffle_epi8 (l2tag2_flags_shuf, + l2tag2p_flag_bits); + +/* merge with vlan_flags */ + mbuf_flags =_mm256_or_si256 + (mbuf_flags, vlan_flags); + +/* L2TAG2_2 */ +__m256i vlan_tci6_7 = +_mm256_slli_si256 (raw_desc_bh6_7,4 ); +__m256i vlan_tci4_5 = +_mm256_slli_si256 (raw_desc_bh4_5,4 ); +__m256i vlan_tci2_3 = +_mm256_slli_si256 (raw_desc_bh2_3,4 ); +__m256i vlan_tci0_1 = +_mm256_slli_si256 (raw_desc_bh0_1,4 ); + +const __m256i vlan_tci_msk = +_mm256_set_epi32 (0 ,0xFFFF0000 ,0 ,0 , +0 ,0xFFFF0000 ,0 ,0 ); + + vlan_tci6_7 =_mm256_and_si256 + (vlan_tci6_7, vlan_tci_msk); + vlan_tci4_5 =_mm256_and_si256 + (vlan_tci4_5, vlan_tci_msk); + vlan_tci2_3 =_mm256_and_si256 + (vlan_tci2_3, vlan_tci_msk); + vlan_tci0_1 =_mm256_and_si256 + (vlan_tci0_1, vlan_tci_msk); + + mb6_7 =_mm256_or_si256 (mb6_7, vlan_tci6_7); + mb4_5 =_mm256_or_si256 (mb4_5, vlan_tci4_5); + mb2_3 =_mm256_or_si256 (mb2_3, vlan_tci2_3); + mb0_1 =_mm256_or_si256 (mb0_1, vlan_tci0_1); + } + }#endif }
drivers/net/ice/ice_rxtx_vec_avx512.c +128 -28
174 lines not on this page · raw message
drivers/net/ice/ice_rxtx_vec_sse.c +99 -33
181 lines not on this page · raw message
Signature · 1 line
2.34.1
RE: [PATCH v4 2/2] net/ice: fix vlan offload
Quoted 29 lines
-----Original Message-----
From: Mingjin Ye <[email protected]>
Sent: Thursday, October 27, 2022 1:10 AM
To: [email protected]
Cc: [email protected]; Zhou, YidingX <[email protected]>; Ye, MingjinX <[email protected]>; Richardson, Bruce <[email protected]>; Konstantin Ananyev <[email protected]>; Yang, Qiming <[email protected]>; Zhang, Qi Z <[email protected]>; Lu, Wenzhuo <[email protected]>; Junyu Jiang <[email protected]>; Rong, Leyi <[email protected]>; Wisam Jaddo <[email protected]>; Xia, Chenbo <[email protected]>; Hemant Agrawal <[email protected]>; Jerin Jacob <[email protected]>; Ajit Khaparde <[email protected]>
Subject: [PATCH v4 2/2] net/ice: fix vlan offloadThe vlan tag and flag in Rx descriptor are not processed on vector path, then the upper application can't fetch the tci from mbuf.
This commit add handling of vlan RX offloading.
Fixes c68a52b8b38c ("net/ice: support vector SSE in Rx")Fixes ece1f8a8f1c8 ("net/ice: switch to flexible descriptor in SSE path")Fixes 12443386a0b0 ("net/ice: support flex Rx descriptor RxDID22")Fixes 214f452f7d5f ("net/ice: add AVX2 offload Rx")Fixes 7f85d5ebcfe1 ("net/ice: add AVX512 vector path")Fixes 295968d17407 ("ethdev: add namespace")Fixes 808a17b3c1e6 ("net/ice: add Rx AVX512 offload path")
Quoted 7 lines
Signed-off-by Mingjin Ye <[email protected]>v3:
* Fix macros inice_rxtx_vec_sse.csource file.
v4:
* Fixice_rx_desc_to_olflags_vdefine inice_rxtx_vec_sse.csource file.
---
Quoted 17 lines · Mingjin Ye
After setting vlan offload in testpmd, the result is not updated to rxq. Therefore, the queue needs to be reconfigured after executing the "vlan offload" related commands.
Fixes a47aa8b97afe ("app/testpmd: add vlan offload support")Signed-off-by Mingjin Ye <[email protected]>--- app/test-pmd/cmdline.c | 1 + 1 file changed, 1 insertion(+)app/test-pmd/cmdline.c +0
-0
app/test-pmd/cmdline.c cmd_vlan_offload_parsed(void *parsed_result, · line 4136
Quoted 4 lines
app/test-pmd/cmdline.c +1
-0@@ -4133,6 +4133,7 @@ cmd_vlan_offload_parsed(void *parsed_result,else vlan_extend_set (port_id, on); +cmd_reconfig_device_queue (port_id,1 ,1 );
This means that queue offloads need to upadte by re-calling dev_configure and setup all queues, right? If it is, this adds a usage limitation.
Quoted 3 lines
app/test-pmd/cmdline.c +0
-0return ; }
Hi lihuisong,
This means that queue offloads need to update by recalling dev_configure and setup target queues.
Can you tell me, where is the limitation?
Thanks,
Mingjin
Quoted 38 lines
-----Original Message-----
From: lihuisong (C) <[email protected]>
Sent: 2022年10月26日 17:53
To: Ye, MingjinX <[email protected]>; [email protected]
Cc: [email protected]; Zhou, YidingX <[email protected]>; Singh, Aman Deep <[email protected]>; Zhang, Yuying <[email protected]>
Subject: Re: [PATCH v4 1/2] app/testpmd: fix vlan offload of rxqQuoted 17 lines · Mingjin Ye
After setting vlan offload in testpmd, the result is not updated to rxq. Therefore, the queue needs to be reconfigured after executing the "vlan offload" related commands.
Fixes a47aa8b97afe ("app/testpmd: add vlan offload support")Signed-off-by Mingjin Ye <[email protected]>--- app/test-pmd/cmdline.c | 1 + 1 file changed, 1 insertion(+)app/test-pmd/cmdline.c index renamed from app/test-pmd/cmdline.c +0
-0
17be2de402..ce125f549f100644app/test-pmd/cmdline.c cmd_vlan_offload_parsed(void *parsed_result, · line 4136
Quoted 4 lines
app/test-pmd/cmdline.c +1
-0@@ -4133,6 +4133,7 @@ cmd_vlan_offload_parsed(void *parsed_result,else vlan_extend_set (port_id, on); +cmd_reconfig_device_queue (port_id,1 ,1 );This means that queue offloads need to upadte by re-calling
dev_configureand setup all queues, right?
If it is, this adds a usage limitation.Quoted 3 lines
app/test-pmd/cmdline.c +0
-0return ; }
Quoted 4 lines · MingjinX
Hi lihuisong,
This means that queue offloads need to update by recalling
dev_configureand setup target queues.
Why not update queue offloads in PMD?
Quoted 1 line
Can you tell me, where is the limitation?
According to other Rx/Tx offload configurations, this may not be a limitation. But it seems to create a dependency on user usage.
Port VLAN releated offloads are set by ethdev ops. There is no requirement in ehedev layer that this port needs to stopped when set these offloads. Now it depends on user does recall dev_configure and setup queues to update queue offloads because of setting these offloads.
Quoted 35 lines
Thanks,
MingjinQuoted 31 lines
-----Original Message-----
From: lihuisong (C) <[email protected]>
Sent: 2022年10月26日 17:53
To: Ye, MingjinX <[email protected]>; [email protected]
Cc: [email protected]; Zhou, YidingX <[email protected]>; Singh, Aman Deep <[email protected]>; Zhang, Yuying <[email protected]>
Subject: Re: [PATCH v4 1/2] app/testpmd: fix vlan offload of rxqQuoted 20 lines · Mingjin Ye
After setting vlan offload in testpmd, the result is not updated to rxq. Therefore, the queue needs to be reconfigured after executing the "vlan offload" related commands.
Fixes a47aa8b97afe ("app/testpmd: add vlan offload support")Signed-off-by Mingjin Ye <[email protected]>--- app/test-pmd/cmdline.c | 1 + 1 file changed, 1 insertion(+)app/test-pmd/cmdline.c index renamed from app/test-pmd/cmdline.c +0
-0
17be2de402..ce125f549f100644app/test-pmd/cmdline.c +0
-0@@ -4133,6 +4133,7 @@ cmd_vlan_offload_parsed(void *parsed_result,else vlan_extend_set (port_id, on);
Quoted 1 line
Quoted 1 line
app/test-pmd/cmdline.c cmd_vlan_offload_parsed(void *parsed_result, · line 4136
Quoted 1 line
app/test-pmd/cmdline.c +1
-0+cmd_reconfig_device_queue (port_id,1 ,1 );
In addition, I have some comments:
1) Normally, the parsed function of testpmd command needed to re-config port and queue needs to check if port status is STOPED. Why don't you add this check? If the check is not exist, queue offloads are not updated until the next port stop/start command is executed. Right?
2) Why is the queue-based VLAN offload API not used?
Like, rte_eth_dev_set_vlan_strip_on_queue. It seems that this kind of API is dedicated to do this.
Quoted 6 lines
Quoted 6 lines
This means that queue offloads need to upadte by re-calling
dev_configureand setup all queues, right?
If it is, this adds a usage limitation.Quoted 3 lines
app/test-pmd/cmdline.c +0
-0return ; }
Quoted 61 lines
-----Original Message-----
From: lihuisong (C) <[email protected]>
Sent: 2022年10月28日 10:09
To: Ye, MingjinX <[email protected]>; [email protected]
Cc: [email protected]; Zhou, YidingX <[email protected]>; Singh, Aman Deep <[email protected]>; Zhang, Yuying <[email protected]>
Subject: Re: [PATCH v4 1/2] app/testpmd: fix vlan offload of rxqQuoted 4 lines · MingjinX
Hi lihuisong,
This means that queue offloads need to update by recalling
dev_configureand setup target queues.Why not update queue offloads in PMD?
Quoted 1 line
Can you tell me, where is the limitation?
According to other Rx/Tx offload configurations, this may not be a limitation. But it seems to create a dependency on user usage.
Port VLAN releated offloads are set by ethdev ops. There is no requirement in ehedev layer that this port needs to stopped when set these offloads. Now it depends on user does recall
dev_configureand setup queues to update queue offloads because of setting these offloads.Quoted 35 lines
Thanks,
MingjinQuoted 31 lines
-----Original Message-----
From: lihuisong (C) <[email protected]>
Sent: 2022年10月26日 17:53
To: Ye, MingjinX <[email protected]>; [email protected]
Cc: [email protected]; Zhou, YidingX <[email protected]>; Singh, Aman Deep <[email protected]>; Zhang, Yuying <[email protected]>
Subject: Re: [PATCH v4 1/2] app/testpmd: fix vlan offload of rxqQuoted 20 lines · Mingjin Ye
After setting vlan offload in testpmd, the result is not updated to rxq. Therefore, the queue needs to be reconfigured after executing the "vlan offload" related commands.
Fixes a47aa8b97afe ("app/testpmd: add vlan offload support")Signed-off-by Mingjin Ye <[email protected]>--- app/test-pmd/cmdline.c | 1 + 1 file changed, 1 insertion(+)app/test-pmd/cmdline.c index renamed from app/test-pmd/cmdline.c +0
-0
17be2de402..ce125f549f100644app/test-pmd/cmdline.c +0
-0@@ -4133,6 +4133,7 @@ cmd_vlan_offload_parsed(void *parsed_result,else vlan_extend_set (port_id, on);
Quoted 5 lines
Quoted 1 line
Quoted 1 line
app/test-pmd/cmdline.c cmd_vlan_offload_parsed(void *parsed_result, · line 4136
Quoted 1 line
app/test-pmd/cmdline.c +1
-0+cmd_reconfig_device_queue (port_id,1 ,1 );In addition, I have some comments:
1) Normally, the parsed function of testpmd command needed to re-config port and queue needs to check if port status is STOPED. Why don't you add this check?
The check is exist.
Quoted 2 lines
If the check is not exist, queue offloads are not updated until the next port stop/start command is executed. Right?
yes
Quoted 2 lines
2) Why is the queue-based VLAN offload API not used?
VLAN offload is a port-related configuration. If a single port is changed, the associated queue needs to be all updated in configuration. Therefore, there will be no additional api to configure.
Quoted 9 lines
Like,
rte_eth_dev_set_vlan_strip_on_queue. It seems that this kind of API
is
dedicated to do this.Quoted 6 lines
Quoted 6 lines
This means that queue offloads need to upadte by re-calling
dev_configureand setup all queues, right?
If it is, this adds a usage limitation.Quoted 3 lines
app/test-pmd/cmdline.c +0
-0return ; }
Quoted 59 lines · MingjinX
Quoted 59 lines
-----Original Message-----
From: lihuisong (C) <[email protected]>
Sent: 2022年10月28日 10:09
To: Ye, MingjinX <[email protected]>; [email protected]
Cc: [email protected]; Zhou, YidingX <[email protected]>; Singh, Aman Deep <[email protected]>; Zhang, Yuying <[email protected]>
Subject: Re: [PATCH v4 1/2] app/testpmd: fix vlan offload of rxqQuoted 4 lines · MingjinX
Hi lihuisong,
This means that queue offloads need to update by recalling
dev_configureand setup target queues.Why not update queue offloads in PMD?
Quoted 1 line
Can you tell me, where is the limitation?
According to other Rx/Tx offload configurations, this may not be a limitation. But it seems to create a dependency on user usage.
Port VLAN releated offloads are set by ethdev ops. There is no requirement in ehedev layer that this port needs to stopped when set these offloads. Now it depends on user does recall
dev_configureand setup queues to update queue offloads because of setting these offloads.Quoted 34 lines
Thanks,
MingjinQuoted 31 lines
-----Original Message-----
From: lihuisong (C) <[email protected]>
Sent: 2022年10月26日 17:53
To: Ye, MingjinX <[email protected]>; [email protected]
Cc: [email protected]; Zhou, YidingX <[email protected]>; Singh, Aman Deep <[email protected]>; Zhang, Yuying <[email protected]>
Subject: Re: [PATCH v4 1/2] app/testpmd: fix vlan offload of rxqQuoted 20 lines · Mingjin Ye
After setting vlan offload in testpmd, the result is not updated to rxq. Therefore, the queue needs to be reconfigured after executing the "vlan offload" related commands.
Fixes a47aa8b97afe ("app/testpmd: add vlan offload support")Signed-off-by Mingjin Ye <[email protected]>--- app/test-pmd/cmdline.c | 1 + 1 file changed, 1 insertion(+)app/test-pmd/cmdline.c index renamed from app/test-pmd/cmdline.c +0
-0
17be2de402..ce125f549f100644app/test-pmd/cmdline.c +0
-0@@ -4133,6 +4133,7 @@ cmd_vlan_offload_parsed(void *parsed_result,else vlan_extend_set (port_id, on);
Quoted 6 lines
Quoted 5 lines
Quoted 1 line
Quoted 1 line
app/test-pmd/cmdline.c cmd_vlan_offload_parsed(void *parsed_result, · line 4136
Quoted 1 line
app/test-pmd/cmdline.c +1
-0+cmd_reconfig_device_queue (port_id,1 ,1 );In addition, I have some comments:
1) Normally, the parsed function of testpmd command needed to re-config port and queue needs to check if port status is STOPED. Why don't you add this check?The check is exist.
Where is the check? Currently, it seems that this check does not exist in the this command parsed function.
Quoted 16 lines
Quoted 2 lines
If the check is not exist, queue offloads are not updated until the next port stop/start command is executed. Right?
yes
Quoted 1 line
2) Why is the queue-based VLAN offload API not used?
VLAN offload is a port-related configuration. If a single port is changed, the associated queue needs to be all updated in configuration. Therefore, there will be no additional api to configure.
Quoted 9 lines
Like,
rte_eth_dev_set_vlan_strip_on_queue. It seems that this kind of API
is
dedicated to do this.Quoted 6 lines
Quoted 6 lines
This means that queue offloads need to upadte by re-calling
dev_configureand setup all queues, right?
If it is, this adds a usage limitation.Quoted 3 lines
app/test-pmd/cmdline.c +0
-0return ; }
Quoted 75 lines
-----Original Message-----
From: lihuisong (C) <[email protected]>
Sent: 2022年11月3日 15:01
To: Ye, MingjinX <[email protected]>; [email protected]
Cc: [email protected]; Zhou, YidingX <[email protected]>; Singh, Aman Deep <[email protected]>; Zhang, Yuying <[email protected]>
Subject: Re: [PATCH v4 1/2] app/testpmd: fix vlan offload of rxqQuoted 11 lines · MingjinX
Quoted 11 lines
-----Original Message-----
From: lihuisong (C) <[email protected]>
Sent: 2022年10月28日 10:09
To: Ye, MingjinX <[email protected]>; [email protected]
Cc: [email protected]; Zhou, YidingX <[email protected]>; Singh, Aman Deep <[email protected]>; Zhang, Yuying <[email protected]>
Subject: Re: [PATCH v4 1/2] app/testpmd: fix vlan offload of rxqQuoted 8 lines
Quoted 8 lines · MingjinX
Quoted 4 lines
Hi lihuisong,
This means that queue offloads need to update by recalling
dev_configureand setup target queues.Why not update queue offloads in PMD?
Quoted 1 line
Can you tell me, where is the limitation?
According to other Rx/Tx offload configurations, this may not be a
limitation.
Quoted 4 lines
Quoted 4 lines
But it seems to create a dependency on user usage.
Port VLAN releated offloads are set by ethdev ops. There is no requirement in ehedev layer that this port needs to stopped when set
these offloads.
Quoted 28 lines
Quoted 28 lines
Now it depends on user does recall
dev_configureand setup queues to update queue offloads because of setting these offloads.Quoted 26 lines
Thanks,
MingjinQuoted 23 lines
-----Original Message-----
From: lihuisong (C) <[email protected]>
Sent: 2022年10月26日 17:53
To: Ye, MingjinX <[email protected]>; [email protected]
Cc: [email protected]; Zhou, YidingX <[email protected]>; Singh, Aman Deep <[email protected]>; Zhang, Yuying <[email protected]>
Subject: Re: [PATCH v4 1/2] app/testpmd: fix vlan offload of rxqQuoted 12 lines · Mingjin Ye
After setting vlan offload in testpmd, the result is not updated to rxq. Therefore, the queue needs to be reconfigured after executing the "vlan offload" related commands.
Fixes a47aa8b97afe ("app/testpmd: add vlan offload support")Signed-off-by Mingjin Ye <[email protected]>--- app/test-pmd/cmdline.c | 1 + 1 file changed, 1 insertion(+)Quoted 5 lines
Quoted 5 lines
Quoted 5 lines
Quoted 5 lines
app/test-pmd/cmdline.c cmd_vlan_offload_parsed(void
Quoted 5 lines
app/test-pmd/cmdline.c index renamed from app/test-pmd/cmdline.c +0
-0
17be2de402..ce125f549f100644app/test-pmd/cmdline.c +0
-0@@ -4133,6 +4133,7 @@ cmd_vlan_offload_parsed(void
*parsed_result,Quoted 3 lines
Quoted 3 lines
Quoted 3 lines
Quoted 3 lines
Quoted 3 lines
app/test-pmd/cmdline.c +0
-0else vlan_extend_set (port_id, on);
Quoted 8 lines
Quoted 6 lines
Quoted 5 lines
Quoted 1 line
Quoted 1 line
app/test-pmd/cmdline.c cmd_vlan_offload_parsed(void *parsed_result, · line 4136
Quoted 1 line
app/test-pmd/cmdline.c +1
-0+cmd_reconfig_device_queue (port_id,1 ,1 );In addition, I have some comments:
1) Normally, the parsed function of testpmd command needed to re-config port and queue needs to check if port status is STOPED. Why don't you add this check?The check is exist.
Where is the check? Currently, it seems that this check does not exist in the this command parsed function.
Check if the port is forwarded, in the source file test-pmd.c:2835.
Quoted 16 lines
Quoted 16 lines
Quoted 2 lines
If the check is not exist, queue offloads are not updated until the next port stop/start command is executed. Right?
yes
Quoted 1 line
2) Why is the queue-based VLAN offload API not used?
VLAN offload is a port-related configuration. If a single port is changed, the associated queue needs to be all updated in configuration. Therefore, there will be no additional api to configure.
Quoted 9 lines
Like,
rte_eth_dev_set_vlan_strip_on_queue. It seems that this
kind of API is
dedicated to do this.Quoted 6 lines
Quoted 6 lines
This means that queue offloads need to upadte by re-calling
dev_configureand setup all queues, right?
If it is, this adds a usage limitation.Quoted 3 lines
app/test-pmd/cmdline.c +0
-0return ; }
Quoted 78 lines · MingjinX
Quoted 78 lines
-----Original Message-----
From: lihuisong (C) <[email protected]>
Sent: 2022年11月3日 15:01
To: Ye, MingjinX <[email protected]>; [email protected]
Cc: [email protected]; Zhou, YidingX <[email protected]>; Singh, Aman Deep <[email protected]>; Zhang, Yuying <[email protected]>
Subject: Re: [PATCH v4 1/2] app/testpmd: fix vlan offload of rxqQuoted 10 lines · MingjinX
Quoted 10 lines
-----Original Message-----
From: lihuisong (C) <[email protected]>
Sent: 2022年10月28日 10:09
To: Ye, MingjinX <[email protected]>; [email protected]
Cc: [email protected]; Zhou, YidingX <[email protected]>; Singh, Aman Deep <[email protected]>; Zhang, Yuying <[email protected]>
Subject: Re: [PATCH v4 1/2] app/testpmd: fix vlan offload of rxqQuoted 8 lines
Quoted 8 lines · MingjinX
Quoted 4 lines
Hi lihuisong,
This means that queue offloads need to update by recalling
dev_configureand setup target queues.Why not update queue offloads in PMD?
Quoted 1 line
Can you tell me, where is the limitation?
According to other Rx/Tx offload configurations, this may not be a
limitation.
Quoted 4 lines
Quoted 4 lines
But it seems to create a dependency on user usage.
Port VLAN releated offloads are set by ethdev ops. There is no requirement in ehedev layer that this port needs to stopped when set
these offloads.
Quoted 28 lines
Quoted 28 lines
Now it depends on user does recall
dev_configureand setup queues to update queue offloads because of setting these offloads.Quoted 26 lines
Thanks,
MingjinQuoted 23 lines
-----Original Message-----
From: lihuisong (C) <[email protected]>
Sent: 2022年10月26日 17:53
To: Ye, MingjinX <[email protected]>; [email protected]
Cc: [email protected]; Zhou, YidingX <[email protected]>; Singh, Aman Deep <[email protected]>; Zhang, Yuying <[email protected]>
Subject: Re: [PATCH v4 1/2] app/testpmd: fix vlan offload of rxqQuoted 12 lines · Mingjin Ye
After setting vlan offload in testpmd, the result is not updated to rxq. Therefore, the queue needs to be reconfigured after executing the "vlan offload" related commands.
Fixes a47aa8b97afe ("app/testpmd: add vlan offload support")Signed-off-by Mingjin Ye <[email protected]>--- app/test-pmd/cmdline.c | 1 + 1 file changed, 1 insertion(+)Quoted 5 lines
Quoted 5 lines
Quoted 5 lines
Quoted 5 lines
app/test-pmd/cmdline.c cmd_vlan_offload_parsed(void
Quoted 5 lines
app/test-pmd/cmdline.c index renamed from app/test-pmd/cmdline.c +0
-0
17be2de402..ce125f549f100644app/test-pmd/cmdline.c +0
-0@@ -4133,6 +4133,7 @@ cmd_vlan_offload_parsed(void
*parsed_result,Quoted 8 lines
Quoted 8 lines
Quoted 4 lines
Quoted 4 lines
app/test-pmd/cmdline.c cmd_vlan_offload_parsed(void · line 4136
Quoted 4 lines
app/test-pmd/cmdline.c +1
-0else vlan_extend_set (port_id, on); +cmd_reconfig_device_queue (port_id,1 ,1 );In addition, I have some comments:
1) Normally, the parsed function of testpmd command needed to re-config port and queue needs to check if port status is STOPED. Why don't you add this check?
Quoted 4 lines
Quoted 3 lines
Quoted 1 line
The check is exist.
Where is the check? Currently, it seems that this check does not exist in the this command parsed function.
Check if the port is forwarded, in the source file test-pmd.c:2835.
I don't understand why you mention the check in start_port(). It should be done in command parsed link other command.
Quoted 16 lines
Quoted 16 lines
Quoted 16 lines
Quoted 2 lines
If the check is not exist, queue offloads are not updated until the next port stop/start command is executed. Right?
yes
Quoted 1 line
2) Why is the queue-based VLAN offload API not used?
VLAN offload is a port-related configuration. If a single port is changed, the associated queue needs to be all updated in configuration. Therefore, there will be no additional api to configure.
Quoted 9 lines
Like,
rte_eth_dev_set_vlan_strip_on_queue. It seems that this
kind of API is
dedicated to do this.Quoted 6 lines
Quoted 6 lines
This means that queue offloads need to upadte by re-calling
dev_configureand setup all queues, right?
If it is, this adds a usage limitation.Quoted 3 lines
app/test-pmd/cmdline.c +0
-0return ; }
Quoted 92 lines
-----Original Message-----
From: lihuisong (C) <[email protected]>
Sent: 2022年11月4日 18:18
To: Ye, MingjinX <[email protected]>; [email protected]
Cc: [email protected]; Zhou, YidingX <[email protected]>; Singh, Aman Deep <[email protected]>; Zhang, Yuying <[email protected]>
Subject: Re: [PATCH v4 1/2] app/testpmd: fix vlan offload of rxqQuoted 79 lines · MingjinX
Quoted 79 lines
-----Original Message-----
From: lihuisong (C) <[email protected]>
Sent: 2022年11月3日 15:01
To: Ye, MingjinX <[email protected]>; [email protected]
Cc: [email protected]; Zhou, YidingX <[email protected]>; Singh, Aman Deep <[email protected]>; Zhang, Yuying <[email protected]>
Subject: Re: [PATCH v4 1/2] app/testpmd: fix vlan offload of rxqQuoted 10 lines · MingjinX
Quoted 10 lines
-----Original Message-----
From: lihuisong (C) <[email protected]>
Sent: 2022年10月28日 10:09
To: Ye, MingjinX <[email protected]>; [email protected]
Cc: [email protected]; Zhou, YidingX <[email protected]>; Singh, Aman Deep <[email protected]>; Zhang, Yuying <[email protected]>
Subject: Re: [PATCH v4 1/2] app/testpmd: fix vlan offload of rxqQuoted 8 lines
Quoted 8 lines · MingjinX
Quoted 4 lines
Hi lihuisong,
This means that queue offloads need to update by recalling
dev_configureand setup target queues.Why not update queue offloads in PMD?
Quoted 1 line
Can you tell me, where is the limitation?
According to other Rx/Tx offload configurations, this may not be a
limitation.
Quoted 5 lines
Quoted 5 lines
But it seems to create a dependency on user usage.
Port VLAN releated offloads are set by ethdev ops. There is no requirement in ehedev layer that this port needs to stopped when set
these offloads.
Quoted 28 lines
Quoted 28 lines
Now it depends on user does recall
dev_configureand setup queues to update queue offloads because of setting these offloads.Quoted 26 lines
Thanks,
MingjinQuoted 23 lines
-----Original Message-----
From: lihuisong (C) <[email protected]>
Sent: 2022年10月26日 17:53
To: Ye, MingjinX <[email protected]>; [email protected]
Cc: [email protected]; Zhou, YidingX <[email protected]>; Singh, Aman Deep <[email protected]>; Zhang, Yuying <[email protected]>
Subject: Re: [PATCH v4 1/2] app/testpmd: fix vlan offload of rxqQuoted 12 lines · Mingjin Ye
After setting vlan offload in testpmd, the result is not updated to rxq. Therefore, the queue needs to be reconfigured after executing the "vlan offload" related commands.
Fixes a47aa8b97afe ("app/testpmd: add vlan offload support")Signed-off-by Mingjin Ye <[email protected]>--- app/test-pmd/cmdline.c | 1 + 1 file changed, 1 insertion(+)Quoted 5 lines
Quoted 5 lines
Quoted 5 lines
Quoted 5 lines
app/test-pmd/cmdline.c cmd_vlan_offload_parsed(void
Quoted 5 lines
app/test-pmd/cmdline.c +0
-0@@ -4133,6 +4133,7 @@ cmd_vlan_offload_parsed(void
*parsed_result,Quoted 8 lines
Quoted 8 lines
Quoted 4 lines
Quoted 4 lines
app/test-pmd/cmdline.c cmd_vlan_offload_parsed(void · line 4136
Quoted 4 lines
app/test-pmd/cmdline.c +1
-0else vlan_extend_set (port_id, on); +cmd_reconfig_device_queue (port_id,1 ,1 );In addition, I have some comments:
1) Normally, the parsed function of testpmd command needed to re-config port and queue needs to check if port status is STOPED. Why don't you add this check?
Quoted 6 lines
Quoted 4 lines
Quoted 3 lines
Quoted 1 line
The check is exist.
Where is the check? Currently, it seems that this check does not exist in the this command parsed function.
Check if the port is forwarded, in the source file test-pmd.c:2835.
I don't understand why you mention the check in
start_port(). It should be done in command parsed link other command.
The command types include configuration and show these two types of commands.
show commands: There is no need to judge whether the port has stopped working. configuration commands: Not all commands need to stop the port, there will be judgment if necessary.
Hi, @[email protected] can you please help review this patch? Thanks.
Quoted 16 lines
Quoted 16 lines
Quoted 16 lines
Quoted 16 lines
Quoted 2 lines
If the check is not exist, queue offloads are not updated until the next port stop/start command is executed. Right?
yes
Quoted 1 line
2) Why is the queue-based VLAN offload API not used?
VLAN offload is a port-related configuration. If a single port is changed, the associated queue needs to be all updated in configuration. Therefore, there will be no additional api to configure.
Quoted 9 lines
Like,
rte_eth_dev_set_vlan_strip_on_queue. It seems that this
kind of API is
dedicated to do this.Quoted 6 lines
Quoted 6 lines
This means that queue offloads need to upadte by re-calling
dev_configureand setup all queues, right?
If it is, this adds a usage limitation.Quoted 3 lines
app/test-pmd/cmdline.c +0
-0return ; }
Quoted 96 lines · MingjinX
Quoted 96 lines
-----Original Message-----
From: lihuisong (C) <[email protected]>
Sent: 2022年11月4日 18:18
To: Ye, MingjinX <[email protected]>; [email protected]
Cc: [email protected]; Zhou, YidingX <[email protected]>; Singh, Aman Deep <[email protected]>; Zhang, Yuying <[email protected]>
Subject: Re: [PATCH v4 1/2] app/testpmd: fix vlan offload of rxqQuoted 83 lines · MingjinX
Quoted 74 lines
-----Original Message-----
From: lihuisong (C) <[email protected]>
Sent: 2022年11月3日 15:01
To: Ye, MingjinX <[email protected]>; [email protected]
Cc: [email protected]; Zhou, YidingX <[email protected]>; Singh, Aman Deep <[email protected]>; Zhang, Yuying <[email protected]>
Subject: Re: [PATCH v4 1/2] app/testpmd: fix vlan offload of rxqQuoted 10 lines · MingjinX
Quoted 10 lines
-----Original Message-----
From: lihuisong (C) <[email protected]>
Sent: 2022年10月28日 10:09
To: Ye, MingjinX <[email protected]>; [email protected]
Cc: [email protected]; Zhou, YidingX <[email protected]>; Singh, Aman Deep <[email protected]>; Zhang, Yuying <[email protected]>
Subject: Re: [PATCH v4 1/2] app/testpmd: fix vlan offload of rxqQuoted 8 lines
Quoted 8 lines · MingjinX
Quoted 4 lines
Hi lihuisong,
This means that queue offloads need to update by recalling
dev_configureand setup target queues.Why not update queue offloads in PMD?
Quoted 1 line
Can you tell me, where is the limitation?
According to other Rx/Tx offload configurations, this may not be a
limitation.
Quoted 5 lines
Quoted 5 lines
But it seems to create a dependency on user usage.
Port VLAN releated offloads are set by ethdev ops. There is no requirement in ehedev layer that this port needs to stopped when set
these offloads.
Quoted 28 lines
Quoted 28 lines
Now it depends on user does recall
dev_configureand setup queues to update queue offloads because of setting these offloads.Quoted 26 lines
Thanks,
MingjinQuoted 23 lines
-----Original Message-----
From: lihuisong (C) <[email protected]>
Sent: 2022年10月26日 17:53
To: Ye, MingjinX <[email protected]>; [email protected]
Cc: [email protected]; Zhou, YidingX <[email protected]>; Singh, Aman Deep <[email protected]>; Zhang, Yuying <[email protected]>
Subject: Re: [PATCH v4 1/2] app/testpmd: fix vlan offload of rxqQuoted 12 lines · Mingjin Ye
After setting vlan offload in testpmd, the result is not updated to rxq. Therefore, the queue needs to be reconfigured after executing the "vlan offload" related commands.
Fixes a47aa8b97afe ("app/testpmd: add vlan offload support")Signed-off-by Mingjin Ye <[email protected]>--- app/test-pmd/cmdline.c | 1 + 1 file changed, 1 insertion(+)Quoted 5 lines
Quoted 5 lines
Quoted 5 lines
Quoted 5 lines
app/test-pmd/cmdline.c cmd_vlan_offload_parsed(void
Quoted 5 lines
app/test-pmd/cmdline.c +0
-0@@ -4133,6 +4133,7 @@ cmd_vlan_offload_parsed(void
*parsed_result,Quoted 3 lines
Quoted 3 lines
Quoted 3 lines
Quoted 3 lines
Quoted 3 lines
app/test-pmd/cmdline.c +0
-0else vlan_extend_set (port_id, on);Quoted 8 lines
Quoted 6 lines
Quoted 5 lines
Quoted 1 line
Quoted 1 line
app/test-pmd/cmdline.c cmd_vlan_offload_parsed(void · line 4136
Quoted 1 line
app/test-pmd/cmdline.c +1
-0+cmd_reconfig_device_queue (port_id,1 ,1 );In addition, I have some comments:
1) Normally, the parsed function of testpmd command needed to re-config port and queue needs to check if port status is STOPED. Why don't you add this check?The check is exist.
Where is the check? Currently, it seems that this check does not exist in the this command parsed function.
Check if the port is forwarded, in the source file test-pmd.c:2835.
Quoted 8 lines
Quoted 2 lines
I don't understand why you mention the check in
start_port(). It should be done in command parsed link other command.The command types include configuration and show these two types of commands.
show commands: There is no need to judge whether the port has stopped working. configuration commands: Not all commands need to stop the port, there will be judgment if necessary.Hi, @[email protected] can you please help review this patch? Thanks.
cmd_vlan_offload_parsed() goes down to the follow ethdev API
functions:
- rte_eth_dev_set_vlan_strip_on_queue()
- rte_eth_dev_set_vlan_offload()
There functions may change settings when port is started, running and processing traffic. And, as far as I know, it is the primary goal of these functions. So, we should not
require application to do stop and reconfigure to apply
these settings.
It is an interesting question what should happen if application stops and starts the port back. As far as I can see it is not documented and it should be improved. I'd say that typical application would expect that dynamically done changes still apply. So, it should not be an application headache. The patch tries to care about it on application side and it is wrong from my point of view.
Moreover, if we finally decide that application must care itself, the second argument should be 1 in stripq case only since other cases do not reconfigure Rx queue. However, it will not help anyway since rx_vlan_strip_set_on_queue() do not save configuration changes in testpmd structures.
Quoted 17 lines
Quoted 17 lines
Quoted 17 lines
Quoted 17 lines
Quoted 17 lines
Quoted 3 lines
If the check is not exist, queue offloads are not updated until the next port stop/start command is executed. Right?
yes
Quoted 1 line
2) Why is the queue-based VLAN offload API not used?
VLAN offload is a port-related configuration. If a single port is changed, the associated queue needs to be all updated in configuration. Therefore, there will be no additional api to configure.
Quoted 9 lines
Like,
rte_eth_dev_set_vlan_strip_on_queue. It seems that this
kind of API is
dedicated to do this.Quoted 6 lines
Quoted 6 lines
This means that queue offloads need to upadte by re-calling
dev_configureand setup all queues, right?
If it is, this adds a usage limitation.Quoted 3 lines
app/test-pmd/cmdline.c +0
-0return ; }
Quoted 139 lines
-----Original Message-----
From: Andrew Rybchenko <[email protected]>
Sent: 2022年11月6日 18:33
To: Ye, MingjinX <[email protected]>; lihuisong (C) <[email protected]>; [email protected]
Cc: [email protected]; Zhou, YidingX <[email protected]>; Singh, Aman Deep <[email protected]>; Zhang, Yuying <[email protected]>
Subject: Re: [PATCH v4 1/2] app/testpmd: fix vlan offload of rxqQuoted 94 lines · MingjinX
Quoted 94 lines
-----Original Message-----
From: lihuisong (C) <[email protected]>
Sent: 2022年11月4日 18:18
To: Ye, MingjinX <[email protected]>; [email protected]
Cc: [email protected]; Zhou, YidingX <[email protected]>; Singh, Aman Deep <[email protected]>; Zhang, Yuying <[email protected]>
Subject: Re: [PATCH v4 1/2] app/testpmd: fix vlan offload of rxqQuoted 81 lines · MingjinX
Quoted 81 lines
-----Original Message-----
From: lihuisong (C) <[email protected]>
Sent: 2022年11月3日 15:01
To: Ye, MingjinX <[email protected]>; [email protected]
Cc: [email protected]; Zhou, YidingX <[email protected]>; Singh, Aman Deep <[email protected]>; Zhang, Yuying <[email protected]>
Subject: Re: [PATCH v4 1/2] app/testpmd: fix vlan offload of rxqQuoted 11 lines · MingjinX
Quoted 11 lines
-----Original Message-----
From: lihuisong (C) <[email protected]>
Sent: 2022年10月28日 10:09
To: Ye, MingjinX <[email protected]>; [email protected]
Cc: [email protected]; Zhou, YidingX <[email protected]>; Singh, Aman Deep <[email protected]>; Zhang, Yuying <[email protected]>
Subject: Re: [PATCH v4 1/2] app/testpmd: fix vlan offload of rxq在 2022/10/27 19:02, Ye, MingjinX 写道:
Quoted 8 lines
Quoted 8 lines
Quoted 4 lines
Hi lihuisong,
This means that queue offloads need to update by recalling
dev_configureand setup target queues.Why not update queue offloads in PMD?
Quoted 1 line
Can you tell me, where is the limitation?
According to other Rx/Tx offload configurations, this may not be a
limitation.
Quoted 5 lines
Quoted 5 lines
But it seems to create a dependency on user usage.
Port VLAN releated offloads are set by ethdev ops. There is no requirement in ehedev layer that this port needs to stopped when set
these offloads.
Quoted 29 lines
Quoted 29 lines
Now it depends on user does recall
dev_configureand setup queues to update queue offloads because of setting these offloads.Quoted 27 lines
Thanks,
MingjinQuoted 24 lines
-----Original Message-----
From: lihuisong (C) <[email protected]>
Sent: 2022年10月26日 17:53
To: Ye, MingjinX <[email protected]>; [email protected]
Cc: [email protected]; Zhou, YidingX <[email protected]>; Singh, Aman Deep <[email protected]>; Zhang, Yuying <[email protected]>
Subject: Re: [PATCH v4 1/2] app/testpmd: fix vlan offload of rxqQuoted 12 lines · Mingjin Ye
After setting vlan offload in testpmd, the result is not updated to rxq. Therefore, the queue needs to be reconfigured after executing the "vlan offload" related commands.
Fixes a47aa8b97afe ("app/testpmd: add vlan offload support")Signed-off-by Mingjin Ye <[email protected]>--- app/test-pmd/cmdline.c | 1 + 1 file changed, 1 insertion(+)Quoted 5 lines
Quoted 5 lines
Quoted 5 lines
Quoted 5 lines
app/test-pmd/cmdline.c cmd_vlan_offload_parsed(void
Quoted 5 lines
app/test-pmd/cmdline.c +0
-0@@ -4133,6 +4133,7 @@ cmd_vlan_offload_parsed(void
*parsed_result,Quoted 8 lines
Quoted 8 lines
Quoted 4 lines
Quoted 4 lines
app/test-pmd/cmdline.c cmd_vlan_offload_parsed(void · line 4136
Quoted 4 lines
app/test-pmd/cmdline.c +1
-0else vlan_extend_set (port_id, on); +cmd_reconfig_device_queue (port_id,1 ,1 );In addition, I have some comments:
1) Normally, the parsed function of testpmd command needed to re-config port and queue needs to check if port status is STOPED. Why don't you add this check?Quoted 8 lines
Quoted 6 lines
Quoted 4 lines
Quoted 3 lines
Quoted 1 line
The check is exist.
Where is the check? Currently, it seems that this check does not exist in the this command parsed function.
Check if the port is forwarded, in the source file test-pmd.c:2835.
I don't understand why you mention the check in
start_port(). It should be done in command parsed link other command.The command types include configuration and show these two types of
commands.
Quoted 1 line
show commands: There is no need to judge whether the port has stopped
working.
Quoted 1 line
configuration commands: Not all commands need to stop the port, there
will be judgment if necessary.
Quoted 2 lines
Hi, @[email protected] can you please help review this
patch? Thanks.
cmd_vlan_offload_parsed()goes down to the follow ethdev API functions:
-rte_eth_dev_set_vlan_strip_on_queue()
-rte_eth_dev_set_vlan_offload()
There functions may change settings when port is started, running and processing traffic. And, as far as I know, it is the primary goal of these functions. So, we should not require application to do stop and reconfigure to apply these settings.It is an interesting question what should happen if application stops and starts the port back. As far as I can see it is not documented and it should be improved. I'd say that typical application would expect that dynamically done changes still apply. So, it should not be an application headache. The patch tries to care about it on application side and it is wrong from my point of view.
Quoted 5 lines
Moreover, if we finally decide that application must care itself, the second argument should be 1 in stripq case only since other cases do not reconfigure Rx queue. However, it will not help anyway since
rx_vlan_strip_set_on_queue()do not save configuration changes in testpmd structures.
Thanks for your answer, I will flush the offloads of the queue in pmd as you suggested. Later, a new patch will be provided.
Quoted 19 lines
Quoted 18 lines
Quoted 18 lines
Quoted 18 lines
Quoted 18 lines
Quoted 18 lines
Quoted 4 lines
If the check is not exist, queue offloads are not updated until the next port stop/start command is executed. Right?
yes
Quoted 1 line
2) Why is the queue-based VLAN offload API not used?
VLAN offload is a port-related configuration. If a single port is changed, the associated queue needs to be all updated in configuration. Therefore, there will be no additional api to configure.
Quoted 9 lines
Like,
rte_eth_dev_set_vlan_strip_on_queue. It seems that
this kind of API is
dedicated to do this.Quoted 6 lines
Quoted 6 lines
This means that queue offloads need to upadte by re-calling
dev_configureand setup all queues, right?
If it is, this adds a usage limitation.Quoted 3 lines
app/test-pmd/cmdline.c +0
-0return ; }
Quoted 13 lines
-----Original Message-----
From: Mingjin Ye <[email protected]>
Sent: Thursday, October 27, 2022 1:10 AM
To: [email protected]
Cc: [email protected]; Zhou, YidingX <[email protected]>; Ye, MingjinX <[email protected]>; Singh, Aman Deep <[email protected]>; Zhang, Yuying <[email protected]>
Subject: [PATCH v4 1/2] app/testpmd: fix vlan offload of rxqAfter setting vlan offload in testpmd, the result is not updated to rxq. Therefore, the queue needs to be reconfigured after executing the "vlan offload" related commands.
Quoted 5 lines
Fixes a47aa8b97afe ("app/testpmd: add vlan offload support")Signed-off-by Mingjin Ye <[email protected]>---
Singh, Aman Deep
Acked-byQuoted 9 lines · ZhiminX
Quoted 9 lines
-----Original Message-----
From: Mingjin Ye <[email protected]>
Sent: Thursday, October 27, 2022 1:10 AM
To: [email protected]
Cc: [email protected]; Zhou, YidingX <[email protected]>; Ye, MingjinX <[email protected]>; Singh, Aman Deep <[email protected]>; Zhang, Yuying <[email protected]>
Subject: [PATCH v4 1/2] app/testpmd: fix vlan offload of rxq
Quoted 8 lines
Quoted 8 lines
After setting vlan offload in testpmd, the result is not updated to rxq. Therefore, the queue needs to be reconfigured after executing the "vlan offload" related commands.
Fixes a47aa8b97afe ("app/testpmd: add vlan offload support")Signed-off-by Mingjin Ye <[email protected]>
Quoted 4 lines
Quoted 1 line
---
Tested-by Zhimin Huang <[email protected] >
PATCH v5 1/2 net/ice: fix vlan offload
In reply to Mingjin YeThe vlan tag and flag in Rx descriptor are not processed on vector path, then the upper application can't fetch the tci from mbuf.
This patch is to add handling of vlan RX offloading.
v3:
* Fix macros in ice_rxtx_vec_sse.c source file.
v4:
* Fix ice_rx_desc_to_olflags_v define in ice_rxtx_vec_sse.c source file.
--- drivers/net/ice/ice_rxtx_vec_avx2.c | 135 +++++++++++++++++----- drivers/net/ice/ice_rxtx_vec_avx512.c | 154 +++++++++++++++++++++----- drivers/net/ice/ice_rxtx_vec_sse.c | 132 ++++++++++++++++------ 3 files changed, 332 insertions(+), 89 deletions(-)
drivers/net/ice/ice_rxtx_vec_avx2.c +107 -28
@@ -474,7 +474,7 @@ _ice_recv_raw_pkts_vec_avx2(struct ice_rx_queue *rxq, struct rte_mbuf **rx_pkts,* will cause performance drop to get into this context. */ if (rxq->vsi->adapter->pf.dev_data->dev_conf.rxmode.offloads & -RTE_ETH_RX_OFFLOAD_RSS_HASH ) { + (RTE_ETH_RX_OFFLOAD_RSS_HASH |RTE_ETH_RX_OFFLOAD_VLAN )) {/* load bottom half of every 32B desc */ const __m128i raw_desc_bh7 = _mm_load_si128
@@ -529,33 +529,112 @@ _ice_recv_raw_pkts_vec_avx2(struct ice_rx_queue *rxq, struct rte_mbuf **rx_pkts,* to shift the 32b RSS hash value to the * highest 32b of each 128b before mask */ -__m256i rss_hash6_7 = -_mm256_slli_epi64 (raw_desc_bh6_7,32 ); -__m256i rss_hash4_5 = -_mm256_slli_epi64 (raw_desc_bh4_5,32 ); -__m256i rss_hash2_3 = -_mm256_slli_epi64 (raw_desc_bh2_3,32 ); -__m256i rss_hash0_1 = -_mm256_slli_epi64 (raw_desc_bh0_1,32 ); - -__m256i rss_hash_msk = -_mm256_set_epi32 (0xFFFFFFFF ,0 ,0 ,0 , -0xFFFFFFFF ,0 ,0 ,0 ); - - rss_hash6_7 =_mm256_and_si256 - (rss_hash6_7, rss_hash_msk); - rss_hash4_5 =_mm256_and_si256 - (rss_hash4_5, rss_hash_msk); - rss_hash2_3 =_mm256_and_si256 - (rss_hash2_3, rss_hash_msk); - rss_hash0_1 =_mm256_and_si256 - (rss_hash0_1, rss_hash_msk); - - mb6_7 =_mm256_or_si256 (mb6_7, rss_hash6_7); - mb4_5 =_mm256_or_si256 (mb4_5, rss_hash4_5); - mb2_3 =_mm256_or_si256 (mb2_3, rss_hash2_3); - mb0_1 = _mm256_or_si256(mb0_1, rss_hash0_1); - }/* if() on RSS hash parsing */ +if (rxq->vsi->adapter->pf.dev_data->dev_conf.rxmode.offloads & +RTE_ETH_RX_OFFLOAD_RSS_HASH ) { +__m256i rss_hash6_7 = +_mm256_slli_epi64 (raw_desc_bh6_7,32 ); +__m256i rss_hash4_5 = +_mm256_slli_epi64 (raw_desc_bh4_5,32 ); +__m256i rss_hash2_3 = +_mm256_slli_epi64 (raw_desc_bh2_3,32 ); +__m256i rss_hash0_1 = +_mm256_slli_epi64 (raw_desc_bh0_1,32 ); + +__m256i rss_hash_msk = +_mm256_set_epi32 (0xFFFFFFFF ,0 ,0 ,0 , +0xFFFFFFFF ,0 ,0 ,0 ); + + rss_hash6_7 =_mm256_and_si256 + (rss_hash6_7, rss_hash_msk); + rss_hash4_5 =_mm256_and_si256 + (rss_hash4_5, rss_hash_msk); + rss_hash2_3 =_mm256_and_si256 + (rss_hash2_3, rss_hash_msk); + rss_hash0_1 =_mm256_and_si256 + (rss_hash0_1, rss_hash_msk); + + mb6_7 =_mm256_or_si256 (mb6_7, rss_hash6_7); + mb4_5 =_mm256_or_si256 (mb4_5, rss_hash4_5); + mb2_3 =_mm256_or_si256 (mb2_3, rss_hash2_3); + mb0_1 =_mm256_or_si256 (mb0_1, rss_hash0_1); + }/* if() on RSS hash parsing */ + +if (rxq->vsi->adapter->pf.dev_data->dev_conf.rxmode.offloads & +RTE_ETH_RX_OFFLOAD_VLAN ) { +/* merge the status/error-1 bits into one register */ +const __m256i status1_4_7 = +_mm256_unpacklo_epi32 (raw_desc_bh6_7, + raw_desc_bh4_5); +const __m256i status1_0_3 = +_mm256_unpacklo_epi32 (raw_desc_bh2_3, + raw_desc_bh0_1); + +const __m256i status1_0_7 = +_mm256_unpacklo_epi64 (status1_4_7, + status1_0_3); + +const __m256i l2tag2p_flag_mask = +_mm256_set1_epi32 (1 <<11 ); + +__m256i l2tag2p_flag_bits = +_mm256_and_si256 + (status1_0_7, l2tag2p_flag_mask); + + l2tag2p_flag_bits = +_mm256_srli_epi32 (l2tag2p_flag_bits, +11 ); + +__m256i vlan_flags =_mm256_setzero_si256 (); +const __m256i l2tag2_flags_shuf = +_mm256_set_epi8 (0 ,0 ,0 ,0 , +0 ,0 ,0 ,0 , +0 ,0 ,0 ,0 , +0 ,0 ,0 ,0 , +/* end up 128-bits */ +0 ,0 ,0 ,0 , +0 ,0 ,0 ,0 , +0 ,0 ,0 ,0 , +0 ,0 , +RTE_MBUF_F_RX_VLAN | +RTE_MBUF_F_RX_VLAN_STRIPPED , +0 ); + vlan_flags = +_mm256_shuffle_epi8 (l2tag2_flags_shuf, + l2tag2p_flag_bits); + +/* merge with vlan_flags */ + mbuf_flags =_mm256_or_si256 + (mbuf_flags, vlan_flags); + +/* L2TAG2_2 */ +__m256i vlan_tci6_7 = +_mm256_slli_si256 (raw_desc_bh6_7,4 ); +__m256i vlan_tci4_5 = +_mm256_slli_si256 (raw_desc_bh4_5,4 ); +__m256i vlan_tci2_3 = +_mm256_slli_si256 (raw_desc_bh2_3,4 ); +__m256i vlan_tci0_1 = +_mm256_slli_si256 (raw_desc_bh0_1,4 ); + +const __m256i vlan_tci_msk = +_mm256_set_epi32 (0 ,0xFFFF0000 ,0 ,0 , +0 ,0xFFFF0000 ,0 ,0 ); + + vlan_tci6_7 =_mm256_and_si256 + (vlan_tci6_7, vlan_tci_msk); + vlan_tci4_5 =_mm256_and_si256 + (vlan_tci4_5, vlan_tci_msk); + vlan_tci2_3 =_mm256_and_si256 + (vlan_tci2_3, vlan_tci_msk); + vlan_tci0_1 =_mm256_and_si256 + (vlan_tci0_1, vlan_tci_msk); + + mb6_7 =_mm256_or_si256 (mb6_7, vlan_tci6_7); + mb4_5 =_mm256_or_si256 (mb4_5, vlan_tci4_5); + mb2_3 =_mm256_or_si256 (mb2_3, vlan_tci2_3); + mb0_1 =_mm256_or_si256 (mb0_1, vlan_tci0_1); + } + }#endif }
drivers/net/ice/ice_rxtx_vec_avx512.c +126 -28
166 lines not on this page · raw message
drivers/net/ice/ice_rxtx_vec_sse.c +99 -33
181 lines not on this page · raw message
Signature · 1 line
2.34.1
PATCH v5 2/2 net/ice: fix vlan offload of rxq
After setting "vlan offload" in pmd, the configuration of rxq is not updated.
This patch is to sync the rxmode offload config with rxq.
--- drivers/net/ice/ice_dcf_ethdev.c | 15 +++++++++++++++ drivers/net/ice/ice_ethdev.c | 7 +++++++ 2 files changed, 22 insertions(+)
drivers/net/ice/ice_dcf_ethdev.c +15 -0
@@ -1227,6 +1227,8 @@ dcf_dev_vlan_offload_set_v2(struct rte_eth_dev *dev, int mask)struct ice_dcf_hw *hw = &adapter->real_hw;bool enable;int err; +size_t queue_idx; +struct ice_rx_queue *rxq;if (mask &RTE_ETH_VLAN_FILTER_MASK ) { enable = !!(rxmode->offloads &RTE_ETH_RX_OFFLOAD_VLAN_FILTER );
@@ -1245,6 +1247,11 @@ dcf_dev_vlan_offload_set_v2(struct rte_eth_dev *dev, int mask)return -EIO ; } +for (queue_idx =0 ; queue_idx < dev->data->nb_rx_queues; queue_idx++) { + rxq = dev->data->rx_queues[queue_idx]; + rxq->offloads = rxmode->offloads; + } +return 0 ; }
@@ -1287,6 +1294,8 @@ dcf_dev_vlan_offload_set(struct rte_eth_dev *dev, int mask)struct ice_dcf_adapter *adapter = dev->data->dev_private;struct ice_dcf_hw *hw = &adapter->real_hw;int err; +size_t queue_idx; +struct ice_rx_queue *rxq;if (hw->vf_res->vf_cap_flags &VIRTCHNL_VF_OFFLOAD_VLAN_V2 )return dcf_dev_vlan_offload_set_v2 (dev, mask);
@@ -1305,6 +1314,12 @@ dcf_dev_vlan_offload_set(struct rte_eth_dev *dev, int mask)if (err)return -EIO ; } + +for (queue_idx =0 ; queue_idx < dev->data->nb_rx_queues; queue_idx++) { + rxq = dev->data->rx_queues[queue_idx]; + rxq->offloads = dev_conf->rxmode.offloads; + } +return 0 ; }
drivers/net/ice/ice_ethdev.c +7 -0
@@ -4501,6 +4501,8 @@ ice_vlan_offload_set(struct rte_eth_dev *dev, int mask)struct ice_pf *pf =ICE_DEV_PRIVATE_TO_PF (dev->data->dev_private);struct ice_vsi *vsi = pf->main_vsi;struct rte_eth_rxmode *rxmode; +size_t queue_idx; +struct ice_rx_queue *rxq; rxmode = &dev->data->dev_conf.rxmode;if (mask &RTE_ETH_VLAN_FILTER_MASK ) {
@@ -4517,6 +4519,11 @@ ice_vlan_offload_set(struct rte_eth_dev *dev, int mask)ice_vsi_config_vlan_stripping (vsi, false); } +for (queue_idx =0 ; queue_idx < dev->data->nb_rx_queues; queue_idx++) { + rxq = dev->data->rx_queues[queue_idx]; + rxq->offloads = rxmode->offloads; + } +return 0 ; }
Signature · 1 line
2.34.1
RE: [PATCH v5 2/2] net/ice: fix vlan offload of rxq
Quoted 13 lines
-----Original Message-----
From: Mingjin Ye <[email protected]>
Sent: Tuesday, November 8, 2022 9:28 PM
To: [email protected]
Cc: Yang, Qiming <[email protected]>; [email protected]; Zhou, YidingX <[email protected]>; Ye, MingjinX <[email protected]>; Zhang, Qi Z <[email protected]>; Ferruh Yigit <[email protected]>; Wu, Jingjing <[email protected]>; Li, Xiaoyun <[email protected]>; Lu, Wenzhuo <[email protected]>
Subject: [PATCH v5 2/2] net/ice: fix vlan offload of rxqAfter setting "vlan offload" in pmd, the configuration of rxq is not updated.
Quoted 7 lines
This patch is to sync the rxmode offload config with rxq.
Fixes e0dcf94a0d7f ("net/ice: support VLAN ops")Signed-off-by Mingjin Ye <[email protected]>---
PATCH v6 1/1 doc: add PMD known issue
In reply to Mingjin YeAdd a known issue: Rx path dynamic routing is not supported for PMD.
--- doc/guides/nics/ice.rst | 17 +++++++++++++++++ 1 file changed, 17 insertions(+)
doc/guides/nics/ice.rst +17 -0
@@ -395,3 +395,20 @@ file is used by both the kernel driver and the DPDK PMD. Windows support: The DDP package is not supported on Windows so, loading of the package is disabled on Windows. + +ice: Rx path is not supported after PF or DCF add vlan offload +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + +If pmd does not enable Vlan offload during initialization, it will +automatically select Rx paths that do not support offload. Even if +Vlan offload is subsequently enabled through the API, Vlan offload +will not work because the selected Rx path does not support Vlan +offload. + +Rx path dynamic routing is not supported. When the offload features is +switched, the queue needs to be reconfigured, then takes effect. It would +take additional workload for the network card to deal with. + +When applying VLAN offload on the PF or DCF, it must be configured +firstly by the startup parameters. +
Signature · 1 line
2.34.1
RE: [PATCH v6] doc: add PMD known issue
Hi All,
Could you please review and provide suggestions if any.
Thanks,
Mingjin
Quoted 49 lines
-----Original Message-----
From: Ye, MingjinX <[email protected]>
Sent: 2022年11月21日 10:55
To: [email protected]
Cc: Yang, Qiming <[email protected]>; [email protected]; Zhou, YidingX <[email protected]>; Ye, MingjinX <[email protected]>; Zhang, Qi Z <[email protected]>; Jie Zhou <[email protected]>; Menon, Ranjit <[email protected]>; Ferruh Yigit <[email protected]>; Kadam, Pallavi <[email protected]>
Subject: [PATCH v6] doc: add PMD known issueAdd a known issue: Rx path dynamic routing is not supported for PMD.
Fixes de853a3bb151 ("net/ice: disable DDP package on Windows")Signed-off-by Mingjin Ye <[email protected]>--- doc/guides/nics/ice.rst | 17 +++++++++++++++++ 1 file changed, 17 insertions(+)doc/guides/nics/ice.rst index renamed from doc/guides/nics/ice.rst +0
-0
ce075e067c..60fd7834ed100644doc/guides/nics/ice.rst +0
-0@@ -395,3 +395,20 @@ file is used by both the kernel driver and the DPDKPMD.
Windows support: The DDP package is not supported on Windows so, loading of the package is disabled on Windows.
doc/guides/nics/ice.rst +3
-0+ +ice: Rx path is not supported after PF or DCF add vlan offload +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
doc/guides/nics/ice.rst +13
-1+ +If pmd does not enable Vlan offload during initialization, it will +automatically select Rx paths that do not support offload. Even if Vlan +offload is subsequently enabled through the API, Vlan offload will not +work because the selected Rx path does not support Vlan offload. + +Rx path dynamic routing is not supported. When the offload features is +switched, the queue needs to be reconfigured, then takes effect. It +would take additional workload for the network card to deal with. + +When applying VLAN offload on the PF or DCF, it must be configured +firstly by the startup parameters. + --2.34.1
RE: [PATCH v6] doc: add PMD known issue
Hi All,
Could you please review and provide suggestions if any.
Thanks,
Mingjin
Quoted 51 lines
Quoted 32 lines
-----Original Message-----
From: Ye, MingjinX <[email protected]>
Sent: 2022年11月21日 10:55
To: [email protected]
Cc: Yang, Qiming <[email protected]>; [email protected]; Zhou, YidingX <[email protected]>; Ye, MingjinX <[email protected]>; Zhang, Qi Z <[email protected]>; Jie Zhou <[email protected]>; Menon, Ranjit <[email protected]>; Ferruh Yigit <[email protected]>; Kadam, Pallavi <[email protected]>
Subject: [PATCH v6] doc: add PMD known issueAdd a known issue: Rx path dynamic routing is not supported for PMD.
Fixes de853a3bb151 ("net/ice: disable DDP package on Windows")Signed-off-by Mingjin Ye <[email protected]>--- doc/guides/nics/ice.rst | 17 +++++++++++++++++ 1 file changed, 17 insertions(+)doc/guides/nics/ice.rst index renamed from doc/guides/nics/ice.rst +0
-0
ce075e067c..60fd7834ed100644doc/guides/nics/ice.rst +0
-0@@ -395,3 +395,20 @@ file is used by both the kernel driver and theDPDK PMD.
Windows support: The DDP package is not supported on Windows so, loading of the package is disabled on Windows.
doc/guides/nics/ice.rst file is used by both the kernel driver and the DPDK PMD. · line 399
Quoted 2 lines
doc/guides/nics/ice.rst +2
-0+ +ice: Rx path is not supported after PF or DCF add vlan offload+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Quoted 16 lines
~~~~~
doc/guides/nics/ice.rst +13
-1+ +If pmd does not enable Vlan offload during initialization, it will +automatically select Rx paths that do not support offload. Even if +Vlan offload is subsequently enabled through the API, Vlan offload +will not work because the selected Rx path does not support Vlan offload. + +Rx path dynamic routing is not supported. When the offload features +is switched, the queue needs to be reconfigured, then takes effect. +It would take additional workload for the network card to deal with. + +When applying VLAN offload on the PF or DCF, it must be configured +firstly by the startup parameters. + --2.34.1
RE: [PATCH v6] doc: add PMD known issue
In reply to Mingjin YeQuoted 36 lines
-----Original Message-----
From: Ye, MingjinX <[email protected]>
Sent: Monday, November 21, 2022 10:55 AM
To: [email protected]
Cc: Yang, Qiming <[email protected]>; [email protected]; Zhou, YidingX <[email protected]>; Ye, MingjinX <[email protected]>; Zhang, Qi Z <[email protected]>; Jie Zhou <[email protected]>; Menon, Ranjit <[email protected]>; Ferruh Yigit <[email protected]>; Kadam, Pallavi <[email protected]>
Subject: [PATCH v6] doc: add PMD known issueAdd a known issue: Rx path dynamic routing is not supported for PMD.
Fixes de853a3bb151 ("net/ice: disable DDP package on Windows")Signed-off-by Mingjin Ye <[email protected]>--- doc/guides/nics/ice.rst | 17 +++++++++++++++++ 1 file changed, 17 insertions(+)doc/guides/nics/ice.rst index renamed from doc/guides/nics/ice.rst +0
-0
ce075e067c..60fd7834ed100644doc/guides/nics/ice.rst +0
-0@@ -395,3 +395,20 @@ file is used by both the kernel driver and the DPDKPMD.
Windows support: The DDP package is not supported on Windows so, loading of the package is disabled on Windows.
doc/guides/nics/ice.rst +3
-0+ +ice: Rx path is not supported after PF or DCF add vlan offload +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
doc/guides/nics/ice.rst
Quoted 9 lines
doc/guides/nics/ice.rst +9
-0+ +If pmd does not enable Vlan offload during initialization, it will +automatically select Rx paths that do not support offload. Even if Vlan +offload is subsequently enabled through the API, Vlan offload will not +work because the selected Rx path does not support Vlan offload. + +Rx path dynamic routing is not supported. When the offload features is +switched, the queue needs to be reconfigured, then takes effect. It +would take additional workload for the network card to deal with.
If offload features is switched, we need to re-configure the queue, this does not looks like a limitation. Better to describe this from APIs calls
doc/guides/nics/ice.rst file is used by both the kernel driver and the DPDK PMD. · line 413
Quoted 3 lines
doc/guides/nics/ice.rst +3
-0+ +When applying VLAN offload on the PF or DCF, it must be configured +firstly by the startup parameters.
Better to explain what is the startup parameter precisely.
Quoted 3 lines
+
--
2.34.1
RE: [PATCH v6] doc: add PMD known issue
Quoted 50 lines
-----Original Message-----
From: Zhang, Qi Z <[email protected]>
Sent: 2022年12月13日 9:41
To: Ye, MingjinX <[email protected]>; [email protected]
Cc: Yang, Qiming <[email protected]>; [email protected]; Zhou, YidingX <[email protected]>; Jie Zhou <[email protected]>; Menon, Ranjit <[email protected]>; Ferruh Yigit <[email protected]>; Kadam, Pallavi <[email protected]>
Subject: RE: [PATCH v6] doc: add PMD known issueQuoted 32 lines
-----Original Message-----
From: Ye, MingjinX <[email protected]>
Sent: Monday, November 21, 2022 10:55 AM
To: [email protected]
Cc: Yang, Qiming <[email protected]>; [email protected]; Zhou, YidingX <[email protected]>; Ye, MingjinX <[email protected]>; Zhang, Qi Z <[email protected]>; Jie Zhou <[email protected]>; Menon, Ranjit <[email protected]>; Ferruh Yigit <[email protected]>; Kadam, Pallavi <[email protected]>
Subject: [PATCH v6] doc: add PMD known issueAdd a known issue: Rx path dynamic routing is not supported for PMD.
Fixes de853a3bb151 ("net/ice: disable DDP package on Windows")Signed-off-by Mingjin Ye <[email protected]>--- doc/guides/nics/ice.rst | 17 +++++++++++++++++ 1 file changed, 17 insertions(+)doc/guides/nics/ice.rst index renamed from doc/guides/nics/ice.rst +0
-0
ce075e067c..60fd7834ed100644doc/guides/nics/ice.rst +0
-0@@ -395,3 +395,20 @@ file is used by both the kernel driver and theDPDK PMD.
Windows support: The DDP package is not supported on Windows so, loading of the package is disabled on Windows.
doc/guides/nics/ice.rst file is used by both the kernel driver and the DPDK PMD. · line 399
Quoted 2 lines
doc/guides/nics/ice.rst +2
-0+ +ice: Rx path is not supported after PF or DCF add vlan offload+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
~~~~
Quoted 13 lines
doc/guides/nics/ice.rst file is used by both the kernel driver and the DPDK PMD.
Quoted 10 lines
~
doc/guides/nics/ice.rst +9
-0+ +If pmd does not enable Vlan offload during initialization, it will +automatically select Rx paths that do not support offload. Even if +Vlan offload is subsequently enabled through the API, Vlan offload +will not work because the selected Rx path does not support Vlan offload. + +Rx path dynamic routing is not supported. When the offload features +is switched, the queue needs to be reconfigured, then takes effect. +It would take additional workload for the network card to deal with.If offload features is switched, we need to re-configure the queue, this does not looks like a limitation.
Lihuisong<[email protected]> thinks this is a limitation, and Andrew Rybchenko <[email protected]> agrees.
Quoted 1 line
Better to describe this from APIs calls
I will add a description.
Quoted 6 lines
doc/guides/nics/ice.rst file is used by both the kernel driver and the DPDK PMD. · line 413
Quoted 4 lines
doc/guides/nics/ice.rst +3
-0+ +When applying VLAN offload on the PF or DCF, it must be configured +firstly by the startup parameters.Better to explain what is the startup parameter precisely.
I will add a description of the startup parameters.
Quoted 4 lines
Quoted 4 lines
+
--
2.34.1
PATCH v7 1/1 doc: add PMD known issue
In reply to Mingjin YeAdd a known issue: Rx path dynamic routing is not supported for PMD.
--- doc/guides/nics/ice.rst | 23 +++++++++++++++++++++++ 1 file changed, 23 insertions(+)
doc/guides/nics/ice.rst +23 -0
@@ -395,3 +395,26 @@ file is used by both the kernel driver and the DPDK PMD. Windows support: The DDP package is not supported on Windows so, loading of the package is disabled on Windows. + +ice: Rx path is not supported after PF or DCF add vlan offload +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + +If pmd does not enable Vlan offload during initialization, it will +automatically select Rx paths that do not support offload. Even if +Vlan offload is subsequently enabled through the API, Vlan offload +will not work because the selected Rx path does not support Vlan +offload. + +cmd_vlan_offload_parsed() goes down to the follow ethdev API functions: + - rte_eth_dev_set_vlan_strip_on_queue() + - rte_eth_dev_set_vlan_offload() +These functions add offload settings when the port is started, running, +and processing traffic. At this time, ``rte_eth_rx_queue_setup`` api is +needed to reroute rxq to the RX path with offload function. But at this +time, it is possible that the original Rx path is handling packages, so +this is not thread-safe. + +When applying offload on the PF or DCF, starting the ``testpmd`` +application, use the ``--rx-offloads`` startup parameter to force the +dpdk lib to choose the Rx path with the offload function by default. +
Signature · 1 line
2.34.1
PATCH v7 1/1 doc: add PMD known issue
In reply to Mingjin YeAdd a known issue: Rx path dynamic routing is not supported for PMD.
--- doc/guides/nics/ice.rst | 23 +++++++++++++++++++++++ 1 file changed, 23 insertions(+)
doc/guides/nics/ice.rst +23 -0
@@ -395,3 +395,26 @@ file is used by both the kernel driver and the DPDK PMD. Windows support: The DDP package is not supported on Windows so, loading of the package is disabled on Windows. + +ice: Rx path is not supported after PF or DCF add vlan offload +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + +If pmd does not enable Vlan offload during initialization, it will +automatically select Rx paths that do not support offload. Even if +Vlan offload is subsequently enabled through the API, Vlan offload +will not work because the selected Rx path does not support Vlan +offload. + +cmd_vlan_offload_parsed() goes down to the follow ethdev API functions: + - rte_eth_dev_set_vlan_strip_on_queue() + - rte_eth_dev_set_vlan_offload() +These functions add offload settings when the port is started, running +and processing traffic. At this time, ``rte_eth_rx_queue_setup`` api is +needed to reroute rxq to the RX path with offload function. But at this +time, it is possible that the original Rx path is handling packages, so +this is not thread-safe. + +When applying offload on the PF or DCF, starting the ``testpmd`` +application, use the ``--rx-offloads`` startup parameter to force the +dpdk lib to choose the Rx path with the offload function by default. +
Signature · 1 line
2.34.1
PATCH v7 1/1 doc: add PMD known issue
In reply to Mingjin YeAdd a known issue: Rx path dynamic routing is not supported for PMD.
--- doc/guides/nics/ice.rst | 24 ++++++++++++++++++++++++ 1 file changed, 24 insertions(+)
doc/guides/nics/ice.rst +24 -0
@@ -395,3 +395,27 @@ file is used by both the kernel driver and the DPDK PMD. Windows support: The DDP package is not supported on Windows so, loading of the package is disabled on Windows. + +ice: Rx path is not supported after PF or DCF add vlan offload +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + +If pmd does not enable Vlan offload during initialization, it will +automatically select Rx paths that do not support offload. Even if +Vlan offload is subsequently enabled through the API, Vlan offload +will not work because the selected Rx path does not support Vlan +offload. + +cmd_vlan_offload_parsed() goes down to the follow ethdev API functions: + - rte_eth_dev_set_vlan_strip_on_queue() + - rte_eth_dev_set_vlan_offload() + +These functions add offload settings when the port is started, running +and processing traffic. At this time, ``rte_eth_rx_queue_setup`` api is +needed to reroute rxq to the RX path with offload function. But at this +time, it is possible that the original Rx path is handling packages, so +this is not thread-safe. + +When applying offload on the PF or DCF, starting the ``testpmd`` +application, use the ``--rx-offloads`` startup parameter to force the +dpdk lib to choose the Rx path with the offload function by default. +
Signature · 1 line
2.34.1
Re: [PATCH v7] doc: add PMD known issue
Quoted 14 lines · On Tue, 27 Dec 2022 17:00:40 +0800 Mingjin Ye <[email protected]> wrote:
doc/guides/nics/ice.rst +14
-0+ +ice: Rx path is not supported after PF or DCF add vlan offload +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + +If pmd does not enable Vlan offload during initialization, it will +automatically select Rx paths that do not support offload. Even if +Vlan offload is subsequently enabled through the API, Vlan offload +will not work because the selected Rx path does not support Vlan +offload. + +cmd_vlan_offload_parsed() goes down to the follow ethdev API functions: + - rte_eth_dev_set_vlan_strip_on_queue() + - rte_eth_dev_set_vlan_offload() +
doc/guides/nics/ice.rst file is used by both the kernel driver and the DPDK PMD. · line 421
Quoted 10 lines
doc/guides/nics/ice.rst +10
-0+These functions add offload settings when the port is started, running +and processing traffic. At this time, ``rte_eth_rx_queue_setup`` api is +needed to reroute rxq to the RX path with offload function. But at this +time, it is possible that the original Rx path is handling packages, so +this is not thread-safe. + +When applying offload on the PF or DCF, starting the ``testpmd`` +application, use the ``--rx-offloads`` startup parameter to force the +dpdk lib to choose the Rx path with the offload function by default. +
This seems like just making excuses in the documentation for something that should be fixed instead.
This situation is probably common to many PMD's. Ideally, the drivers should reject changes to settings after device is started if they can not support it.
PATCH v8 1/1 doc: add PMD known issue
In reply to Mingjin YeAdd a known issue: Rx path dynamic change is not supported for PMD.
--- doc/guides/nics/ice.rst | 12 ++++++++++++ 1 file changed, 12 insertions(+)
doc/guides/nics/ice.rst +12 -0
@@ -395,3 +395,15 @@ file is used by both the kernel driver and the DPDK PMD. Windows support: The DDP package is not supported on Windows so, loading of the package is disabled on Windows. + +ice: Rx path does not support dynamic change +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + +The ice driver supports fast and offload rx path. When pmd is initialized, +the fast rx path is selected by default. Even if offload is subsequently +enabled through the API, which will not work because the past rx path is +still used. + +The ice driver does not support to change the rx path after application +is initialized. If HW offload is required, the ``--rx-offloads`` parameter +should be used to choose the offload Rx path by default.
Signature · 1 line
2.34.1
Re: [PATCH v8] doc: add PMD known issue
Quoted 20 lines · On Sat, 28 Jan 2023 06:01:38 +0000 Mingjin Ye <[email protected]> wrote:
Add a known issue: Rx path dynamic change is not supported for PMD.
Fixes de853a3bb151 ("net/ice: disable DDP package on Windows")Signed-off-by Mingjin Ye <[email protected]>--- doc/guides/nics/ice.rst | 12 ++++++++++++ 1 file changed, 12 insertions(+)doc/guides/nics/ice.rst +2
-0@@ -395,3 +395,15 @@ file is used by both the kernel driver and the DPDK PMD. Windows support: The DDP package is not supported on Windows so, loading of the package is disabled on Windows. + +ice: Rx path does not support dynamic change
doc/guides/nics/ice.rst file is used by both the kernel driver and the DPDK PMD. · line 409
Quoted 10 lines
doc/guides/nics/ice.rst +10
-0+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + +The ice driver supports fast and offload rx path. When pmd is initialized, +the fast rx path is selected by default. Even if offload is subsequently +enabled through the API, which will not work because the past rx path is +still used. + +The ice driver does not support to change the rx path after application +is initialized. If HW offload is required, the ``--rx-offloads`` parameter +should be used to choose the offload Rx path by default.
Is this when the device is stopped, or running.
Dynamic configuration of offload parameters is not safe on many devices. Usually the device driver requires the device not be started to change offloads.
The driver should reject in the API things it does not support.
RE: [PATCH v8] doc: add PMD known issue
Quoted 47 lines
-----Original Message-----
From: Stephen Hemminger <[email protected]>
Sent: 2023年1月29日 1:18
To: Ye, MingjinX <[email protected]>
Cc: [email protected]; Yang, Qiming <[email protected]>; [email protected]; Zhou, YidingX <[email protected]>; Zhang, Qi Z <[email protected]>
Subject: Re: [PATCH v8] doc: add PMD known issuedoc/guides/nics/ice.rst file is used by both the kernel driver and the DPDK
Quoted 15 lines · On Sat, 28 Jan 2023 06:01:38 +0000 Mingjin Ye <[email protected]> wrote:
Add a known issue: Rx path dynamic change is not supported for PMD.
Fixes de853a3bb151 ("net/ice: disable DDP package on Windows")Signed-off-by Mingjin Ye <[email protected]>--- doc/guides/nics/ice.rst | 12 ++++++++++++ 1 file changed, 12 insertions(+)doc/guides/nics/ice.rst index renamed from doc/guides/nics/ice.rst +0
-0
ce075e067c..115625523e100644doc/guides/nics/ice.rst +0
-0@@ -395,3 +395,15 @@ file is used by both the kernel driver and the DPDKPMD.
Quoted 5 lines
doc/guides/nics/ice.rst +2
-0Windows support: The DDP package is not supported on Windows so, loading of the package is disabled on Windows. + +ice: Rx path does not support dynamic changedoc/guides/nics/ice.rst file is used by both the kernel driver and the DPDK PMD.
Quoted 10 lines
doc/guides/nics/ice.rst +10
-0+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + +The ice driver supports fast and offload rx path. When pmd is +initialized, the fast rx path is selected by default. Even if offload +is subsequently enabled through the API, which will not work because +the past rx path is still used. + +The ice driver does not support to change the rx path after +application is initialized. If HW offload is required, the +``--rx-offloads`` parameter should be used to choose the offload Rx pathby default.
Quoted 6 lines
Is this when the device is stopped, or running.
Dynamic configuration of offload parameters is not safe on many devices. Usually the device driver requires the device not be started to change offloads.The driver should reject in the API things it does not support.
Thank you for your suggestion. I will review this issue with the reporter.
RE: [PATCH v5 1/2] net/ice: fix vlan offload
In reply to Mingjin YeQuoted 29 lines
-----Original Message-----
From: Mingjin Ye <[email protected]>
Sent: Tuesday, November 8, 2022 9:28 PM
To: [email protected]
Cc: Yang, Qiming <[email protected]>; [email protected]; Zhou, YidingX <[email protected]>; Ye, MingjinX <[email protected]>; Richardson, Bruce <[email protected]>; Konstantin Ananyev <[email protected]>; Zhang, Qi Z <[email protected]>; Lu, Wenzhuo <[email protected]>; Junyu Jiang <[email protected]>; Rong, Leyi <[email protected]>; Ajit Khaparde <[email protected]>; Jerin Jacob <[email protected]>; Xu, Rosen <[email protected]>; Hemant Agrawal <[email protected]>; Wisam Jaddo <[email protected]>
Subject: [PATCH v5 1/2] net/ice: fix vlan offloadThe vlan tag and flag in Rx descriptor are not processed on vector path, then the upper application can't fetch the tci from mbuf.
This patch is to add handling of vlan RX offloading.
Fixes c68a52b8b38c ("net/ice: support vector SSE in Rx")Fixes ece1f8a8f1c8 ("net/ice: switch to flexible descriptor in SSE path")Fixes 12443386a0b0 ("net/ice: support flex Rx descriptor RxDID22")Fixes 214f452f7d5f ("net/ice: add AVX2 offload Rx")Fixes 7f85d5ebcfe1 ("net/ice: add AVX512 vector path")Fixes 295968d17407 ("ethdev: add namespace")Fixes 808a17b3c1e6 ("net/ice: add Rx AVX512 offload path")
Quoted 2 lines
Signed-off-by Mingjin Ye <[email protected]>
RE: [PATCH v5 1/2] net/ice: fix vlan offload
In reply to Mingjin YeHi ALL,
Could you please review and provide suggestions if any.
Thanks,
Mingjin
Quoted 701 lines
-----Original Message-----
From: Ye, MingjinX <[email protected]>
Sent: 2022年11月8日 21:28
To: [email protected]
Cc: Yang, Qiming <[email protected]>; [email protected]; Zhou, YidingX <[email protected]>; Ye, MingjinX <[email protected]>; Richardson, Bruce <[email protected]>; Konstantin Ananyev <[email protected]>; Zhang, Qi Z <[email protected]>; Lu, Wenzhuo <[email protected]>; Junyu Jiang <[email protected]>; Rong, Leyi <[email protected]>; Ajit Khaparde <[email protected]>; Jerin Jacob <[email protected]>; Xu, Rosen <[email protected]>; Hemant Agrawal <[email protected]>; Wisam Jaddo <[email protected]>
Subject: [PATCH v5 1/2] net/ice: fix vlan offloadThe vlan tag and flag in Rx descriptor are not processed on vector path, then the upper application can't fetch the tci from mbuf.
This patch is to add handling of vlan RX offloading.
Fixes c68a52b8b38c ("net/ice: support vector SSE in Rx")Fixes ece1f8a8f1c8 ("net/ice: switch to flexible descriptor in SSE path")Fixes 12443386a0b0 ("net/ice: support flex Rx descriptor RxDID22")Fixes 214f452f7d5f ("net/ice: add AVX2 offload Rx")Fixes 7f85d5ebcfe1 ("net/ice: add AVX512 vector path")Fixes 295968d17407 ("ethdev: add namespace")Fixes 808a17b3c1e6 ("net/ice: add Rx AVX512 offload path")Signed-off-by Mingjin Ye <[email protected]>v3:
* Fix macros inice_rxtx_vec_sse.csource file.
v4:
* Fixice_rx_desc_to_olflags_vdefine inice_rxtx_vec_sse.csource
file.--- drivers/net/ice/ice_rxtx_vec_avx2.c | 135 +++++++++++++++++----- drivers/net/ice/ice_rxtx_vec_avx512.c | 154 +++++++++++++++++++++----- drivers/net/ice/ice_rxtx_vec_sse.c | 132 ++++++++++++++++------ 3 files changed, 332 insertions(+), 89 deletions(-)drivers/net/ice/ice_rxtx_vec_avx2.c +0
-0@@ -474,7 +474,7 @@ _ice_recv_raw_pkts_vec_avx2(struct ice_rx_queue *rxq, struct rte_mbuf **rx_pkts, * will cause performance drop to get into thiscontext.
drivers/net/ice/ice_rxtx_vec_avx2.c +0
-0*/ if (rxq->vsi->adapter->pf.dev_data-Quoted 1 line
dev_conf.rxmode.offloads &
drivers/net/ice/ice_rxtx_vec_avx2.c +1
-1- RTE_ETH_RX_OFFLOAD_RSS_HASH) { + (RTE_ETH_RX_OFFLOAD_RSS_HASH |
RTE_ETH_RX_OFFLOAD_VLAN)) {drivers/net/ice/ice_rxtx_vec_avx2.c +0
-24/* load bottom half of every 32B desc */ const __m128i raw_desc_bh7 = _mm_load_si128@@ -529,33 +529,112 @@ _ice_recv_raw_pkts_vec_avx2(structice_rx_queue *rxq, struct rte_mbuf **rx_pkts, * to shift the 32b RSS hash value to the * highest 32b of each 128b before mask */ -__m256i rss_hash6_7 = -_mm256_slli_epi64 (raw_desc_bh6_7, 32); -__m256i rss_hash4_5 = -_mm256_slli_epi64 (raw_desc_bh4_5, 32); -__m256i rss_hash2_3 = -_mm256_slli_epi64 (raw_desc_bh2_3, 32); -__m256i rss_hash0_1 = -_mm256_slli_epi64 (raw_desc_bh0_1, 32); - -__m256i rss_hash_msk = -_mm256_set_epi32 (0xFFFFFFFF ,0 ,0 ,0 , -0xFFFFFFFF ,0 ,0 ,0 ); - - rss_hash6_7 =_mm256_and_si256 - (rss_hash6_7, rss_hash_msk); - rss_hash4_5 =_mm256_and_si256 - (rss_hash4_5, rss_hash_msk); - rss_hash2_3 =_mm256_and_si256 - (rss_hash2_3, rss_hash_msk); - rss_hash0_1 =_mm256_and_si256 - (rss_hash0_1, rss_hash_msk); - - mb6_7 =_mm256_or_si256 (mb6_7, rss_hash6_7); - mb4_5 = _mm256_or_si256(mb4_5,
rss_hash4_5);drivers/net/ice/ice_rxtx_vec_avx2.c +0
-1- mb2_3 = _mm256_or_si256(mb2_3,
rss_hash2_3);drivers/net/ice/ice_rxtx_vec_avx2.c +0
-1- mb0_1 = _mm256_or_si256(mb0_1,
rss_hash0_1);drivers/net/ice/ice_rxtx_vec_avx2.c +1
-1- }/* if() on RSS hash parsing */ + if (rxq->vsi->adapter->pf.dev_data-Quoted 1 line
dev_conf.rxmode.offloads &
+
RTE_ETH_RX_OFFLOAD_RSS_HASH) {drivers/net/ice/ice_rxtx_vec_avx2.c +2
-0+ __m256i rss_hash6_7 = +_mm256_slli_epi64(raw_desc_bh6_7, 32);drivers/net/ice/ice_rxtx_vec_avx2.c +2
-0+ __m256i rss_hash4_5 = +_mm256_slli_epi64(raw_desc_bh4_5, 32);drivers/net/ice/ice_rxtx_vec_avx2.c +2
-0+ __m256i rss_hash2_3 = +_mm256_slli_epi64(raw_desc_bh2_3, 32);drivers/net/ice/ice_rxtx_vec_avx2.c +2
-0+ __m256i rss_hash0_1 = +_mm256_slli_epi64(raw_desc_bh0_1, 32);drivers/net/ice/ice_rxtx_vec_avx2.c +3
-0+ + __m256i rss_hash_msk = +_mm256_set_epi32(0xFFFFFFFF, 0, 0, 0,drivers/net/ice/ice_rxtx_vec_avx2.c +1
-0+ 0xFFFFFFFF, 0,0, 0);
drivers/net/ice/ice_rxtx_vec_avx2.c +3
-0+ + rss_hash6_7 = _mm256_and_si256 + (rss_hash6_7,
rss_hash_msk);drivers/net/ice/ice_rxtx_vec_avx2.c +2
-0+ rss_hash4_5 = _mm256_and_si256 + (rss_hash4_5,
rss_hash_msk);drivers/net/ice/ice_rxtx_vec_avx2.c +2
-0+ rss_hash2_3 = _mm256_and_si256 + (rss_hash2_3,
rss_hash_msk);drivers/net/ice/ice_rxtx_vec_avx2.c +2
-0+ rss_hash0_1 = _mm256_and_si256 + (rss_hash0_1,
rss_hash_msk);drivers/net/ice/ice_rxtx_vec_avx2.c +2
-0+ + mb6_7 = _mm256_or_si256(mb6_7,
rss_hash6_7);drivers/net/ice/ice_rxtx_vec_avx2.c +1
-0+ mb4_5 = _mm256_or_si256(mb4_5,
rss_hash4_5);drivers/net/ice/ice_rxtx_vec_avx2.c +1
-0+ mb2_3 = _mm256_or_si256(mb2_3,
rss_hash2_3);drivers/net/ice/ice_rxtx_vec_avx2.c +1
-0+ mb0_1 = _mm256_or_si256(mb0_1,
rss_hash0_1);drivers/net/ice/ice_rxtx_vec_avx2.c +3
-0+ }/* if() on RSS hash parsing */ + + if (rxq->vsi->adapter->pf.dev_data-Quoted 1 line
dev_conf.rxmode.offloads &
+
RTE_ETH_RX_OFFLOAD_VLAN) {drivers/net/ice/ice_rxtx_vec_avx2.c +1
-0+/* merge the status/error-1 bits into one register */
drivers/net/ice/ice_rxtx_vec_avx2.c +2
-0+ const __m256i status1_4_7 = +_mm256_unpacklo_epi32(raw_desc_bh6_7,drivers/net/ice/ice_rxtx_vec_avx2.c +3
-0+ raw_desc_bh4_5); + const __m256i status1_0_3 = +_mm256_unpacklo_epi32(raw_desc_bh2_3,drivers/net/ice/ice_rxtx_vec_avx2.c +4
-0+ raw_desc_bh0_1); + + const __m256i status1_0_7 = +_mm256_unpacklo_epi64(status1_4_7,drivers/net/ice/ice_rxtx_vec_avx2.c +4
-0+ status1_0_3); + + const __m256i l2tag2p_flag_mask = +_mm256_set1_epi32(1 << 11);drivers/net/ice/ice_rxtx_vec_avx2.c +4
-0+ +__m256i l2tag2p_flag_bits = + _mm256_and_si256 + (status1_0_7,
l2tag2p_flag_mask);drivers/net/ice/ice_rxtx_vec_avx2.c +3
-0+ + l2tag2p_flag_bits = +_mm256_srli_epi32(l2tag2p_flag_bits,drivers/net/ice/ice_rxtx_vec_avx2.c +3
-0+ 11); + + __m256i vlan_flags =
_mm256_setzero_si256();drivers/net/ice/ice_rxtx_vec_avx2.c +2
-0+const __m256i l2tag2_flags_shuf = + _mm256_set_epi8(0,0, 0, 0,
drivers/net/ice/ice_rxtx_vec_avx2.c +1
-0+ 0, 0, 0,0,
drivers/net/ice/ice_rxtx_vec_avx2.c +1
-0+ 0, 0, 0,0,
drivers/net/ice/ice_rxtx_vec_avx2.c +1
-0+ 0, 0, 0,0,
drivers/net/ice/ice_rxtx_vec_avx2.c +1
-0+/* end up 128-bits */
drivers/net/ice/ice_rxtx_vec_avx2.c +1
-0+ 0, 0, 0,0,
drivers/net/ice/ice_rxtx_vec_avx2.c +1
-0+ 0, 0, 0,0,
drivers/net/ice/ice_rxtx_vec_avx2.c +1
-0+ 0, 0, 0,0,
drivers/net/ice/ice_rxtx_vec_avx2.c +2
-0+ 0, 0, +
RTE_MBUF_F_RX_VLAN|
+
RTE_MBUF_F_RX_VLAN_STRIPPED,drivers/net/ice/ice_rxtx_vec_avx2.c +3
-0+ 0); + vlan_flags = +_mm256_shuffle_epi8(l2tag2_flags_shuf,drivers/net/ice/ice_rxtx_vec_avx2.c +5
-0+ l2tag2p_flag_bits); + +/* merge with vlan_flags */ + mbuf_flags = _mm256_or_si256 + (mbuf_flags,
vlan_flags);drivers/net/ice/ice_rxtx_vec_avx2.c +4
-0+ +/* L2TAG2_2 */ + __m256i vlan_tci6_7 = +_mm256_slli_si256(raw_desc_bh6_7, 4);drivers/net/ice/ice_rxtx_vec_avx2.c +2
-0+ __m256i vlan_tci4_5 = +_mm256_slli_si256(raw_desc_bh4_5, 4);drivers/net/ice/ice_rxtx_vec_avx2.c +2
-0+ __m256i vlan_tci2_3 = +_mm256_slli_si256(raw_desc_bh2_3, 4);drivers/net/ice/ice_rxtx_vec_avx2.c +2
-0+ __m256i vlan_tci0_1 = +_mm256_slli_si256(raw_desc_bh0_1, 4);drivers/net/ice/ice_rxtx_vec_avx2.c +3
-0+ +const __m256i vlan_tci_msk = + _mm256_set_epi32(0,
0xFFFF0000, 0, 0,drivers/net/ice/ice_rxtx_vec_avx2.c +4
-0+ 0, 0xFFFF0000, 0, 0); + + vlan_tci6_7 = _mm256_and_si256 +(vlan_tci6_7, vlan_tci_msk);drivers/net/ice/ice_rxtx_vec_avx2.c +2
-0+ vlan_tci4_5 = _mm256_and_si256 +(vlan_tci4_5, vlan_tci_msk);drivers/net/ice/ice_rxtx_vec_avx2.c +2
-0+ vlan_tci2_3 = _mm256_and_si256 +(vlan_tci2_3, vlan_tci_msk);drivers/net/ice/ice_rxtx_vec_avx2.c +2
-0+ vlan_tci0_1 = _mm256_and_si256 +(vlan_tci0_1, vlan_tci_msk);drivers/net/ice/ice_rxtx_vec_avx2.c +2
-0+ + mb6_7 = _mm256_or_si256(mb6_7,
vlan_tci6_7);drivers/net/ice/ice_rxtx_vec_avx2.c +1
-0+ mb4_5 = _mm256_or_si256(mb4_5,
vlan_tci4_5);drivers/net/ice/ice_rxtx_vec_avx2.c +1
-0+ mb2_3 = _mm256_or_si256(mb2_3,
vlan_tci2_3);drivers/net/ice/ice_rxtx_vec_avx2.c +1
-0+ mb0_1 = _mm256_or_si256(mb0_1,
vlan_tci0_1);drivers/net/ice/ice_rxtx_vec_avx2.c +2
-0+ } + }#endif }drivers/net/ice/ice_rxtx_vec_avx512.c +0
-0@@ -585,7 +585,7 @@ _ice_recv_raw_pkts_vec_avx512(structice_rx_queue *rxq, * will cause performance drop to get into thiscontext.
drivers/net/ice/ice_rxtx_vec_avx512.c +0
-0*/ if (rxq->vsi->adapter->pf.dev_data-Quoted 1 line
dev_conf.rxmode.offloads &
drivers/net/ice/ice_rxtx_vec_avx512.c +1
-1- RTE_ETH_RX_OFFLOAD_RSS_HASH) { + (RTE_ETH_RX_OFFLOAD_RSS_HASH |
RTE_ETH_RX_OFFLOAD_VLAN)) {drivers/net/ice/ice_rxtx_vec_avx512.c +0
-24/* load bottom half of every 32B desc */ const __m128i raw_desc_bh7 = _mm_load_si128@@ -640,33 +640,131 @@ _ice_recv_raw_pkts_vec_avx512(structice_rx_queue *rxq, * to shift the 32b RSS hash value to the * highest 32b of each 128b before mask */ -__m256i rss_hash6_7 = -_mm256_slli_epi64 (raw_desc_bh6_7, 32); -__m256i rss_hash4_5 = -_mm256_slli_epi64 (raw_desc_bh4_5, 32); -__m256i rss_hash2_3 = -_mm256_slli_epi64 (raw_desc_bh2_3, 32); -__m256i rss_hash0_1 = -_mm256_slli_epi64 (raw_desc_bh0_1, 32); - -__m256i rss_hash_msk = -_mm256_set_epi32 (0xFFFFFFFF ,0 ,0 ,0 , -0xFFFFFFFF ,0 ,0 ,0 ); - - rss_hash6_7 =_mm256_and_si256 - (rss_hash6_7, rss_hash_msk); - rss_hash4_5 =_mm256_and_si256 - (rss_hash4_5, rss_hash_msk); - rss_hash2_3 =_mm256_and_si256 - (rss_hash2_3, rss_hash_msk); - rss_hash0_1 =_mm256_and_si256 - (rss_hash0_1, rss_hash_msk); - - mb6_7 =_mm256_or_si256 (mb6_7, rss_hash6_7); - mb4_5 = _mm256_or_si256(mb4_5,
rss_hash4_5);drivers/net/ice/ice_rxtx_vec_avx512.c +0
-1- mb2_3 = _mm256_or_si256(mb2_3,
rss_hash2_3);drivers/net/ice/ice_rxtx_vec_avx512.c +0
-1- mb0_1 = _mm256_or_si256(mb0_1,
rss_hash0_1);drivers/net/ice/ice_rxtx_vec_avx512.c +1
-1- }/* if() on RSS hash parsing */ + if (rxq->vsi->adapter->pf.dev_data-Quoted 1 line
dev_conf.rxmode.offloads &
+
RTE_ETH_RX_OFFLOAD_RSS_HASH) {drivers/net/ice/ice_rxtx_vec_avx512.c +2
-0+ __m256i rss_hash6_7 = +_mm256_slli_epi64(raw_desc_bh6_7, 32);drivers/net/ice/ice_rxtx_vec_avx512.c +2
-0+ __m256i rss_hash4_5 = +_mm256_slli_epi64(raw_desc_bh4_5, 32);drivers/net/ice/ice_rxtx_vec_avx512.c +2
-0+ __m256i rss_hash2_3 = +_mm256_slli_epi64(raw_desc_bh2_3, 32);drivers/net/ice/ice_rxtx_vec_avx512.c +2
-0+ __m256i rss_hash0_1 = +_mm256_slli_epi64(raw_desc_bh0_1, 32);drivers/net/ice/ice_rxtx_vec_avx512.c +3
-0+ + __m256i rss_hash_msk = +_mm256_set_epi32(0xFFFFFFFF, 0, 0, 0,drivers/net/ice/ice_rxtx_vec_avx512.c +1
-0+ 0xFFFFFFFF, 0,0, 0);
drivers/net/ice/ice_rxtx_vec_avx512.c +3
-0+ + rss_hash6_7 = _mm256_and_si256 + (rss_hash6_7,
rss_hash_msk);drivers/net/ice/ice_rxtx_vec_avx512.c +2
-0+ rss_hash4_5 = _mm256_and_si256 + (rss_hash4_5,
rss_hash_msk);drivers/net/ice/ice_rxtx_vec_avx512.c +2
-0+ rss_hash2_3 = _mm256_and_si256 + (rss_hash2_3,
rss_hash_msk);drivers/net/ice/ice_rxtx_vec_avx512.c +2
-0+ rss_hash0_1 = _mm256_and_si256 + (rss_hash0_1,
rss_hash_msk);drivers/net/ice/ice_rxtx_vec_avx512.c +2
-0+ + mb6_7 = _mm256_or_si256(mb6_7,
rss_hash6_7);drivers/net/ice/ice_rxtx_vec_avx512.c +1
-0+ mb4_5 = _mm256_or_si256(mb4_5,
rss_hash4_5);drivers/net/ice/ice_rxtx_vec_avx512.c +1
-0+ mb2_3 = _mm256_or_si256(mb2_3,
rss_hash2_3);drivers/net/ice/ice_rxtx_vec_avx512.c +1
-0+ mb0_1 = _mm256_or_si256(mb0_1,
rss_hash0_1);drivers/net/ice/ice_rxtx_vec_avx512.c +3
-0+ }/* if() on RSS hash parsing */ + + if (rxq->vsi->adapter->pf.dev_data-Quoted 1 line
dev_conf.rxmode.offloads &
+
RTE_ETH_RX_OFFLOAD_VLAN) {drivers/net/ice/ice_rxtx_vec_avx512.c +1
-0+/* merge the status/error-1 bits into one register */
drivers/net/ice/ice_rxtx_vec_avx512.c +38
-0+const __m256i status1_4_7 = +_mm256_unpacklo_epi32 + (raw_desc_bh6_7, + raw_desc_bh4_5); +const __m256i status1_0_3 = +_mm256_unpacklo_epi32 + (raw_desc_bh2_3, + raw_desc_bh0_1); + +const __m256i status1_0_7 = +_mm256_unpacklo_epi64 + (status1_4_7, status1_0_3); + +const __m256i l2tag2p_flag_mask = +_mm256_set1_epi32 + (1 <<11 ); + +__m256i l2tag2p_flag_bits = +_mm256_and_si256 + (status1_0_7, + l2tag2p_flag_mask); + + l2tag2p_flag_bits = +_mm256_srli_epi32 + (l2tag2p_flag_bits, +11 ); +const __m256i l2tag2_flags_shuf = + _mm256_set_epi8 + (0, 0, 0, 0, + 0, 0, 0, 0, + 0, 0, 0, 0, + 0, 0, 0, 0, + /* end up 128-bits */ + 0, 0, 0, 0, + 0, 0, 0, 0, + 0, 0, 0, 0, + 0, 0, +
RTE_MBUF_F_RX_VLAN|
+
RTE_MBUF_F_RX_VLAN_STRIPPED,drivers/net/ice/ice_rxtx_vec_avx512.c +53
-0+ 0); +__m256i vlan_flags = +_mm256_shuffle_epi8 + (l2tag2_flags_shuf, + l2tag2p_flag_bits); + +/* merge with vlan_flags */ + mbuf_flags =_mm256_or_si256 + (mbuf_flags, + vlan_flags); + +/* L2TAG2_2 */ +__m256i vlan_tci6_7 = +_mm256_slli_si256 + (raw_desc_bh6_7,4 ); +__m256i vlan_tci4_5 = +_mm256_slli_si256 + (raw_desc_bh4_5,4 ); +__m256i vlan_tci2_3 = +_mm256_slli_si256 + (raw_desc_bh2_3,4 ); +__m256i vlan_tci0_1 = +_mm256_slli_si256 + (raw_desc_bh0_1,4 ); + +const __m256i vlan_tci_msk = +_mm256_set_epi32 + (0 ,0xFFFF0000 ,0 ,0 , +0 ,0xFFFF0000 ,0 ,0 ); + + vlan_tci6_7 =_mm256_and_si256 + (vlan_tci6_7, + vlan_tci_msk); + vlan_tci4_5 =_mm256_and_si256 + (vlan_tci4_5, + vlan_tci_msk); + vlan_tci2_3 =_mm256_and_si256 + (vlan_tci2_3, + vlan_tci_msk); + vlan_tci0_1 =_mm256_and_si256 + (vlan_tci0_1, + vlan_tci_msk); + + mb6_7 =_mm256_or_si256 + (mb6_7, vlan_tci6_7); + mb4_5 =_mm256_or_si256 + (mb4_5, vlan_tci4_5); + mb2_3 =_mm256_or_si256 + (mb2_3, vlan_tci2_3); + mb0_1 =_mm256_or_si256 + (mb0_1, vlan_tci0_1); + } + }#endif }drivers/net/ice/ice_rxtx_vec_sse.c +6
-0@@ -100,9 +100,15 @@ ice_rxq_rearm(struct ice_rx_queue *rxq)ICE_PCI_REG_WC_WRITE (rxq->qrx_tail, rx_id); } +#ifndef RTE_LIBRTE_ICE_16BYTE_RX_DESC +static inline void +ice_rx_desc_to_olflags_v (struct ice_rx_queue *rxq,__m128i descs[4 ],__m128i descs_bh[4 ], + struct rte_mbuf **rx_pkts) +#else static inline void ice_rx_desc_to_olflags_v (struct ice_rx_queue *rxq,__m128i descs[4 ],struct rte_mbuf **rx_pkts) +#endif {const __m128i mbuf_init =_mm_set_epi64x (0 , rxq- >mbuf_initializer);
__m128irearm0, rearm1, rearm2, rearm3; @@ -214,6 +220,38 @@
ice_rx_desc_to_olflags_v(structice_rx_queue*rxq,__m128idescs[4],drivers/net/ice/ice_rxtx_vec_sse.c +3
-0/* merge the flags */ flags =_mm_or_si128 (flags, rss_vlan); +#ifndef RTE_LIBRTE_ICE_16BYTE_RX_DESC + if (rxq->vsi->adapter->pf.dev_data->dev_conf.rxmode.offloads & +RTE_ETH_RX_OFFLOAD_VLAN) {drivers/net/ice/ice_rxtx_vec_sse.c +10
-0+const __m128i l2tag2_mask = +_mm_set1_epi32 (1 <<11 ); +const __m128i vlan_tci0_1 = +_mm_unpacklo_epi32 (descs_bh[0 ], descs_bh[1 ]); +const __m128i vlan_tci2_3 = +_mm_unpacklo_epi32 (descs_bh[2 ], descs_bh[3 ]); +const __m128i vlan_tci0_3 = +_mm_unpacklo_epi64 (vlan_tci0_1, vlan_tci2_3); + + __m128i vlan_bits = _mm_and_si128(vlan_tci0_3,
l2tag2_mask);drivers/net/ice/ice_rxtx_vec_sse.c +13
-0+ + vlan_bits =_mm_srli_epi32 (vlan_bits,11 ); + +const __m128i vlan_flags_shuf = +_mm_set_epi8 (0 ,0 ,0 ,0 , +0 ,0 ,0 ,0 , +0 ,0 ,0 ,0 , +0 ,0 , +RTE_MBUF_F_RX_VLAN | +RTE_MBUF_F_RX_VLAN_STRIPPED , +0 ); + + const __m128i vlan_flags =_mm_shuffle_epi8(vlan_flags_shuf,
drivers/net/ice/ice_rxtx_vec_sse.c +7
-0+vlan_bits); + +/* merge with vlan_flags */ + flags =_mm_or_si128 (flags, vlan_flags); + } +#endif +if (rxq->fdir_enabled) {const __m128i fdir_id0_1 = _mm_unpackhi_epi32(descs[0], descs[1]); @@ -405,6 +443,9 @@ _ice_recv_raw_pkts_vec(struct
ice_rx_queue*rxq, structrte_mbuf**rx_pkts,drivers/net/ice/ice_rxtx_vec_sse.c +3
-0pos += ICE_DESCS_PER_LOOP, rxdp += ICE_DESCS_PER_LOOP) {__m128i descs[ICE_DESCS_PER_LOOP ]; +#ifndef RTE_LIBRTE_ICE_16BYTE_RX_DESC +__m128i descs_bh[ICE_DESCS_PER_LOOP ]; +#endif __m128i pkt_mb0, pkt_mb1, pkt_mb2, pkt_mb3;__m128i staterr, sterr_tmp1, sterr_tmp2; /* 2 64 bit or 4 32 bit mbuf pointers in one XMM reg. */ @@ -463,8 +504,6 @@ _ice_recv_raw_pkts_vec(struct
ice_rx_queue*rxq, structrte_mbuf**rx_pkts,drivers/net/ice/ice_rxtx_vec_sse.c +0
-2/* C.1 4=>2 filter staterr info only */ sterr_tmp1 =_mm_unpackhi_epi32 (descs[1 ], descs[0 ]); -ice_rx_desc_to_olflags_v (rxq, descs, &rx_pkts[pos]); -/* D.2 pkt 3,4 set in_port/nb_seg and remove crc */ pkt_mb3 =_mm_add_epi16 (pkt_mb3, crc_adjust); pkt_mb2 = _mm_add_epi16(pkt_mb2, crc_adjust); @@ -479,21 +518,21 @@ _ice_recv_raw_pkts_vec(struct
ice_rx_queue*rxq, structrte_mbuf**rx_pkts,drivers/net/ice/ice_rxtx_vec_sse.c +0
-0* will cause performance drop to get into this context. */ if (rxq->vsi->adapter->pf.dev_data-Quoted 1 line
dev_conf.rxmode.offloads &
drivers/net/ice/ice_rxtx_vec_sse.c +1
-1- RTE_ETH_RX_OFFLOAD_RSS_HASH) { + (RTE_ETH_RX_OFFLOAD_RSS_HASH |
RTE_ETH_RX_OFFLOAD_VLAN)) {drivers/net/ice/ice_rxtx_vec_sse.c +1
-1/* load bottom half of every 32B desc */ -const __m128i raw_desc_bh3 = + descs_bh[3 ] = _mm_load_si128 ((void*)(&rxdp[3].wb.status_error1));
drivers/net/ice/ice_rxtx_vec_sse.c +1
-1rte_compiler_barrier (); -const __m128i raw_desc_bh2 = + descs_bh[2 ] = _mm_load_si128 ((void*)(&rxdp[2].wb.status_error1));
drivers/net/ice/ice_rxtx_vec_sse.c +1
-1rte_compiler_barrier (); -const __m128i raw_desc_bh1 = + descs_bh[1 ] = _mm_load_si128 ((void*)(&rxdp[1].wb.status_error1));
drivers/net/ice/ice_rxtx_vec_sse.c +1
-1rte_compiler_barrier (); -const __m128i raw_desc_bh0 = + descs_bh[0 ] = _mm_load_si128 ((void*)(&rxdp[0].wb.status_error1));
drivers/net/ice/ice_rxtx_vec_sse.c +1
-26@@ -501,32 +540,59 @@ _ice_recv_raw_pkts_vec(struct ice_rx_queue *rxq,struct rte_mbuf **rx_pkts, * to shift the 32b RSS hash value to the * highest 32b of each 128b before mask */ -__m128i rss_hash3 = -_mm_slli_epi64 (raw_desc_bh3,32 ); -__m128i rss_hash2 = -_mm_slli_epi64 (raw_desc_bh2,32 ); -__m128i rss_hash1 = -_mm_slli_epi64 (raw_desc_bh1,32 ); -__m128i rss_hash0 = -_mm_slli_epi64 (raw_desc_bh0,32 ); - -__m128i rss_hash_msk = -_mm_set_epi32 (0xFFFFFFFF ,0 ,0 ,0 ); - - rss_hash3 =_mm_and_si128 - (rss_hash3, rss_hash_msk); - rss_hash2 =_mm_and_si128 - (rss_hash2, rss_hash_msk); - rss_hash1 =_mm_and_si128 - (rss_hash1, rss_hash_msk); - rss_hash0 =_mm_and_si128 - (rss_hash0, rss_hash_msk); - - pkt_mb3 =_mm_or_si128 (pkt_mb3, rss_hash3); - pkt_mb2 =_mm_or_si128 (pkt_mb2, rss_hash2); - pkt_mb1 =_mm_or_si128 (pkt_mb1, rss_hash1); - pkt_mb0 =_mm_or_si128 (pkt_mb0, rss_hash0); - }/* if() on RSS hash parsing */ + if (rxq->vsi->adapter->pf.dev_data-Quoted 1 line
dev_conf.rxmode.offloads &
+
RTE_ETH_RX_OFFLOAD_RSS_HASH) {drivers/net/ice/ice_rxtx_vec_sse.c +22
-0+__m128i rss_hash3 = +_mm_slli_epi64 (descs_bh[3 ],32 ); +__m128i rss_hash2 = +_mm_slli_epi64 (descs_bh[2 ],32 ); +__m128i rss_hash1 = +_mm_slli_epi64 (descs_bh[1 ],32 ); +__m128i rss_hash0 = +_mm_slli_epi64 (descs_bh[0 ],32 ); + +__m128i rss_hash_msk = +_mm_set_epi32 (0xFFFFFFFF ,0 ,0 ,0 ); + + rss_hash3 =_mm_and_si128 + (rss_hash3, rss_hash_msk); + rss_hash2 =_mm_and_si128 + (rss_hash2, rss_hash_msk); + rss_hash1 =_mm_and_si128 + (rss_hash1, rss_hash_msk); + rss_hash0 =_mm_and_si128 + (rss_hash0, rss_hash_msk); + + pkt_mb3 = _mm_or_si128(pkt_mb3,
rss_hash3);drivers/net/ice/ice_rxtx_vec_sse.c +1
-0+ pkt_mb2 = _mm_or_si128(pkt_mb2,
rss_hash2);drivers/net/ice/ice_rxtx_vec_sse.c +1
-0+ pkt_mb1 = _mm_or_si128(pkt_mb1,
rss_hash1);drivers/net/ice/ice_rxtx_vec_sse.c +1
-0+ pkt_mb0 = _mm_or_si128(pkt_mb0,
rss_hash0);drivers/net/ice/ice_rxtx_vec_sse.c +3
-0+ }/* if() on RSS hash parsing */ + + if (rxq->vsi->adapter->pf.dev_data-Quoted 1 line
dev_conf.rxmode.offloads &
+
RTE_ETH_RX_OFFLOAD_VLAN) {drivers/net/ice/ice_rxtx_vec_sse.c +1
-0+/*
L2TAG2_2*/drivers/net/ice/ice_rxtx_vec_sse.c +1
-0+ __m128i vlan_tci3 =
_mm_slli_si128(descs_bh[3], 4);drivers/net/ice/ice_rxtx_vec_sse.c +1
-0+ __m128i vlan_tci2 =
_mm_slli_si128(descs_bh[2], 4);drivers/net/ice/ice_rxtx_vec_sse.c +1
-0+ __m128i vlan_tci1 =
_mm_slli_si128(descs_bh[1], 4);drivers/net/ice/ice_rxtx_vec_sse.c +1
-0+ __m128i vlan_tci0 =
_mm_slli_si128(descs_bh[0], 4);drivers/net/ice/ice_rxtx_vec_sse.c +2
-0+ + const __m128i vlan_tci_msk =
_mm_set_epi32(0, 0xFFFF0000, 0, 0);drivers/net/ice/ice_rxtx_vec_sse.c +2
-0+ + vlan_tci3 = _mm_and_si128(vlan_tci3,
vlan_tci_msk);drivers/net/ice/ice_rxtx_vec_sse.c +1
-0+ vlan_tci2 = _mm_and_si128(vlan_tci2,
vlan_tci_msk);drivers/net/ice/ice_rxtx_vec_sse.c +1
-0+ vlan_tci1 = _mm_and_si128(vlan_tci1,
vlan_tci_msk);drivers/net/ice/ice_rxtx_vec_sse.c +1
-0+ vlan_tci0 = _mm_and_si128(vlan_tci0,
vlan_tci_msk);drivers/net/ice/ice_rxtx_vec_sse.c +2
-0+ + pkt_mb3 = _mm_or_si128(pkt_mb3,
vlan_tci3);drivers/net/ice/ice_rxtx_vec_sse.c +1
-0+ pkt_mb2 = _mm_or_si128(pkt_mb2,
vlan_tci2);drivers/net/ice/ice_rxtx_vec_sse.c +1
-0+ pkt_mb1 = _mm_or_si128(pkt_mb1,
vlan_tci1);drivers/net/ice/ice_rxtx_vec_sse.c +1
-0+ pkt_mb0 = _mm_or_si128(pkt_mb0,
vlan_tci0);drivers/net/ice/ice_rxtx_vec_sse.c +2
-0+ } + ice_rx_desc_to_olflags_v(rxq, descs, descs_bh,&rx_pkts[pos]);
drivers/net/ice/ice_rxtx_vec_sse.c +3
-1+ } +#else +ice_rx_desc_to_olflags_v (rxq, descs, &rx_pkts[pos]);#endif /* C.2 get 4 pkts staterr value */ --2.34.1