* [dpdk-dev] [PATCH 0/2] ixgbe: Two fixes for RX scatter functions. @ 2015-07-28 9:41 Konstantin Ananyev 2015-07-28 9:41 ` [dpdk-dev] [PATCH 1/2] ixgbe: fix scalar scatter RX doesn't take into account CRC length Konstantin Ananyev 2015-07-28 9:41 ` [dpdk-dev] [PATCH 2/2] ixgbe: fix vector scatter RX could produce wrong nb_segs value Konstantin Ananyev 0 siblings, 2 replies; 8+ messages in thread From: Konstantin Ananyev @ 2015-07-28 9:41 UTC (permalink / raw) To: dev Konstantin Ananyev (2): ixgbe: fix scalar scatter RX doesn't take into account CRC length ixgbe: fix vector scatter RX could produce wrong nb_segs value drivers/net/ixgbe/ixgbe_rxtx.c | 19 +++++++++++++++++++ drivers/net/ixgbe/ixgbe_rxtx_vec.c | 2 ++ 2 files changed, 21 insertions(+) -- 1.8.3.1 ^ permalink raw reply [flat|nested] 8+ messages in thread
* [dpdk-dev] [PATCH 1/2] ixgbe: fix scalar scatter RX doesn't take into account CRC length 2015-07-28 9:41 [dpdk-dev] [PATCH 0/2] ixgbe: Two fixes for RX scatter functions Konstantin Ananyev @ 2015-07-28 9:41 ` Konstantin Ananyev 2015-07-28 11:39 ` [dpdk-dev] [PATCHv2 0/2] ixgbe: Two fixes for RX scatter functions Konstantin Ananyev 2015-07-28 9:41 ` [dpdk-dev] [PATCH 2/2] ixgbe: fix vector scatter RX could produce wrong nb_segs value Konstantin Ananyev 1 sibling, 1 reply; 8+ messages in thread From: Konstantin Ananyev @ 2015-07-28 9:41 UTC (permalink / raw) To: dev For 2.1 release, in attempt to minimize number of RX routines to support, ixgbe scatter and ixgbe LRO RX routines were merged into one that can handle both cases. Though I completely missed the fact, that while LRO could only be used when HW CRC strip is enabled, scatter RX should work for both cases (HW CRC strip on/off). That patch restores missed functionality. Signed-off-by: Konstantin Ananyev <konstantin.ananyev@intel.com> --- drivers/net/ixgbe/ixgbe_rxtx.c | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) diff --git a/drivers/net/ixgbe/ixgbe_rxtx.c b/drivers/net/ixgbe/ixgbe_rxtx.c index a0c8847..a1b25aa 100644 --- a/drivers/net/ixgbe/ixgbe_rxtx.c +++ b/drivers/net/ixgbe/ixgbe_rxtx.c @@ -1817,6 +1817,25 @@ next_desc: ixgbe_fill_cluster_head_buf(first_seg, &rxd, rxq->port_id, staterr); + /* + * Deal with the case, when HW CRC srip is disabled. + * That can't happen when LRO is enabled, but still could + * happen for scattered RX mode. + */ + first_seg->pkt_len -= rxq->crc_len; + if (unlikely(rxm->data_len <= rxq->crc_len)) { + struct rte_mbuf *lp; + + for (lp = first_seg; lp->next != rxm; lp = lp->next) + ; + + first_seg->nb_segs--; + lp->data_len -= rxq->crc_len - rxm->data_len; + lp->next = NULL; + rte_pktmbuf_free_seg(rxm); + } else + rxm->data_len -= rxq->crc_len; + /* Prefetch data of first segment, if configured to do so. */ rte_packet_prefetch((char *)first_seg->buf_addr + first_seg->data_off); -- 1.8.3.1 ^ permalink raw reply [flat|nested] 8+ messages in thread
* [dpdk-dev] [PATCHv2 0/2] ixgbe: Two fixes for RX scatter functions. 2015-07-28 9:41 ` [dpdk-dev] [PATCH 1/2] ixgbe: fix scalar scatter RX doesn't take into account CRC length Konstantin Ananyev @ 2015-07-28 11:39 ` Konstantin Ananyev 2015-07-28 11:39 ` [dpdk-dev] [PATCHv2 1/2] ixgbe: fix scalar scatter RX doesn't take into account CRC length Konstantin Ananyev ` (2 more replies) 0 siblings, 3 replies; 8+ messages in thread From: Konstantin Ananyev @ 2015-07-28 11:39 UTC (permalink / raw) To: dev Konstantin Ananyev (2): ixgbe: fix scalar scatter RX doesn't take into account CRC length ixgbe: fix vector scatter RX could produce wrong nb_segs value drivers/net/ixgbe/ixgbe_rxtx.c | 19 +++++++++++++++++++ drivers/net/ixgbe/ixgbe_rxtx_vec.c | 2 ++ 2 files changed, 21 insertions(+) -- 1.8.3.1 ^ permalink raw reply [flat|nested] 8+ messages in thread
* [dpdk-dev] [PATCHv2 1/2] ixgbe: fix scalar scatter RX doesn't take into account CRC length 2015-07-28 11:39 ` [dpdk-dev] [PATCHv2 0/2] ixgbe: Two fixes for RX scatter functions Konstantin Ananyev @ 2015-07-28 11:39 ` Konstantin Ananyev 2015-07-28 11:39 ` [dpdk-dev] [PATCHv2 2/2] ixgbe: fix vector scatter RX could produce wrong nb_segs value Konstantin Ananyev 2015-07-29 1:51 ` [dpdk-dev] [PATCHv2 0/2] ixgbe: Two fixes for RX scatter functions Lu, Wenzhuo 2 siblings, 0 replies; 8+ messages in thread From: Konstantin Ananyev @ 2015-07-28 11:39 UTC (permalink / raw) To: dev For 2.1 release, in attempt to minimize number of RX routines to support, ixgbe scatter and ixgbe LRO RX routines were merged into one that can handle both cases. Though I completely missed the fact, that while LRO could only be used when HW CRC strip is enabled, scatter RX should work for both cases (HW CRC strip on/off). That patch restores missed functionality. Fixes: 9d8a92628f21 ("ixgbe: remove simple scalar scattered Rx method") v2 changes: - updated commit message with 'Fixes'. Signed-off-by: Konstantin Ananyev <konstantin.ananyev@intel.com> --- drivers/net/ixgbe/ixgbe_rxtx.c | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) diff --git a/drivers/net/ixgbe/ixgbe_rxtx.c b/drivers/net/ixgbe/ixgbe_rxtx.c index a0c8847..a1b25aa 100644 --- a/drivers/net/ixgbe/ixgbe_rxtx.c +++ b/drivers/net/ixgbe/ixgbe_rxtx.c @@ -1817,6 +1817,25 @@ next_desc: ixgbe_fill_cluster_head_buf(first_seg, &rxd, rxq->port_id, staterr); + /* + * Deal with the case, when HW CRC srip is disabled. + * That can't happen when LRO is enabled, but still could + * happen for scattered RX mode. + */ + first_seg->pkt_len -= rxq->crc_len; + if (unlikely(rxm->data_len <= rxq->crc_len)) { + struct rte_mbuf *lp; + + for (lp = first_seg; lp->next != rxm; lp = lp->next) + ; + + first_seg->nb_segs--; + lp->data_len -= rxq->crc_len - rxm->data_len; + lp->next = NULL; + rte_pktmbuf_free_seg(rxm); + } else + rxm->data_len -= rxq->crc_len; + /* Prefetch data of first segment, if configured to do so. */ rte_packet_prefetch((char *)first_seg->buf_addr + first_seg->data_off); -- 1.8.3.1 ^ permalink raw reply [flat|nested] 8+ messages in thread
* [dpdk-dev] [PATCHv2 2/2] ixgbe: fix vector scatter RX could produce wrong nb_segs value 2015-07-28 11:39 ` [dpdk-dev] [PATCHv2 0/2] ixgbe: Two fixes for RX scatter functions Konstantin Ananyev 2015-07-28 11:39 ` [dpdk-dev] [PATCHv2 1/2] ixgbe: fix scalar scatter RX doesn't take into account CRC length Konstantin Ananyev @ 2015-07-28 11:39 ` Konstantin Ananyev 2015-07-29 1:51 ` [dpdk-dev] [PATCHv2 0/2] ixgbe: Two fixes for RX scatter functions Lu, Wenzhuo 2 siblings, 0 replies; 8+ messages in thread From: Konstantin Ananyev @ 2015-07-28 11:39 UTC (permalink / raw) To: dev Fixes: cf4b4708a88a (ixgbe: improve slow-path perf with vector scattered Rx) v2: changes: - updated commit message with 'Fixes'. Signed-off-by: Konstantin Ananyev <konstantin.ananyev@intel.com> --- drivers/net/ixgbe/ixgbe_rxtx_vec.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/drivers/net/ixgbe/ixgbe_rxtx_vec.c b/drivers/net/ixgbe/ixgbe_rxtx_vec.c index 6c1647e..1c16dec 100644 --- a/drivers/net/ixgbe/ixgbe_rxtx_vec.c +++ b/drivers/net/ixgbe/ixgbe_rxtx_vec.c @@ -497,6 +497,8 @@ reassemble_packets(struct ixgbe_rx_queue *rxq, struct rte_mbuf **rx_bufs, 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 - -- 1.8.3.1 ^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [dpdk-dev] [PATCHv2 0/2] ixgbe: Two fixes for RX scatter functions. 2015-07-28 11:39 ` [dpdk-dev] [PATCHv2 0/2] ixgbe: Two fixes for RX scatter functions Konstantin Ananyev 2015-07-28 11:39 ` [dpdk-dev] [PATCHv2 1/2] ixgbe: fix scalar scatter RX doesn't take into account CRC length Konstantin Ananyev 2015-07-28 11:39 ` [dpdk-dev] [PATCHv2 2/2] ixgbe: fix vector scatter RX could produce wrong nb_segs value Konstantin Ananyev @ 2015-07-29 1:51 ` Lu, Wenzhuo 2015-07-29 22:59 ` Thomas Monjalon 2 siblings, 1 reply; 8+ messages in thread From: Lu, Wenzhuo @ 2015-07-29 1:51 UTC (permalink / raw) To: Ananyev, Konstantin, dev Hi, Acked-by: Wenzhuo Lu <wenzhuo.lu@intel.com> ^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [dpdk-dev] [PATCHv2 0/2] ixgbe: Two fixes for RX scatter functions. 2015-07-29 1:51 ` [dpdk-dev] [PATCHv2 0/2] ixgbe: Two fixes for RX scatter functions Lu, Wenzhuo @ 2015-07-29 22:59 ` Thomas Monjalon 0 siblings, 0 replies; 8+ messages in thread From: Thomas Monjalon @ 2015-07-29 22:59 UTC (permalink / raw) To: Ananyev, Konstantin; +Cc: dev > Acked-by: Wenzhuo Lu <wenzhuo.lu@intel.com> Applied, thanks ^ permalink raw reply [flat|nested] 8+ messages in thread
* [dpdk-dev] [PATCH 2/2] ixgbe: fix vector scatter RX could produce wrong nb_segs value 2015-07-28 9:41 [dpdk-dev] [PATCH 0/2] ixgbe: Two fixes for RX scatter functions Konstantin Ananyev 2015-07-28 9:41 ` [dpdk-dev] [PATCH 1/2] ixgbe: fix scalar scatter RX doesn't take into account CRC length Konstantin Ananyev @ 2015-07-28 9:41 ` Konstantin Ananyev 1 sibling, 0 replies; 8+ messages in thread From: Konstantin Ananyev @ 2015-07-28 9:41 UTC (permalink / raw) To: dev Signed-off-by: Konstantin Ananyev <konstantin.ananyev@intel.com> --- drivers/net/ixgbe/ixgbe_rxtx_vec.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/drivers/net/ixgbe/ixgbe_rxtx_vec.c b/drivers/net/ixgbe/ixgbe_rxtx_vec.c index 6c1647e..1c16dec 100644 --- a/drivers/net/ixgbe/ixgbe_rxtx_vec.c +++ b/drivers/net/ixgbe/ixgbe_rxtx_vec.c @@ -497,6 +497,8 @@ reassemble_packets(struct ixgbe_rx_queue *rxq, struct rte_mbuf **rx_bufs, 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 - -- 1.8.3.1 ^ permalink raw reply [flat|nested] 8+ messages in thread
end of thread, other threads:[~2015-07-29 23:01 UTC | newest] Thread overview: 8+ messages (download: mbox.gz / follow: Atom feed) -- links below jump to the message on this page -- 2015-07-28 9:41 [dpdk-dev] [PATCH 0/2] ixgbe: Two fixes for RX scatter functions Konstantin Ananyev 2015-07-28 9:41 ` [dpdk-dev] [PATCH 1/2] ixgbe: fix scalar scatter RX doesn't take into account CRC length Konstantin Ananyev 2015-07-28 11:39 ` [dpdk-dev] [PATCHv2 0/2] ixgbe: Two fixes for RX scatter functions Konstantin Ananyev 2015-07-28 11:39 ` [dpdk-dev] [PATCHv2 1/2] ixgbe: fix scalar scatter RX doesn't take into account CRC length Konstantin Ananyev 2015-07-28 11:39 ` [dpdk-dev] [PATCHv2 2/2] ixgbe: fix vector scatter RX could produce wrong nb_segs value Konstantin Ananyev 2015-07-29 1:51 ` [dpdk-dev] [PATCHv2 0/2] ixgbe: Two fixes for RX scatter functions Lu, Wenzhuo 2015-07-29 22:59 ` Thomas Monjalon 2015-07-28 9:41 ` [dpdk-dev] [PATCH 2/2] ixgbe: fix vector scatter RX could produce wrong nb_segs value Konstantin Ananyev
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).