From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from dpdk.org (dpdk.org [92.243.14.124]) by inbox.dpdk.org (Postfix) with ESMTP id 55F18A0522 for ; Fri, 3 Jul 2020 10:58:19 +0200 (CEST) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id 1C2E31DA75; Fri, 3 Jul 2020 10:58:19 +0200 (CEST) Received: from mga01.intel.com (mga01.intel.com [192.55.52.88]) by dpdk.org (Postfix) with ESMTP id EB53A1BFD4; Fri, 3 Jul 2020 10:58:15 +0200 (CEST) IronPort-SDR: aFTQNKj9ME7Bv4S9T7bZG0ZqXuX4xNpfLscQjSinohi0uU7klTbKq/qWtBqR9dvokCIjF7oLIy p5JIxvjLze4w== X-IronPort-AV: E=McAfee;i="6000,8403,9670"; a="165183868" X-IronPort-AV: E=Sophos;i="5.75,307,1589266800"; d="scan'208";a="165183868" X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from fmsmga005.fm.intel.com ([10.253.24.32]) by fmsmga101.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 03 Jul 2020 01:58:14 -0700 IronPort-SDR: x3iLmwP8nziDKhD2q2GrxNOT2FBtmP18yxhTtfEYzU9pfaumiutY/R+XbhP38RG+LNTC9ZF/o6 8rsPCS+O0xxg== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.75,307,1589266800"; d="scan'208";a="482309120" Received: from dpdk-xuting-main.sh.intel.com ([10.67.117.84]) by fmsmga005.fm.intel.com with ESMTP; 03 Jul 2020 01:58:13 -0700 From: Ting Xu To: dev@dpdk.org Cc: qiming.yang@intel.com, qi.z.zhang@intel.com, stable@dpdk.org Date: Fri, 3 Jul 2020 16:57:10 +0800 Message-Id: <20200703085710.55719-1-ting.xu@intel.com> X-Mailer: git-send-email 2.17.1 Subject: [dpdk-stable] [PATCH v1] net/ice: fix build with 16 byte Rx descriptor in DCF X-BeenThere: stable@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: patches for DPDK stable branches List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: stable-bounces@dpdk.org Sender: "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 --- 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