patches for DPDK stable branches
 help / color / mirror / Atom feed
From: Yuanhan Liu <yuanhan.liu@linux.intel.com>
To: Jia Yu <jyu@vmware.com>
Cc: Yuanhan Liu <yuanhan.liu@linux.intel.com>,
	Wenzhuo Lu <wenzhuo.lu@intel.com>, dpdk stable <stable@dpdk.org>
Subject: [dpdk-stable] patch 'net/ixgbe: fix setting MTU on stopped device' has been queued to LTS release 16.11.2
Date: Mon,  8 May 2017 13:40:18 +0800	[thread overview]
Message-ID: <1494222024-5222-6-git-send-email-yuanhan.liu@linux.intel.com> (raw)
In-Reply-To: <1494222024-5222-1-git-send-email-yuanhan.liu@linux.intel.com>

Hi,

FYI, your patch has been queued to LTS release 16.11.2

Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable
yet. It will be pushed if I get no objections before 05/13/17.
So please shout if anyone has objections.

Thanks.

	--yliu

---
>From 774c084d7d95db35645d3ce709d28dbef78f38d9 Mon Sep 17 00:00:00 2001
From: Jia Yu <jyu@vmware.com>
Date: Thu, 27 Apr 2017 23:11:31 -0700
Subject: [PATCH] net/ixgbe: fix setting MTU on stopped device

[ upstream commit 22d0e5aed3c22bd8b08d58cfd2ed261d5e45ae9c ]

There exists case that software sets mtu (i.e jumbo frame) of
ixgbe device when it's stopped. Before the fix, scattered_rx
is cleared during device stop, and setting jumbo frame mtu
after device stop will always fail as scattered_rx is 0.

Signed-off-by: Jia Yu <jyu@vmware.com>
Acked-by: Wenzhuo Lu <wenzhuo.lu@intel.com>
---
 drivers/net/ixgbe/ixgbe_ethdev.c | 6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)

diff --git a/drivers/net/ixgbe/ixgbe_ethdev.c b/drivers/net/ixgbe/ixgbe_ethdev.c
index 0fdf010..d6686f6 100644
--- a/drivers/net/ixgbe/ixgbe_ethdev.c
+++ b/drivers/net/ixgbe/ixgbe_ethdev.c
@@ -4090,6 +4090,7 @@ ixgbe_dev_mtu_set(struct rte_eth_dev *dev, uint16_t mtu)
 	struct ixgbe_hw *hw;
 	struct rte_eth_dev_info dev_info;
 	uint32_t frame_size = mtu + ETHER_HDR_LEN + ETHER_CRC_LEN;
+	struct rte_eth_rxmode *rx_conf = &dev->data->dev_conf.rxmode;
 
 	ixgbe_dev_info_get(dev, &dev_info);
 
@@ -4100,7 +4101,7 @@ ixgbe_dev_mtu_set(struct rte_eth_dev *dev, uint16_t mtu)
 	/* refuse mtu that requires the support of scattered packets when this
 	 * feature has not been enabled before.
 	 */
-	if (!dev->data->scattered_rx &&
+	if (!rx_conf->enable_scatter &&
 	    (frame_size + 2 * IXGBE_VLAN_TAG_SIZE >
 	     dev->data->min_rx_buf_size - RTE_PKTMBUF_HEADROOM))
 		return -EINVAL;
@@ -5723,6 +5724,7 @@ ixgbevf_dev_set_mtu(struct rte_eth_dev *dev, uint16_t mtu)
 {
 	struct ixgbe_hw *hw;
 	uint32_t max_frame = mtu + ETHER_HDR_LEN + ETHER_CRC_LEN;
+	struct rte_eth_rxmode *rx_conf = &dev->data->dev_conf.rxmode;
 
 	hw = IXGBE_DEV_PRIVATE_TO_HW(dev->data->dev_private);
 
@@ -5732,7 +5734,7 @@ ixgbevf_dev_set_mtu(struct rte_eth_dev *dev, uint16_t mtu)
 	/* refuse mtu that requires the support of scattered packets when this
 	 * feature has not been enabled before.
 	 */
-	if (!dev->data->scattered_rx &&
+	if (!rx_conf->enable_scatter &&
 	    (max_frame + 2 * IXGBE_VLAN_TAG_SIZE >
 	     dev->data->min_rx_buf_size - RTE_PKTMBUF_HEADROOM))
 		return -EINVAL;
-- 
1.9.0

  parent reply	other threads:[~2017-05-08  5:44 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-05-08  5:40 [dpdk-stable] patch 'kni: fix crash caused by freeing mempool' " Yuanhan Liu
2017-05-08  5:40 ` [dpdk-stable] patch 'net: fix stripped VLAN flag for offload emulation' " Yuanhan Liu
2017-05-08  5:40 ` [dpdk-stable] patch 'net/igb: fix VF MAC address setting' " Yuanhan Liu
2017-05-08  5:40 ` Yuanhan Liu
2017-05-08  5:40 ` [dpdk-stable] patch 'net/ixgbe: fix VF Rx mode for allmulticast disabled' " Yuanhan Liu
2017-05-08  5:40 ` Yuanhan Liu [this message]
2017-05-08  5:40 ` [dpdk-stable] patch 'net/ixgbe: fix memory overflow in 32-bit SSE Rx' " Yuanhan Liu
2017-05-08  5:40 ` [dpdk-stable] patch 'net/i40e: " Yuanhan Liu
2017-05-08  5:40 ` [dpdk-stable] patch 'net/fm10k: " Yuanhan Liu
2017-05-08  5:40 ` [dpdk-stable] patch 'net/vmxnet3: fix build with gcc 7' " Yuanhan Liu
2017-05-08  5:40 ` [dpdk-stable] patch 'doc: explain zlib dependency for bnx2x' " Yuanhan Liu
2017-05-08  5:40 ` [dpdk-stable] patch 'test/cmdline: fix missing break in switch' " Yuanhan Liu

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=1494222024-5222-6-git-send-email-yuanhan.liu@linux.intel.com \
    --to=yuanhan.liu@linux.intel.com \
    --cc=jyu@vmware.com \
    --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).