DPDK patches and discussions
 help / color / mirror / Atom feed
From: Helin Zhang <helin.zhang@intel.com>
To: dev@dpdk.org
Subject: [dpdk-dev] [PATCH v3 4/5] i40e: support of configurable crc stripping in rx queue
Date: Thu,  6 Nov 2014 20:53:49 +0800
Message-ID: <1415278430-17920-5-git-send-email-helin.zhang@intel.com> (raw)
In-Reply-To: <1415278430-17920-1-git-send-email-helin.zhang@intel.com>

Support of configurable crc stripping in context of
VF RX queues.

Signed-off-by: Helin Zhang <helin.zhang@intel.com>
---
 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

  parent reply	other threads:[~2014-11-06 12:44 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-09-14 14:48 [dpdk-dev] [PATCH v2 0/5] support of configurable CRC stripping in VF Helin Zhang
2014-09-14 14:48 ` [dpdk-dev] [PATCH v2 1/5] config: remove useless i40e items in config files Helin Zhang
2014-09-14 14:48 ` [dpdk-dev] [PATCH v2 2/5] i40e: renaming and code style fix Helin Zhang
2014-09-14 14:48 ` [dpdk-dev] [PATCH v2 3/5] i40e: support of processing crc stripping config in PF host Helin Zhang
2014-09-14 14:48 ` [dpdk-dev] [PATCH v2 4/5] i40e: set crc stripping in rx queue configuration Helin Zhang
2014-09-29  2:51   ` Xu, HuilongX
2014-09-14 14:48 ` [dpdk-dev] [PATCH v2 5/5] i40evf: support of configurable crc stripping in VF Helin Zhang
2014-11-06 12:53 ` [dpdk-dev] [PATCH v3 0/5] support of configurable CRC " Helin Zhang
2014-11-06 12:53   ` [dpdk-dev] [PATCH v3 1/5] config: remove useless i40e items in config files Helin Zhang
2014-11-06 12:53   ` [dpdk-dev] [PATCH v3 2/5] i40evf: Remove 'host_is_dpdk', and use version number instead Helin Zhang
2014-11-06 12:53   ` [dpdk-dev] [PATCH v3 3/5] i40e: renaming and code style fix Helin Zhang
2014-11-06 12:53   ` Helin Zhang [this message]
2014-11-06 12:53   ` [dpdk-dev] [PATCH v3 5/5] i40e: support of configurable VF crc stripping Helin Zhang
2014-11-06 15:46   ` [dpdk-dev] [PATCH v3 0/5] support of configurable CRC stripping in VF Ananyev, Konstantin
2014-11-06 22:51     ` Thomas Monjalon

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1415278430-17920-5-git-send-email-helin.zhang@intel.com \
    --to=helin.zhang@intel.com \
    --cc=dev@dpdk.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link

DPDK patches and discussions

This inbox may be cloned and mirrored by anyone:

	git clone --mirror https://inbox.dpdk.org/dev/0 dev/git/0.git

	# If you have public-inbox 1.1+ installed, you may
	# initialize and index your mirror using the following commands:
	public-inbox-init -V2 dev dev/ https://inbox.dpdk.org/dev \
		dev@dpdk.org
	public-inbox-index dev

Example config snippet for mirrors.
Newsgroup available over NNTP:
	nntp://inbox.dpdk.org/inbox.dpdk.dev


AGPL code for this site: git clone https://public-inbox.org/public-inbox.git