From patchwork Wed Oct 28 16:55:45 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Wang, Haiyue" X-Patchwork-Id: 82675 X-Patchwork-Delegate: qi.z.zhang@intel.com Return-Path: X-Original-To: patchwork@inbox.dpdk.org Delivered-To: patchwork@inbox.dpdk.org Received: from dpdk.org (dpdk.org [92.243.14.124]) by inbox.dpdk.org (Postfix) with ESMTP id 128BDA04DD; Wed, 28 Oct 2020 18:08:30 +0100 (CET) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id 29E305928; Wed, 28 Oct 2020 18:08:28 +0100 (CET) Received: from mga18.intel.com (mga18.intel.com [134.134.136.126]) by dpdk.org (Postfix) with ESMTP id 9A1E756A3 for ; Wed, 28 Oct 2020 18:08:26 +0100 (CET) IronPort-SDR: gLbOfIVrTu2+dDJ4hbsoR6Oipr2SSQeJYtYL3Un/2zeKKWJr4xNGd11AlaVq97OOvPP8HCM5Bv 6ULll43ybxDw== X-IronPort-AV: E=McAfee;i="6000,8403,9788"; a="156071197" X-IronPort-AV: E=Sophos;i="5.77,427,1596524400"; d="scan'208";a="156071197" X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from orsmga004.jf.intel.com ([10.7.209.38]) by orsmga106.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 28 Oct 2020 10:08:24 -0700 IronPort-SDR: F5snjaKNCFDXySefXi5y2yHQL0lE/GTYrJzmeuZ9UiWFySNdNdunfSH0gAxXnCGl7F0GMirpoS Z81zRLx3t8xQ== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.77,427,1596524400"; d="scan'208";a="468804194" Received: from npg-dpdk-haiyue-3.sh.intel.com ([10.67.118.151]) by orsmga004.jf.intel.com with ESMTP; 28 Oct 2020 10:08:22 -0700 From: Haiyue Wang To: dev@dpdk.org Cc: qi.z.zhang@intel.com, Haiyue Wang , Alvin Zhang , Qiming Yang , Jeff Guo Date: Thu, 29 Oct 2020 00:55:45 +0800 Message-Id: <20201028165545.20665-1-haiyue.wang@intel.com> X-Mailer: git-send-email 2.29.0 MIME-Version: 1.0 Subject: [dpdk-dev] [PATCH v1] net/ice: fix DCF Rx segmentation fault X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org Sender: "dev" The initialization for the handler of Rx FlexiMD fields extraction into mbuf is missed, it will cause segmentation fault (core dumped). Fixes: 7a340b0b4e03 ("net/ice: refactor Rx FlexiMD handling") Reported-by: Alvin Zhang Signed-off-by: Haiyue Wang Acked-by: Qi Zhang --- drivers/net/ice/ice_dcf.c | 1 + drivers/net/ice/ice_rxtx.c | 2 +- drivers/net/ice/ice_rxtx.h | 2 ++ 3 files changed, 4 insertions(+), 1 deletion(-) diff --git a/drivers/net/ice/ice_dcf.c b/drivers/net/ice/ice_dcf.c index d20e2b3f48..44dbd3bb84 100644 --- a/drivers/net/ice/ice_dcf.c +++ b/drivers/net/ice/ice_dcf.c @@ -899,6 +899,7 @@ ice_dcf_configure_queues(struct ice_dcf_hw *hw) return -EINVAL; } #endif + ice_select_rxd_to_pkt_fields_handler(rxq[i], vc_qp->rxq.rxdid); } memset(&args, 0, sizeof(args)); diff --git a/drivers/net/ice/ice_rxtx.c b/drivers/net/ice/ice_rxtx.c index f6291894cd..860ffb7f67 100644 --- a/drivers/net/ice/ice_rxtx.c +++ b/drivers/net/ice/ice_rxtx.c @@ -148,7 +148,7 @@ ice_rxd_to_pkt_fields_by_comms_aux_v2(struct ice_rx_queue *rxq, #endif } -static void +void ice_select_rxd_to_pkt_fields_handler(struct ice_rx_queue *rxq, uint32_t rxdid) { switch (rxdid) { diff --git a/drivers/net/ice/ice_rxtx.h b/drivers/net/ice/ice_rxtx.h index 23409d479a..6b16716063 100644 --- a/drivers/net/ice/ice_rxtx.h +++ b/drivers/net/ice/ice_rxtx.h @@ -234,6 +234,8 @@ int ice_rx_descriptor_status(void *rx_queue, uint16_t offset); int ice_tx_descriptor_status(void *tx_queue, uint16_t offset); void ice_set_default_ptype_table(struct rte_eth_dev *dev); const uint32_t *ice_dev_supported_ptypes_get(struct rte_eth_dev *dev); +void ice_select_rxd_to_pkt_fields_handler(struct ice_rx_queue *rxq, + uint32_t rxdid); int ice_rx_vec_dev_check(struct rte_eth_dev *dev); int ice_tx_vec_dev_check(struct rte_eth_dev *dev);