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.richard...@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

Reply via email to