patches for DPDK stable branches
 help / color / mirror / Atom feed
* [dpdk-stable] [PATCH v1] net/ice: fix build with 16 byte Rx descriptor in DCF
@ 2020-07-03  8:57 Ting Xu
  2020-07-03 13:28 ` Zhang, Qi Z
  0 siblings, 1 reply; 2+ messages in thread
From: Ting Xu @ 2020-07-03  8:57 UTC (permalink / raw)
  To: dev; +Cc: qiming.yang, qi.z.zhang, stable

Fix the build error in DCF when CONFIG_RTE_LIBRTE_ICE_16BYTE_RX_DESC
compilation option is enabled. Legacy 16 byte Rx descriptor is not
supported in DCF. If it is enabled, DCF configuration stops.

Fixes: 929eceefaba7 ("net/ice: add queue start and stop for DCF")
Cc: stable@dpdk.org

Signed-off-by: Ting Xu <ting.xu@intel.com>
---
 drivers/net/ice/ice_dcf.c        | 15 +++++++++++++++
 drivers/net/ice/ice_dcf_ethdev.c |  4 +++-
 2 files changed, 18 insertions(+), 1 deletion(-)

diff --git a/drivers/net/ice/ice_dcf.c b/drivers/net/ice/ice_dcf.c
index 712f43825..2d803c57a 100644
--- a/drivers/net/ice/ice_dcf.c
+++ b/drivers/net/ice/ice_dcf.c
@@ -827,6 +827,7 @@ ice_dcf_init_rss(struct ice_dcf_hw *hw)
 	return 0;
 }
 
+#define IAVF_RXDID_LEGACY_0 0
 #define IAVF_RXDID_LEGACY_1 1
 #define IAVF_RXDID_COMMS_GENERIC 16
 
@@ -872,6 +873,7 @@ ice_dcf_configure_queues(struct ice_dcf_hw *hw)
 		vc_qp->rxq.dma_ring_addr = rxq[i]->rx_ring_dma;
 		vc_qp->rxq.databuffer_size = rxq[i]->rx_buf_len;
 
+#ifndef RTE_LIBRTE_ICE_16BYTE_RX_DESC
 		if (hw->vf_res->vf_cap_flags &
 		    VIRTCHNL_VF_OFFLOAD_RX_FLEX_DESC &&
 		    hw->supported_rxdid &
@@ -883,6 +885,19 @@ ice_dcf_configure_queues(struct ice_dcf_hw *hw)
 			PMD_DRV_LOG(ERR, "RXDID 16 is not supported");
 			return -EINVAL;
 		}
+#else
+		if (hw->vf_res->vf_cap_flags &
+			VIRTCHNL_VF_OFFLOAD_RX_FLEX_DESC &&
+			hw->supported_rxdid &
+			BIT(IAVF_RXDID_LEGACY_0)) {
+			vc_qp->rxq.rxdid = IAVF_RXDID_LEGACY_0;
+			PMD_DRV_LOG(NOTICE, "request RXDID == %d in "
+					"Queue[%d]", vc_qp->rxq.rxdid, i);
+		} else {
+			PMD_DRV_LOG(ERR, "RXDID == 0 is not supported");
+			return -EINVAL;
+		}
+#endif
 	}
 
 	memset(&args, 0, sizeof(args));
diff --git a/drivers/net/ice/ice_dcf_ethdev.c b/drivers/net/ice/ice_dcf_ethdev.c
index c39dfc1cc..2faed3cc7 100644
--- a/drivers/net/ice/ice_dcf_ethdev.c
+++ b/drivers/net/ice/ice_dcf_ethdev.c
@@ -230,7 +230,7 @@ ice_dcf_config_rx_queues_irqs(struct rte_eth_dev *dev,
 static int
 alloc_rxq_mbufs(struct ice_rx_queue *rxq)
 {
-	volatile union ice_32b_rx_flex_desc *rxd;
+	volatile union ice_rx_flex_desc *rxd;
 	struct rte_mbuf *mbuf = NULL;
 	uint64_t dma_addr;
 	uint16_t i;
@@ -254,8 +254,10 @@ alloc_rxq_mbufs(struct ice_rx_queue *rxq)
 		rxd = &rxq->rx_ring[i];
 		rxd->read.pkt_addr = dma_addr;
 		rxd->read.hdr_addr = 0;
+#ifndef RTE_LIBRTE_ICE_16BYTE_RX_DESC
 		rxd->read.rsvd1 = 0;
 		rxd->read.rsvd2 = 0;
+#endif
 
 		rxq->sw_ring[i].mbuf = (void *)mbuf;
 	}
-- 
2.17.1


^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: [dpdk-stable] [PATCH v1] net/ice: fix build with 16 byte Rx descriptor in DCF
  2020-07-03  8:57 [dpdk-stable] [PATCH v1] net/ice: fix build with 16 byte Rx descriptor in DCF Ting Xu
@ 2020-07-03 13:28 ` Zhang, Qi Z
  0 siblings, 0 replies; 2+ messages in thread
From: Zhang, Qi Z @ 2020-07-03 13:28 UTC (permalink / raw)
  To: Xu, Ting, dev; +Cc: Yang, Qiming, stable



> -----Original Message-----
> From: Xu, Ting <ting.xu@intel.com>
> Sent: Friday, July 3, 2020 4:57 PM
> To: dev@dpdk.org
> Cc: Yang, Qiming <qiming.yang@intel.com>; Zhang, Qi Z
> <qi.z.zhang@intel.com>; stable@dpdk.org
> Subject: [PATCH v1] net/ice: fix build with 16 byte Rx descriptor in DCF
> 
> Fix the build error in DCF when CONFIG_RTE_LIBRTE_ICE_16BYTE_RX_DESC
> compilation option is enabled. Legacy 16 byte Rx descriptor is not supported
> in DCF. If it is enabled, DCF configuration stops.
> 
> Fixes: 929eceefaba7 ("net/ice: add queue start and stop for DCF")
> Cc: stable@dpdk.org

cc stable is not necessary since fix on latest release.

> 
> Signed-off-by: Ting Xu <ting.xu@intel.com>

Acked-by: Qi Zhang <qi.z.zhang@intel.com>

Applied to dpdk-next-net-intel.

Thanks
Qi

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2020-07-03 13:28 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-07-03  8:57 [dpdk-stable] [PATCH v1] net/ice: fix build with 16 byte Rx descriptor in DCF Ting Xu
2020-07-03 13:28 ` Zhang, Qi Z

patches for DPDK stable branches

This inbox may be cloned and mirrored by anyone:

	git clone --mirror https://inbox.dpdk.org/stable/0 stable/git/0.git

	# If you have public-inbox 1.1+ installed, you may
	# initialize and index your mirror using the following commands:
	public-inbox-init -V2 stable stable/ https://inbox.dpdk.org/stable \
		stable@dpdk.org
	public-inbox-index stable

Example config snippet for mirrors.
Newsgroup available over NNTP:
	nntp://inbox.dpdk.org/inbox.dpdk.stable


AGPL code for this site: git clone https://public-inbox.org/public-inbox.git