DPDK patches and discussions
 help / color / mirror / Atom feed
From: Qi Zhang <qi.z.zhang@intel.com>
To: beilei.xing@intel.com, wenzhuo.lu@intel.com
Cc: dev@dpdk.org, Qi Zhang <qi.z.zhang@intel.com>, stable@dpdk.org
Subject: [dpdk-dev] [PATCH v2] net/i40e: fix scattered Rx enabling
Date: Wed, 10 Apr 2019 23:26:23 +0800	[thread overview]
Message-ID: <20190410152623.27995-1-qi.z.zhang@intel.com> (raw)
Message-ID: <20190410152623.DK9D4PKD579DJww0vrKeMiNSeMiIch8aVhp5G8eOOB0@z> (raw)

No need to add additional vlan tag size for max packet size, since
for i40e, the queue's Rx Max Frame Size (rxq->max_pkt_len) already
includes the vlan header size.

Fixes: a3c83a2527e1 ("net/i40e: enable runtime queue setup")
Fixes: 4861cde46116 ("i40e: new poll mode driver")
Cc: stable@dpdk.org

Signed-off-by: Qi Zhang <qi.z.zhang@intel.com>
---

v2:
- add missing fix in i40evf_rxq_init.
- fix checkpatch warning.

 drivers/net/i40e/i40e_ethdev_vf.c | 3 +--
 drivers/net/i40e/i40e_rxtx.c      | 5 ++---
 2 files changed, 3 insertions(+), 5 deletions(-)

diff --git a/drivers/net/i40e/i40e_ethdev_vf.c b/drivers/net/i40e/i40e_ethdev_vf.c
index add7b2223..87c45f278 100644
--- a/drivers/net/i40e/i40e_ethdev_vf.c
+++ b/drivers/net/i40e/i40e_ethdev_vf.c
@@ -1785,9 +1785,8 @@ i40evf_rxq_init(struct rte_eth_dev *dev, struct i40e_rx_queue *rxq)
 	}
 
 	if ((dev_data->dev_conf.rxmode.offloads & DEV_RX_OFFLOAD_SCATTER) ||
-	    (rxq->max_pkt_len + 2 * I40E_VLAN_TAG_SIZE) > buf_size) {
+	    rxq->max_pkt_len > buf_size)
 		dev_data->scattered_rx = 1;
-	}
 
 	return 0;
 }
diff --git a/drivers/net/i40e/i40e_rxtx.c b/drivers/net/i40e/i40e_rxtx.c
index 8f727fae6..58ed8145d 100644
--- a/drivers/net/i40e/i40e_rxtx.c
+++ b/drivers/net/i40e/i40e_rxtx.c
@@ -1718,7 +1718,7 @@ i40e_dev_rx_queue_setup_runtime(struct rte_eth_dev *dev,
 		(uint16_t)(rte_pktmbuf_data_room_size(rxq->mp) -
 			   RTE_PKTMBUF_HEADROOM);
 	int use_scattered_rx =
-		((rxq->max_pkt_len + 2 * I40E_VLAN_TAG_SIZE) > buf_size);
+		(rxq->max_pkt_len > buf_size);
 
 	if (i40e_rx_queue_init(rxq) != I40E_SUCCESS) {
 		PMD_DRV_LOG(ERR,
@@ -2708,9 +2708,8 @@ i40e_rx_queue_init(struct i40e_rx_queue *rxq)
 		RTE_PKTMBUF_HEADROOM);
 
 	/* Check if scattered RX needs to be used. */
-	if ((rxq->max_pkt_len + 2 * I40E_VLAN_TAG_SIZE) > buf_size) {
+	if (rxq->max_pkt_len > buf_size)
 		dev_data->scattered_rx = 1;
-	}
 
 	/* Init the RX tail regieter. */
 	I40E_PCI_REG_WRITE(rxq->qrx_tail, rxq->nb_rx_desc - 1);
-- 
2.13.6


             reply	other threads:[~2019-04-10 15:24 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-04-10 15:26 Qi Zhang [this message]
2019-04-10 15:26 ` Qi Zhang
2019-04-12  1:44 ` Lu, Wenzhuo
2019-04-12  1:44   ` Lu, Wenzhuo
2019-04-12  2:12   ` Zhang, Qi Z
2019-04-12  2:12     ` Zhang, Qi Z

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=20190410152623.27995-1-qi.z.zhang@intel.com \
    --to=qi.z.zhang@intel.com \
    --cc=beilei.xing@intel.com \
    --cc=dev@dpdk.org \
    --cc=stable@dpdk.org \
    --cc=wenzhuo.lu@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).