DPDK patches and discussions
 help / color / mirror / Atom feed
From: eduser25@gmail.com
To: qi.z.zhang@intel.com
Cc: dev@dpdk.org, Eduard Serra <eduser25@gmail.com>
Subject: [dpdk-dev] [PATCH] net/i40e/vf: reset scatter_rx flag when configuration complies
Date: Thu, 29 Mar 2018 13:13:27 -0700	[thread overview]
Message-ID: <1522354407-90598-1-git-send-email-eduser25@gmail.com> (raw)

From: Eduard Serra <eduser25@gmail.com>

Scatter RX (scattered_rx) flag is currently not being resetted
when new configuration is suplied to reconfigure a port,
rendering the rx callback logic to always fall through the
scatter branch.

Signed-off-by: Eduard Serra <eduser25@gmail.com>
---
 drivers/net/i40e/i40e_ethdev_vf.c | 2 ++
 drivers/net/i40e/i40e_rxtx.c      | 2 ++
 2 files changed, 4 insertions(+)

diff --git a/drivers/net/i40e/i40e_ethdev_vf.c b/drivers/net/i40e/i40e_ethdev_vf.c
index 750d849..a072154 100644
--- a/drivers/net/i40e/i40e_ethdev_vf.c
+++ b/drivers/net/i40e/i40e_ethdev_vf.c
@@ -1750,6 +1750,8 @@ i40evf_rxq_init(struct rte_eth_dev *dev, struct i40e_rx_queue *rxq)
 	if (dev_data->dev_conf.rxmode.enable_scatter ||
 	    (rxq->max_pkt_len + 2 * I40E_VLAN_TAG_SIZE) > buf_size) {
 		dev_data->scattered_rx = 1;
+	} else {
+		dev_data->scattered_rx = 0;
 	}
 
 	return 0;
diff --git a/drivers/net/i40e/i40e_rxtx.c b/drivers/net/i40e/i40e_rxtx.c
index 1217e5a..8698747 100644
--- a/drivers/net/i40e/i40e_rxtx.c
+++ b/drivers/net/i40e/i40e_rxtx.c
@@ -2561,6 +2561,8 @@ i40e_rx_queue_init(struct i40e_rx_queue *rxq)
 	/* Check if scattered RX needs to be used. */
 	if ((rxq->max_pkt_len + 2 * I40E_VLAN_TAG_SIZE) > buf_size) {
 		dev_data->scattered_rx = 1;
+	} else {
+		dev_data->scattered_rx = 0;
 	}
 
 	/* Init the RX tail regieter. */
-- 
2.7.4

             reply	other threads:[~2018-03-29 20:13 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-03-29 20:13 eduser25 [this message]
2018-04-02 12:14 ` Zhang, Qi Z
2018-04-06  8:46   ` Zhang, Helin
2018-04-06 15:53   ` Zhang, Helin
2018-04-06 16:00     ` 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=1522354407-90598-1-git-send-email-eduser25@gmail.com \
    --to=eduser25@gmail.com \
    --cc=dev@dpdk.org \
    --cc=qi.z.zhang@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).