[dpdk-dev,v2,4/5] i40e: set crc stripping in rx queue configuration
Commit Message
Tested-by: HuilongX xu <huilongx.xu@intel.com>
This patch has been verified on FC20 with eagle fountain:4*10G fortville, spirit falls 1*40G fortville and 2*40G fortville.
The VF is greater by SRIOV, and testpmd should be run on host to support VF work on VM.
CRC stripping function works well in the testpmd app in VM and host.
Test environment information detail information as the following:
HOST environment:
CPU: Intel(R) Xeon(R) CPU E5-2680 v2 @ 2.80GHz
OS: Linux 3.11.10-301.fc20.x86_64
GCC: 4.8.3
NIC: Eagle Fountain:4*10G fortville, Spirit Falls 1*40G fortville and 2*40G fortville.
VM environment generated by KVM:
CPU: Intel(R) Xeon(R) CPU E5-2680 v2 @ 2.80GHz
OS: Linux 3.11.10-301.fc20.x86_64
GCC: 4.8.2
NIC: VF generated through SRIOV
-----Original Message-----
From: dev [mailto:dev-bounces@dpdk.org] On Behalf Of Helin Zhang
Sent: Sunday, September 14, 2014 10:48 PM
To: dev@dpdk.org
Subject: [dpdk-dev] [PATCH v2 4/5] i40e: set crc stripping in rx queue configuration
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(-)
@@ -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;