[dpdk-dev,v2,4/5] i40e: set crc stripping in rx queue configuration

Message ID 1410706109-30448-5-git-send-email-helin.zhang@intel.com (mailing list archive)
State Superseded, archived
Headers

Commit Message

Zhang, Helin Sept. 14, 2014, 2:48 p.m. UTC
  It enables/disables the crc stripping in the rx queue contexts,
according to the extra configuration carried from VF.

v2 changes:
* Put setting the crc stripping into a single patch.

Signed-off-by: Helin Zhang <helin.zhang@intel.com>
Reviewed-by: Jingjing Wu <jingjing.wu@intel.com>
Reviewed-by: Jing Chen <jing.d.chen@intel.com>
---
 lib/librte_pmd_i40e/i40e_pf.c | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)
  

Patch

diff --git a/lib/librte_pmd_i40e/i40e_pf.c b/lib/librte_pmd_i40e/i40e_pf.c
index bc9bfcb..2910fd5 100644
--- a/lib/librte_pmd_i40e/i40e_pf.c
+++ b/lib/librte_pmd_i40e/i40e_pf.c
@@ -357,7 +357,10 @@  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;
+	if (qpei) /* For DPDK PF host */
+		rx_ctx.crcstrip = qpei->crcstrip ? 1 : 0;
+	else /* For Linux PF host */
+		rx_ctx.crcstrip = 1;
 	rx_ctx.l2tsel = 1;
 	rx_ctx.prefena = 1;