From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mga14.intel.com (mga14.intel.com [192.55.52.115]) by dpdk.org (Postfix) with ESMTP id 0123A7F38 for ; Thu, 6 Nov 2014 13:44:42 +0100 (CET) Received: from fmsmga001.fm.intel.com ([10.253.24.23]) by fmsmga103.fm.intel.com with ESMTP; 06 Nov 2014 04:47:50 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.07,325,1413270000"; d="scan'208";a="618175736" Received: from shvmail01.sh.intel.com ([10.239.29.42]) by fmsmga001.fm.intel.com with ESMTP; 06 Nov 2014 04:54:08 -0800 Received: from shecgisg004.sh.intel.com (shecgisg004.sh.intel.com [10.239.29.89]) by shvmail01.sh.intel.com with ESMTP id sA6Cs6EG010963; Thu, 6 Nov 2014 20:54:06 +0800 Received: from shecgisg004.sh.intel.com (localhost [127.0.0.1]) by shecgisg004.sh.intel.com (8.13.6/8.13.6/SuSE Linux 0.8) with ESMTP id sA6Cs49F017982; Thu, 6 Nov 2014 20:54:06 +0800 Received: (from hzhan75@localhost) by shecgisg004.sh.intel.com (8.13.6/8.13.6/Submit) id sA6Cs4eJ017978; Thu, 6 Nov 2014 20:54:04 +0800 From: Helin Zhang To: dev@dpdk.org Date: Thu, 6 Nov 2014 20:53:49 +0800 Message-Id: <1415278430-17920-5-git-send-email-helin.zhang@intel.com> X-Mailer: git-send-email 1.7.4.1 In-Reply-To: <1415278430-17920-1-git-send-email-helin.zhang@intel.com> References: <1410706109-30448-1-git-send-email-helin.zhang@intel.com> <1415278430-17920-1-git-send-email-helin.zhang@intel.com> Subject: [dpdk-dev] [PATCH v3 4/5] i40e: support of configurable crc stripping in rx queue X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: patches and discussions about DPDK List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 06 Nov 2014 12:44:43 -0000 Support of configurable crc stripping in context of VF RX queues. Signed-off-by: Helin Zhang --- lib/librte_pmd_i40e/i40e_pf.c | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) v2 changes: * Put setting the crc stripping into a single patch. v3 changes: * Added an input parameter for configuring crc stripping in RX queue context. diff --git a/lib/librte_pmd_i40e/i40e_pf.c b/lib/librte_pmd_i40e/i40e_pf.c index f4b4f2d..7f98636 100644 --- a/lib/librte_pmd_i40e/i40e_pf.c +++ b/lib/librte_pmd_i40e/i40e_pf.c @@ -56,6 +56,8 @@ #include "i40e_rxtx.h" #include "i40e_pf.h" +#define I40E_CFG_CRCSTRIP_DEFAULT 1 + static int i40e_pf_host_switch_queues(struct i40e_pf_vf *vf, struct i40e_virtchnl_queue_select *qsel, @@ -325,7 +327,8 @@ send_msg: static int i40e_pf_host_hmc_config_rxq(struct i40e_hw *hw, struct i40e_pf_vf *vf, - struct i40e_virtchnl_rxq_info *rxq) + struct i40e_virtchnl_rxq_info *rxq, + uint8_t crcstrip) { int err = I40E_SUCCESS; struct i40e_hmc_obj_rxq rx_ctx; @@ -354,7 +357,7 @@ i40e_pf_host_hmc_config_rxq(struct i40e_hw *hw, rx_ctx.tphdata_ena = 1; rx_ctx.tphhead_ena = 1; rx_ctx.lrxqthresh = 2; - rx_ctx.crcstrip = 1; + rx_ctx.crcstrip = crcstrip; rx_ctx.l2tsel = 1; rx_ctx.prefena = 1; @@ -434,8 +437,8 @@ i40e_pf_host_process_cmd_config_vsi_queues(struct i40e_pf_vf *vf, } /* Apply VF RX queue setting to HMC */ - if (i40e_pf_host_hmc_config_rxq(hw, vf, &vc_qpi[i].rxq) - != I40E_SUCCESS) { + if (i40e_pf_host_hmc_config_rxq(hw, vf, &vc_qpi[i].rxq, + I40E_CFG_CRCSTRIP_DEFAULT) != I40E_SUCCESS) { PMD_DRV_LOG(ERR, "Configure RX queue HMC failed"); ret = I40E_ERR_PARAM; goto send_msg; -- 1.8.1.4