net/i40e: remove redundant number of packets check
PATCH 1/1 net/i40e: remove redundant number of packets check
For i40e_xmit_pkts_vec_xx function, it checks nb_pkts to ensure nb_pkts does not cross rs_thresh.
However, in i40e_xmit_fixed_burst_vec_xx function, this check will be performed again. To improve code, delete this redundant check.
--- drivers/net/i40e/i40e_rxtx.c | 1 + drivers/net/i40e/i40e_rxtx_vec_altivec.c | 3 --- drivers/net/i40e/i40e_rxtx_vec_avx2.c | 4 +--- drivers/net/i40e/i40e_rxtx_vec_avx512.c | 4 +--- drivers/net/i40e/i40e_rxtx_vec_neon.c | 3 --- drivers/net/i40e/i40e_rxtx_vec_sse.c | 3 --- 6 files changed, 3 insertions(+), 15 deletions(-)
drivers/net/i40e/i40e_rxtx.c +1 -0
@@ -1523,6 +1523,7 @@ i40e_xmit_pkts_vec(void *tx_queue, struct rte_mbuf **tx_pkts,while (nb_pkts) {uint16_t ret, num; +/* cross rs_thresh boundary is not allowed */ num = (uint16_t )RTE_MIN (nb_pkts, txq->tx_rs_thresh); ret =i40e_xmit_fixed_burst_vec (tx_queue, &tx_pkts[nb_tx], num);
drivers/net/i40e/i40e_rxtx_vec_altivec.c +0 -3
@@ -560,9 +560,6 @@ i40e_xmit_fixed_burst_vec(void *tx_queue, struct rte_mbuf **tx_pkts,uint64_t rs =I40E_TX_DESC_CMD_RS |I40E_TD_CMD ;int i; -/* cross rx_thresh boundary is not allowed */ - nb_pkts =RTE_MIN (nb_pkts, txq->tx_rs_thresh); -if (txq->nb_tx_free < txq->tx_free_thresh)i40e_tx_free_bufs (txq);
drivers/net/i40e/i40e_rxtx_vec_avx2.c +1 -3
@@ -766,9 +766,6 @@ i40e_xmit_fixed_burst_vec_avx2(void *tx_queue, struct rte_mbuf **tx_pkts,uint64_t flags =I40E_TD_CMD ;uint64_t rs =I40E_TX_DESC_CMD_RS |I40E_TD_CMD ; -/* cross rx_thresh boundary is not allowed */ - nb_pkts =RTE_MIN (nb_pkts, txq->tx_rs_thresh); -if (txq->nb_tx_free < txq->tx_free_thresh)i40e_tx_free_bufs (txq);
@@ -832,6 +829,7 @@ i40e_xmit_pkts_vec_avx2(void *tx_queue, struct rte_mbuf **tx_pkts,while (nb_pkts) {uint16_t ret, num; +/* cross rs_thresh boundary is not allowed */ num = (uint16_t )RTE_MIN (nb_pkts, txq->tx_rs_thresh); ret =i40e_xmit_fixed_burst_vec_avx2 (tx_queue, &tx_pkts[nb_tx], num);
drivers/net/i40e/i40e_rxtx_vec_avx512.c +1 -3
@@ -1060,9 +1060,6 @@ i40e_xmit_fixed_burst_vec_avx512(void *tx_queue, struct rte_mbuf **tx_pkts,uint64_t flags =I40E_TD_CMD ;uint64_t rs =I40E_TX_DESC_CMD_RS |I40E_TD_CMD ; -/* cross rx_thresh boundary is not allowed */ - nb_pkts =RTE_MIN (nb_pkts, txq->tx_rs_thresh); -if (txq->nb_tx_free < txq->tx_free_thresh)i40e_tx_free_bufs_avx512 (txq);
@@ -1127,6 +1124,7 @@ i40e_xmit_pkts_vec_avx512(void *tx_queue, struct rte_mbuf **tx_pkts,while (nb_pkts) {uint16_t ret, num; +/* cross rs_thresh boundary is not allowed */ num = (uint16_t )RTE_MIN (nb_pkts, txq->tx_rs_thresh); ret =i40e_xmit_fixed_burst_vec_avx512 (tx_queue, &tx_pkts[nb_tx], num);
drivers/net/i40e/i40e_rxtx_vec_neon.c +0 -3
@@ -682,9 +682,6 @@ i40e_xmit_fixed_burst_vec(void *__rte_restrict tx_queue,uint64_t rs =I40E_TX_DESC_CMD_RS |I40E_TD_CMD ;int i; -/* cross rx_thresh boundary is not allowed */ - nb_pkts =RTE_MIN (nb_pkts, txq->tx_rs_thresh); -if (txq->nb_tx_free < txq->tx_free_thresh)i40e_tx_free_bufs (txq);
drivers/net/i40e/i40e_rxtx_vec_sse.c +0 -3
@@ -709,9 +709,6 @@ i40e_xmit_fixed_burst_vec(void *tx_queue, struct rte_mbuf **tx_pkts,uint64_t rs =I40E_TX_DESC_CMD_RS |I40E_TD_CMD ;int i; -/* cross rx_thresh boundary is not allowed */ - nb_pkts =RTE_MIN (nb_pkts, txq->tx_rs_thresh); -if (txq->nb_tx_free < txq->tx_free_thresh)i40e_tx_free_bufs (txq);
Signature · 1 line
2.25.1
Zhang, Qi Z
AppliedQuoted 16 lines
-----Original Message-----
From: Feifei Wang <[email protected]>
Sent: Thursday, March 3, 2022 9:54 AM
To: Xing, Beilei <[email protected]>; David Christensen <[email protected]>; Richardson, Bruce <[email protected]>; Ananyev, Konstantin <[email protected]>; Ruifeng Wang <[email protected]>
Cc: [email protected]; [email protected]; Feifei Wang <[email protected]>; Honnappa Nagarahalli <[email protected]>
Subject: [PATCH v1] net/i40e: remove redundant number of packets checkFor
i40e_xmit_pkts_vec_xxfunction, it checksnb_pktsto ensurenb_pktsdoes not crossrs_thresh.
Quoted 6 lines
However, in
i40e_xmit_fixed_burst_vec_xxfunction, this check will be performed again. To improve code, delete this redundant check.Suggested-by Honnappa Nagarahalli <[email protected]>Signed-off-by Feifei Wang <[email protected]>Reviewed-by Ruifeng Wang <[email protected]>
Applied to dpdk-next-net-intel.
Thanks
Qi
Quoted 16 lines · Qi Z
Quoted 16 lines
-----Original Message-----
From: Feifei Wang <[email protected]>
Sent: Thursday, March 3, 2022 9:54 AM
To: Xing, Beilei <[email protected]>; David Christensen <[email protected]>; Richardson, Bruce <[email protected]>; Ananyev, Konstantin <[email protected]>; Ruifeng Wang <[email protected]>
Cc: [email protected]; [email protected]; Feifei Wang <[email protected]>; Honnappa Nagarahalli <[email protected]>
Subject: [PATCH v1] net/i40e: remove redundant number of packets checkFor
i40e_xmit_pkts_vec_xxfunction, it checksnb_pktsto ensurenb_pktsdoes not crossrs_thresh.
Quoted 9 lines
Quoted 6 lines
However, in
i40e_xmit_fixed_burst_vec_xxfunction, this check will be performed again. To improve code, delete this redundant check.Suggested-by Honnappa Nagarahalli <[email protected]>Signed-off-by Feifei Wang <[email protected]>Reviewed-by Ruifeng Wang <[email protected]>Applied to dpdk-next-net-intel.
Hi Qi,
This patch is not acked by the i40e maintainers.
And this is changing the datapath for the -rc3, two weeks before the release. Is it tested enough?
What is the gain with this patch, I don't see any numbers in the commit log.
If the gain is small, can we postpone this patch to next release instead of getting it for -rc3?
Quoted 45 lines
-----Original Message-----
From: Yigit, Ferruh <[email protected]>
Sent: Friday, March 4, 2022 12:44 AM
To: Zhang, Qi Z <[email protected]>; Feifei Wang <[email protected]>; Xing, Beilei <[email protected]>; David Christensen <[email protected]>; Richardson, Bruce <[email protected]>; Ananyev, Konstantin <[email protected]>; Ruifeng Wang <[email protected]>
Cc: [email protected]; [email protected]; Honnappa Nagarahalli <[email protected]>; Thomas Monjalon <[email protected]>; David Marchand <[email protected]>
Subject: Re: [PATCH v1] net/i40e: remove redundant number of packets checkQuoted 17 lines · Qi Z
Quoted 17 lines
-----Original Message-----
From: Feifei Wang <[email protected]>
Sent: Thursday, March 3, 2022 9:54 AM
To: Xing, Beilei <[email protected]>; David Christensen <[email protected]>; Richardson, Bruce <[email protected]>; Ananyev, Konstantin <[email protected]>; Ruifeng Wang <[email protected]>
Cc: [email protected]; [email protected]; Feifei Wang <[email protected]>; Honnappa Nagarahalli <[email protected]>
Subject: [PATCH v1] net/i40e: remove redundant number of packets checkFor
i40e_xmit_pkts_vec_xxfunction, it checksnb_pktsto ensurenb_pktsdoes not crossrs_thresh.Quoted 9 lines
Quoted 6 lines
However, in
i40e_xmit_fixed_burst_vec_xxfunction, this check will be performed again. To improve code, delete this redundant check.Suggested-by Honnappa Nagarahalli <[email protected]>Signed-off-by Feifei Wang <[email protected]>Reviewed-by Ruifeng Wang <[email protected]>Applied to dpdk-next-net-intel.
Hi Qi,
Quoted 8 lines
This patch is not acked by the i40e maintainers.
And this is changing the datapath for the -rc3, two weeks before the release. Is it tested enough?
What is the gain with this patch, I don't see any numbers in the commit log. If the gain is small, can we postpone this patch to next release instead of getting it for -rc3?
The patch applied the same thing as below which I have reviewed.
https://patchwork.dpdk.org/project/dpdk/patch/[email protected]/
I didn't see the risk of having it, and I will add a "reviewed-by" to avoid confusion, but if you think it's risky, we can still defer it to next-net.
Thanks
Qi
Quoted 33 lines
-----邮件原件-----
发件人: Zhang, Qi Z <[email protected]>
发送时间: Friday, March 4, 2022 9:24 AM
收件人: Yigit, Ferruh <[email protected]>; Feifei Wang <[email protected]>; Xing, Beilei <[email protected]>; David Christensen <[email protected]>; Richardson, Bruce <[email protected]>; Ananyev, Konstantin <[email protected]>; Ruifeng Wang <[email protected]> 抄送: [email protected]; nd <[email protected]>; Honnappa Nagarahalli <[email protected]>; [email protected]; David Marchand <[email protected]>
主题: RE: [PATCH v1] net/i40e: remove redundant number of packets checkQuoted 10 lines
-----Original Message-----
From: Yigit, Ferruh <[email protected]>
Sent: Friday, March 4, 2022 12:44 AM
To: Zhang, Qi Z <[email protected]>; Feifei Wang <[email protected]>; Xing, Beilei <[email protected]>; David Christensen <[email protected]>; Richardson, Bruce <[email protected]>; Ananyev, Konstantin <[email protected]>; Ruifeng Wang <[email protected]>
Cc: [email protected]; [email protected]; Honnappa Nagarahalli <[email protected]>; Thomas MonjalonQuoted 7 lines
David Marchand <[email protected]>
Subject: Re: [PATCH v1] net/i40e: remove redundant number of packets checkQuoted 2 lines · Qi Z
Quoted 32 lines
Quoted 7 lines
Quoted 7 lines
Quoted 7 lines
-----Original Message-----
From: Feifei Wang <[email protected]>
Sent: Thursday, March 3, 2022 9:54 AM
To: Xing, Beilei <[email protected]>; David Christensen <[email protected]>; Richardson, Bruce <[email protected]>; Ananyev, Konstantin <[email protected]>; Ruifeng WangQuoted 24 lines
Quoted 8 lines
Quoted 8 lines
Cc: [email protected]; [email protected]; Feifei Wang <[email protected]>; Honnappa Nagarahalli <[email protected]>
Subject: [PATCH v1] net/i40e: remove redundant number of packets checkFor
i40e_xmit_pkts_vec_xxfunction, it checksnb_pktsto ensurenb_pktsdoes not crossrs_thresh.Quoted 9 lines
Quoted 6 lines
However, in
i40e_xmit_fixed_burst_vec_xxfunction, this check will be performed again. To improve code, delete this redundant check.Suggested-by Honnappa Nagarahalli <[email protected]>Signed-off-by Feifei Wang <[email protected]>Reviewed-by Ruifeng Wang <[email protected]>Applied to dpdk-next-net-intel.
Hi Qi,
This patch is not acked by the i40e maintainers.
And this is changing the datapath for the -rc3, two weeks before the release. Is it tested enough?
Hi, Ferruh
Thanks for your remind. Test the performance in l3fwd with this patch:
In arm server, there is no performance change.
In x86 server, there is also no obvious performance change according to performance test in public CI.
Best Regards
Feifei
Quoted 11 lines
Quoted 4 lines
What is the gain with this patch, I don't see any numbers in the commit log. If the gain is small, can we postpone this patch to next release instead of getting it for -rc3?
The patch applied the same thing as below which I have reviewed.
https://patchwork.dpdk.org/project/dpdk/patch/20220222224818.8612-1-
[email protected]/I didn't see the risk of having it, and I will add a "reviewed-by" to avoid confusion, but if you think it's risky, we can still defer it to next-net.
Hi, Qi
Thanks for your review.
Best Regards
Feifei
Quoted 3 lines
Thanks
Qi
Quoted 50 lines · Qi Z
Quoted 50 lines
-----Original Message-----
From: Yigit, Ferruh <[email protected]>
Sent: Friday, March 4, 2022 12:44 AM
To: Zhang, Qi Z <[email protected]>; Feifei Wang <[email protected]>; Xing, Beilei <[email protected]>; David Christensen <[email protected]>; Richardson, Bruce <[email protected]>; Ananyev, Konstantin <[email protected]>; Ruifeng Wang <[email protected]>
Cc: [email protected]; [email protected]; Honnappa Nagarahalli <[email protected]>; Thomas Monjalon <[email protected]>; David Marchand <[email protected]>
Subject: Re: [PATCH v1] net/i40e: remove redundant number of packets checkQuoted 17 lines · Qi Z
Quoted 17 lines
-----Original Message-----
From: Feifei Wang <[email protected]>
Sent: Thursday, March 3, 2022 9:54 AM
To: Xing, Beilei <[email protected]>; David Christensen <[email protected]>; Richardson, Bruce <[email protected]>; Ananyev, Konstantin <[email protected]>; Ruifeng Wang <[email protected]>
Cc: [email protected]; [email protected]; Feifei Wang <[email protected]>; Honnappa Nagarahalli <[email protected]>
Subject: [PATCH v1] net/i40e: remove redundant number of packets checkFor
i40e_xmit_pkts_vec_xxfunction, it checksnb_pktsto ensurenb_pktsdoes not crossrs_thresh.Quoted 9 lines
Quoted 6 lines
However, in
i40e_xmit_fixed_burst_vec_xxfunction, this check will be performed again. To improve code, delete this redundant check.Suggested-by Honnappa Nagarahalli <[email protected]>Signed-off-by Feifei Wang <[email protected]>Reviewed-by Ruifeng Wang <[email protected]>Applied to dpdk-next-net-intel.
Hi Qi,
This patch is not acked by the i40e maintainers.
And this is changing the datapath for the -rc3, two weeks before the release. Is it tested enough?
Quoted 9 lines
Quoted 3 lines
What is the gain with this patch, I don't see any numbers in the commit log. If the gain is small, can we postpone this patch to next release instead of getting it for -rc3?
The patch applied the same thing as below which I have reviewed.
https://patchwork.dpdk.org/project/dpdk/patch/[email protected]/I didn't see the risk of having it, and I will add a "reviewed-by" to avoid confusion, but if you think it's risky, we can still defer it to next-net.
Code change looks simple, but risk is more theoretical to get a datapath code optimization close to the release, and Feifei reported that there is no visible performance gain.
So I think safer to postpone to next release if you don't object.
Quoted 81 lines
-----Original Message-----
From: Yigit, Ferruh <[email protected]>
Sent: Friday, March 4, 2022 7:10 PM
To: Zhang, Qi Z <[email protected]>; Feifei Wang <[email protected]>; Xing, Beilei <[email protected]>; David Christensen <[email protected]>; Richardson, Bruce <[email protected]>; Ananyev, Konstantin <[email protected]>; Ruifeng Wang <[email protected]>
Cc: [email protected]; [email protected]; Honnappa Nagarahalli <[email protected]>; Thomas Monjalon <[email protected]>; David Marchand <[email protected]>
Subject: Re: [PATCH v1] net/i40e: remove redundant number of packets checkQuoted 10 lines · Qi Z
Quoted 10 lines
-----Original Message-----
From: Yigit, Ferruh <[email protected]>
Sent: Friday, March 4, 2022 12:44 AM
To: Zhang, Qi Z <[email protected]>; Feifei Wang <[email protected]>; Xing, Beilei <[email protected]>; David Christensen <[email protected]>; Richardson, Bruce <[email protected]>; Ananyev, Konstantin <[email protected]>; Ruifeng WangQuoted 3 lines
Quoted 3 lines
Cc: [email protected]; [email protected]; Honnappa Nagarahalli <[email protected]>; Thomas Monjalon <[email protected]>; David Marchand
Quoted 6 lines
Quoted 6 lines
Subject: Re: [PATCH v1] net/i40e: remove redundant number of packets check
Quoted 2 lines · Qi Z
Quoted 7 lines
Quoted 7 lines
Quoted 7 lines
Quoted 7 lines
-----Original Message-----
From: Feifei Wang <[email protected]>
Sent: Thursday, March 3, 2022 9:54 AM
To: Xing, Beilei <[email protected]>; David Christensen <[email protected]>; Richardson, Bruce <[email protected]>; Ananyev, Konstantin <[email protected]>; Ruifeng WangQuoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line
Cc [email protected]; [email protected]; Feifei WangQuoted 24 lines
Quoted 24 lines
Quoted 7 lines
Quoted 7 lines
Honnappa Nagarahalli <[email protected]>
Subject: [PATCH v1] net/i40e: remove redundant number of packets checkFor
i40e_xmit_pkts_vec_xxfunction, it checksnb_pktsto ensurenb_pktsdoes not crossrs_thresh.Quoted 9 lines
Quoted 6 lines
However, in
i40e_xmit_fixed_burst_vec_xxfunction, this check will be performed again. To improve code, delete this redundant check.Suggested-by Honnappa Nagarahalli <[email protected]>Signed-off-by Feifei Wang <[email protected]>Reviewed-by Ruifeng Wang <[email protected]>Applied to dpdk-next-net-intel.
Hi Qi,
This patch is not acked by the i40e maintainers.
And this is changing the datapath for the -rc3, two weeks before the release. Is it tested enough?
Quoted 6 lines
Quoted 3 lines
What is the gain with this patch, I don't see any numbers in the commit log. If the gain is small, can we postpone this patch to next release instead of getting it for -rc3?
The patch applied the same thing as below which I have reviewed.
https://patchwork.dpdk.org/project/dpdk/patch/20220222224818.8612-1-ka
Quoted 2 lines
Quoted 8 lines
Quoted 1 line
I didn't see the risk of having it, and I will add a "reviewed-by" to avoid
confusion, but if you think it's risky, we can still defer it to next-net.
Quoted 1 line
Code change looks simple, but risk is more theoretical to get a datapath code optimization close to the release, and Feifei reported that there is no visible performance gain.
So I think safer to postpone to next release if you don't object.
Re-applied to dpdk-next-net-intel.
Thanks
Qi
Quoted 16 lines
-----Original Message-----
From: Feifei Wang <[email protected]>
Sent: Thursday, March 3, 2022 9:54 AM
To: Xing, Beilei <[email protected]>; David Christensen <[email protected]>; Richardson, Bruce <[email protected]>; Ananyev, Konstantin <[email protected]>; Ruifeng Wang <[email protected]>
Cc: [email protected]; [email protected]; Feifei Wang <[email protected]>; Honnappa Nagarahalli <[email protected]>
Subject: [PATCH v1] net/i40e: remove redundant number of packets checkFor
i40e_xmit_pkts_vec_xxfunction, it checksnb_pktsto ensurenb_pktsdoes not crossrs_thresh.
Quoted 6 lines
However, in
i40e_xmit_fixed_burst_vec_xxfunction, this check will be performed again. To improve code, delete this redundant check.Suggested-by Honnappa Nagarahalli <[email protected]>Signed-off-by Feifei Wang <[email protected]>Reviewed-by Ruifeng Wang <[email protected]>
Applied to dpdk-next-net-intel.
Thanks
Qi