* [PATCH] net/intel: remove unused reassembly functions
@ 2025-03-07 16:07 Bruce Richardson
2025-03-13 17:48 ` Medvedkin, Vladimir
0 siblings, 1 reply; 3+ messages in thread
From: Bruce Richardson @ 2025-03-07 16:07 UTC (permalink / raw)
To: dev
Cc: Bruce Richardson, Ian Stokes, Vladimir Medvedkin,
Anatoly Burakov, Praveen Shetty
When creating a common pkt reassembly function for common driver Rx
re-use, not all original copies of the function were removed. Fix this
omission.
Fixes: 82fbc4a4479c ("net/intel: create common packet reassembly")
Signed-off-by: Bruce Richardson <bruce.richardson@intel.com>
---
drivers/net/intel/i40e/i40e_rxtx_vec_common.h | 63 ------------------
drivers/net/intel/iavf/iavf_rxtx_vec_common.h | 64 ------------------
drivers/net/intel/ice/ice_rxtx_vec_common.h | 65 -------------------
3 files changed, 192 deletions(-)
diff --git a/drivers/net/intel/i40e/i40e_rxtx_vec_common.h b/drivers/net/intel/i40e/i40e_rxtx_vec_common.h
index e988689d7b..ba72df8e13 100644
--- a/drivers/net/intel/i40e/i40e_rxtx_vec_common.h
+++ b/drivers/net/intel/i40e/i40e_rxtx_vec_common.h
@@ -12,69 +12,6 @@
#include "i40e_ethdev.h"
#include "i40e_rxtx.h"
-static inline uint16_t
-reassemble_packets(struct i40e_rx_queue *rxq, struct rte_mbuf **rx_bufs,
- uint16_t nb_bufs, uint8_t *split_flags)
-{
- struct rte_mbuf *pkts[RTE_I40E_VPMD_RX_BURST]; /*finished pkts*/
- struct rte_mbuf *start = rxq->pkt_first_seg;
- struct rte_mbuf *end = rxq->pkt_last_seg;
- unsigned pkt_idx, buf_idx;
-
- for (buf_idx = 0, pkt_idx = 0; buf_idx < nb_bufs; buf_idx++) {
- if (end != NULL) {
- /* processing a split packet */
- end->next = rx_bufs[buf_idx];
- rx_bufs[buf_idx]->data_len += rxq->crc_len;
-
- start->nb_segs++;
- start->pkt_len += rx_bufs[buf_idx]->data_len;
- end = end->next;
-
- if (!split_flags[buf_idx]) {
- /* it's the last packet of the set */
- start->hash = end->hash;
- start->vlan_tci = end->vlan_tci;
- start->ol_flags = end->ol_flags;
- /* we need to strip crc for the whole packet */
- start->pkt_len -= rxq->crc_len;
- if (end->data_len > rxq->crc_len)
- end->data_len -= rxq->crc_len;
- else {
- /* free up last mbuf */
- struct rte_mbuf *secondlast = start;
-
- start->nb_segs--;
- while (secondlast->next != end)
- secondlast = secondlast->next;
- secondlast->data_len -= (rxq->crc_len -
- end->data_len);
- secondlast->next = NULL;
- rte_pktmbuf_free_seg(end);
- }
- pkts[pkt_idx++] = start;
- start = end = NULL;
- }
- } else {
- /* not processing a split packet */
- if (!split_flags[buf_idx]) {
- /* not a split packet, save and skip */
- pkts[pkt_idx++] = rx_bufs[buf_idx];
- continue;
- }
- end = start = rx_bufs[buf_idx];
- rx_bufs[buf_idx]->data_len += rxq->crc_len;
- rx_bufs[buf_idx]->pkt_len += rxq->crc_len;
- }
- }
-
- /* save the partial packet for next time */
- rxq->pkt_first_seg = start;
- rxq->pkt_last_seg = end;
- memcpy(rx_bufs, pkts, pkt_idx * (sizeof(*pkts)));
- return pkt_idx;
-}
-
static inline int
i40e_tx_desc_done(struct ci_tx_queue *txq, uint16_t idx)
{
diff --git a/drivers/net/intel/iavf/iavf_rxtx_vec_common.h b/drivers/net/intel/iavf/iavf_rxtx_vec_common.h
index 33b2bb0633..38e9a206d9 100644
--- a/drivers/net/intel/iavf/iavf_rxtx_vec_common.h
+++ b/drivers/net/intel/iavf/iavf_rxtx_vec_common.h
@@ -12,70 +12,6 @@
#include "iavf.h"
#include "iavf_rxtx.h"
-static __rte_always_inline uint16_t
-reassemble_packets(struct iavf_rx_queue *rxq, struct rte_mbuf **rx_bufs,
- uint16_t nb_bufs, uint8_t *split_flags)
-{
- struct rte_mbuf *pkts[IAVF_VPMD_RX_MAX_BURST];
- struct rte_mbuf *start = rxq->pkt_first_seg;
- struct rte_mbuf *end = rxq->pkt_last_seg;
- unsigned int pkt_idx, buf_idx;
-
- for (buf_idx = 0, pkt_idx = 0; buf_idx < nb_bufs; buf_idx++) {
- if (end) {
- /* processing a split packet */
- end->next = rx_bufs[buf_idx];
- rx_bufs[buf_idx]->data_len += rxq->crc_len;
-
- start->nb_segs++;
- start->pkt_len += rx_bufs[buf_idx]->data_len;
- end = end->next;
-
- if (!split_flags[buf_idx]) {
- /* it's the last packet of the set */
- start->hash = end->hash;
- start->vlan_tci = end->vlan_tci;
- start->ol_flags = end->ol_flags;
- /* we need to strip crc for the whole packet */
- start->pkt_len -= rxq->crc_len;
- if (end->data_len > rxq->crc_len) {
- end->data_len -= rxq->crc_len;
- } else {
- /* free up last mbuf */
- struct rte_mbuf *secondlast = start;
-
- start->nb_segs--;
- while (secondlast->next != end)
- secondlast = secondlast->next;
- secondlast->data_len -= (rxq->crc_len -
- end->data_len);
- secondlast->next = NULL;
- rte_pktmbuf_free_seg(end);
- }
- pkts[pkt_idx++] = start;
- start = NULL;
- end = NULL;
- }
- } else {
- /* not processing a split packet */
- if (!split_flags[buf_idx]) {
- /* not a split packet, save and skip */
- pkts[pkt_idx++] = rx_bufs[buf_idx];
- continue;
- }
- end = start = rx_bufs[buf_idx];
- rx_bufs[buf_idx]->data_len += rxq->crc_len;
- rx_bufs[buf_idx]->pkt_len += rxq->crc_len;
- }
- }
-
- /* save the partial packet for next time */
- rxq->pkt_first_seg = start;
- rxq->pkt_last_seg = end;
- memcpy(rx_bufs, pkts, pkt_idx * (sizeof(*pkts)));
- return pkt_idx;
-}
-
static inline int
iavf_tx_desc_done(struct ci_tx_queue *txq, uint16_t idx)
{
diff --git a/drivers/net/intel/ice/ice_rxtx_vec_common.h b/drivers/net/intel/ice/ice_rxtx_vec_common.h
index 7d9a54e38f..7933c26366 100644
--- a/drivers/net/intel/ice/ice_rxtx_vec_common.h
+++ b/drivers/net/intel/ice/ice_rxtx_vec_common.h
@@ -8,71 +8,6 @@
#include "../common/rx.h"
#include "ice_rxtx.h"
-static inline uint16_t
-ice_rx_reassemble_packets(struct ice_rx_queue *rxq, struct rte_mbuf **rx_bufs,
- uint16_t nb_bufs, uint8_t *split_flags)
-{
- struct rte_mbuf *pkts[ICE_VPMD_RX_BURST] = {0}; /*finished pkts*/
- struct rte_mbuf *start = rxq->pkt_first_seg;
- struct rte_mbuf *end = rxq->pkt_last_seg;
- unsigned int pkt_idx, buf_idx;
-
- for (buf_idx = 0, pkt_idx = 0; buf_idx < nb_bufs; buf_idx++) {
- if (end) {
- /* processing a split packet */
- end->next = rx_bufs[buf_idx];
- rx_bufs[buf_idx]->data_len += rxq->crc_len;
-
- start->nb_segs++;
- start->pkt_len += rx_bufs[buf_idx]->data_len;
- end = end->next;
-
- if (!split_flags[buf_idx]) {
- /* it's the last packet of the set */
- start->hash = end->hash;
- start->vlan_tci = end->vlan_tci;
- start->ol_flags = end->ol_flags;
- /* we need to strip crc for the whole packet */
- start->pkt_len -= rxq->crc_len;
- if (end->data_len > rxq->crc_len) {
- end->data_len -= rxq->crc_len;
- } else {
- /* free up last mbuf */
- struct rte_mbuf *secondlast = start;
-
- start->nb_segs--;
- while (secondlast->next != end)
- secondlast = secondlast->next;
- secondlast->data_len -= (rxq->crc_len -
- end->data_len);
- secondlast->next = NULL;
- rte_pktmbuf_free_seg(end);
- }
- pkts[pkt_idx++] = start;
- start = NULL;
- end = NULL;
- }
- } else {
- /* not processing a split packet */
- if (!split_flags[buf_idx]) {
- /* not a split packet, save and skip */
- pkts[pkt_idx++] = rx_bufs[buf_idx];
- continue;
- }
- start = rx_bufs[buf_idx];
- end = start;
- rx_bufs[buf_idx]->data_len += rxq->crc_len;
- rx_bufs[buf_idx]->pkt_len += rxq->crc_len;
- }
- }
-
- /* save the partial packet for next time */
- rxq->pkt_first_seg = start;
- rxq->pkt_last_seg = end;
- memcpy(rx_bufs, pkts, pkt_idx * (sizeof(*pkts)));
- return pkt_idx;
-}
-
static inline int
ice_tx_desc_done(struct ci_tx_queue *txq, uint16_t idx)
{
--
2.43.0
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH] net/intel: remove unused reassembly functions
2025-03-07 16:07 [PATCH] net/intel: remove unused reassembly functions Bruce Richardson
@ 2025-03-13 17:48 ` Medvedkin, Vladimir
2025-03-13 18:00 ` Bruce Richardson
0 siblings, 1 reply; 3+ messages in thread
From: Medvedkin, Vladimir @ 2025-03-13 17:48 UTC (permalink / raw)
To: Bruce Richardson, dev; +Cc: Ian Stokes, Anatoly Burakov, Praveen Shetty
[-- Attachment #1: Type: text/plain, Size: 695 bytes --]
Acked-by: Vladimir Medvedkin <vladimir.medvedkin@intel.com>
On 07/03/2025 16:07, Bruce Richardson wrote:
> When creating a common pkt reassembly function for common driver Rx
> re-use, not all original copies of the function were removed. Fix this
> omission.
>
> Fixes: 82fbc4a4479c ("net/intel: create common packet reassembly")
>
> Signed-off-by: Bruce Richardson<bruce.richardson@intel.com>
> ---
> drivers/net/intel/i40e/i40e_rxtx_vec_common.h | 63 ------------------
> drivers/net/intel/iavf/iavf_rxtx_vec_common.h | 64 ------------------
> drivers/net/intel/ice/ice_rxtx_vec_common.h | 65 -------------------
> 3 files changed, 192 deletions(-)
>
<snip>
--
Regards,
Vladimir
[-- Attachment #2: Type: text/html, Size: 1460 bytes --]
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH] net/intel: remove unused reassembly functions
2025-03-13 17:48 ` Medvedkin, Vladimir
@ 2025-03-13 18:00 ` Bruce Richardson
0 siblings, 0 replies; 3+ messages in thread
From: Bruce Richardson @ 2025-03-13 18:00 UTC (permalink / raw)
To: Medvedkin, Vladimir; +Cc: dev, Ian Stokes, Anatoly Burakov, Praveen Shetty
On Thu, Mar 13, 2025 at 05:48:28PM +0000, Medvedkin, Vladimir wrote:
> Acked-by: Vladimir Medvedkin [1]<vladimir.medvedkin@intel.com>
>
> On 07/03/2025 16:07, Bruce Richardson wrote:
>
> When creating a common pkt reassembly function for common driver Rx
> re-use, not all original copies of the function were removed. Fix this
> omission.
>
> Fixes: 82fbc4a4479c ("net/intel: create common packet reassembly")
>
> Signed-off-by: Bruce Richardson [2]<bruce.richardson@intel.com>
> ---
> drivers/net/intel/i40e/i40e_rxtx_vec_common.h | 63 ------------------
> drivers/net/intel/iavf/iavf_rxtx_vec_common.h | 64 ------------------
> drivers/net/intel/ice/ice_rxtx_vec_common.h | 65 -------------------
> 3 files changed, 192 deletions(-)
>
>
Applied to dpdk-next-net-intel
/Bruce
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2025-03-13 18:00 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2025-03-07 16:07 [PATCH] net/intel: remove unused reassembly functions Bruce Richardson
2025-03-13 17:48 ` Medvedkin, Vladimir
2025-03-13 18:00 ` Bruce Richardson
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).