DPDK patches and discussions
 help / color / mirror / Atom feed
From: "Chen Jing D(Mark)" <jing.d.chen@intel.com>
To: dev@dpdk.org
Cc: shaopeng.he@intel.com
Subject: [dpdk-dev] [PATCH v2 2/3] fm10k: remove mbuf size sanity check
Date: Fri, 12 Jun 2015 15:06:28 +0800	[thread overview]
Message-ID: <1434092789-11186-3-git-send-email-jing.d.chen@intel.com> (raw)
In-Reply-To: <1434092789-11186-1-git-send-email-jing.d.chen@intel.com>

From: "Chen Jing D(Mark)" <jing.d.chen@intel.com>

Original implementation required mbuf size should be greater than
ETHER_MAX_VLAN_FRAME_LEN, which is not necessary. If it's less
than that value, scatter function will be selected and incoming
packets greater than mbuf size will be filled into several mbufs.

Signed-off-by: Chen Jing D(Mark) <jing.d.chen@intel.com>
---
 drivers/net/fm10k/fm10k_ethdev.c |    7 +------
 1 files changed, 1 insertions(+), 6 deletions(-)

diff --git a/drivers/net/fm10k/fm10k_ethdev.c b/drivers/net/fm10k/fm10k_ethdev.c
index 393bcc3..714648b 100644
--- a/drivers/net/fm10k/fm10k_ethdev.c
+++ b/drivers/net/fm10k/fm10k_ethdev.c
@@ -1011,9 +1011,7 @@ handle_rxconf(struct fm10k_rx_queue *q, const struct rte_eth_rxconf *conf)
  *  2. Address is 8B aligned and buffer does not cross 4K boundary.
  *
  * As such, the driver may need to adjust the DMA address within the
- * buffer by up to 512B. The mempool element size is checked here
- * to make sure a maximally sized Ethernet frame can still be wholly
- * contained within the buffer after 512B alignment.
+ * buffer by up to 512B.
  *
  * return 1 if the element size is valid, otherwise return 0.
  */
@@ -1033,9 +1031,6 @@ mempool_element_size_valid(struct rte_mempool *mp)
 	if (min_size > mp->elt_size)
 		return 0;
 
-	if (min_size < ETHER_MAX_VLAN_FRAME_LEN)
-		return 0;
-
 	/* size is valid */
 	return 1;
 }
-- 
1.7.7.6

  parent reply	other threads:[~2015-06-12  7:06 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-06-05  9:02 [dpdk-dev] [PATCH 0/3] fm10k: Add promiscuous mode support Chen Jing D(Mark)
2015-06-05  9:02 ` [dpdk-dev] [PATCH 1/3] " Chen Jing D(Mark)
2015-06-09 15:20   ` Qiu, Michael
2015-06-10  5:54     ` Chen, Jing D
2015-06-12  7:06   ` [dpdk-dev] [PATCH v2 0/3] " Chen Jing D(Mark)
2015-06-12  7:06     ` [dpdk-dev] [PATCH v2 1/3] " Chen Jing D(Mark)
2015-06-12  7:06     ` Chen Jing D(Mark) [this message]
2015-06-12  7:06     ` [dpdk-dev] [PATCH v2 3/3] fm10k: Fix improper max queue number for VF Chen Jing D(Mark)
2015-06-16 12:10     ` [dpdk-dev] [PATCH v2 0/3] fm10k: Add promiscuous mode support Qiu, Michael
2015-06-16 12:28     ` Qiu, Michael
2015-06-22 13:14     ` Thomas Monjalon
2015-06-05  9:02 ` [dpdk-dev] [PATCH 2/3] fm10k: remove mbuf size sanity check Chen Jing D(Mark)
2015-06-05  9:02 ` [dpdk-dev] [PATCH 3/3] fm10k: Fix improper max queue number for VF Chen Jing D(Mark)

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=1434092789-11186-3-git-send-email-jing.d.chen@intel.com \
    --to=jing.d.chen@intel.com \
    --cc=dev@dpdk.org \
    --cc=shaopeng.he@intel.com \
    /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
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).