From: "Lin, Xueqin" <xueqin.lin@intel.com>
To: "Dai, Wei" <wei.dai@intel.com>,
"Lu, Wenzhuo" <wenzhuo.lu@intel.com>,
"Ananyev, Konstantin" <konstantin.ananyev@intel.com>,
"Zhang, Qi Z" <qi.z.zhang@intel.com>
Cc: "dev@dpdk.org" <dev@dpdk.org>, "stable@dpdk.org" <stable@dpdk.org>
Subject: Re: [dpdk-stable] [PATCH] net/ixgbe: fix segfault in configuring VF VLAN strip
Date: Mon, 16 Apr 2018 08:38:07 +0000 [thread overview]
Message-ID: <0D300480287911409D9FF92C1FA2A3355B2E8573@SHSMSX104.ccr.corp.intel.com> (raw)
In-Reply-To: <1523866465-26067-1-git-send-email-wei.dai@intel.com>
Tested-by: Xueqin Lin
1. Branch: master
2. NIC: Niantic
Steps:
1. Pull branch code to newest and apply the patch
2. Create one VF port using kernel PF
echo 1 > /sys/bus/pci/devices/0000\:81\:00.0/sriov_numvfs
3. Bind VF to igb_uio
4. Start testpmd, find VF testpmd could startup successfully.
./x86_64-native-linuxapp-gcc/app/testpmd -c 0x6 -n 4 -- -i
Result: This patch could fix VF can't setup successfully in Niantic NIC.
Best regards,
Xueqin
-----Original Message-----
From: Dai, Wei
Sent: Monday, April 16, 2018 4:14 PM
To: Lu, Wenzhuo <wenzhuo.lu@intel.com>; Ananyev, Konstantin <konstantin.ananyev@intel.com>; Zhang, Qi Z <qi.z.zhang@intel.com>; Lin, Xueqin <xueqin.lin@intel.com>
Cc: dev@dpdk.org; Dai, Wei <wei.dai@intel.com>; stable@dpdk.org
Subject: [PATCH] net/ixgbe: fix segfault in configuring VF VLAN strip
This patch fixes a segment fault in ixgbevf_vlan_offload_set( ) when a Rx queue with index < max_rx_queues is not setup.
For such queue, rxq = dev->data->rx_queues[i] is null pointer.
Fixes: 860a94d3c692 ("net/ixgbe: support VLAN strip per queue offloading in VF")
Cc: stable@dpdk.org
Signed-off-by: Wei Dai <wei.dai@intel.com>
---
drivers/net/ixgbe/ixgbe_ethdev.c | 4 +---
1 file changed, 1 insertion(+), 3 deletions(-)
diff --git a/drivers/net/ixgbe/ixgbe_ethdev.c b/drivers/net/ixgbe/ixgbe_ethdev.c
index a5e2fc0..33ee52e 100644
--- a/drivers/net/ixgbe/ixgbe_ethdev.c
+++ b/drivers/net/ixgbe/ixgbe_ethdev.c
@@ -5184,15 +5184,13 @@ ixgbevf_vlan_strip_queue_set(struct rte_eth_dev *dev, uint16_t queue, int on) static int ixgbevf_vlan_offload_set(struct rte_eth_dev *dev, int mask) {
- struct ixgbe_hw *hw =
- IXGBE_DEV_PRIVATE_TO_HW(dev->data->dev_private);
struct ixgbe_rx_queue *rxq;
uint16_t i;
int on = 0;
/* VF function only support hw strip feature, others are not support */
if (mask & ETH_VLAN_STRIP_MASK) {
- for (i = 0; i < hw->mac.max_rx_queues; i++) {
+ for (i = 0; i < dev->data->nb_rx_queues; i++) {
rxq = dev->data->rx_queues[i];
on = !!(rxq->offloads & DEV_RX_OFFLOAD_VLAN_STRIP);
ixgbevf_vlan_strip_queue_set(dev, i, on);
--
2.7.5
next prev parent reply other threads:[~2018-04-16 8:38 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-04-16 8:14 Wei Dai
2018-04-16 8:38 ` Lin, Xueqin [this message]
2018-04-16 8:57 ` Lin, Xueqin
2018-04-17 13:48 ` Zhang, Qi Z
2018-04-17 16:18 ` [dpdk-stable] [dpdk-dev] " Zhang, Helin
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=0D300480287911409D9FF92C1FA2A3355B2E8573@SHSMSX104.ccr.corp.intel.com \
--to=xueqin.lin@intel.com \
--cc=dev@dpdk.org \
--cc=konstantin.ananyev@intel.com \
--cc=qi.z.zhang@intel.com \
--cc=stable@dpdk.org \
--cc=wei.dai@intel.com \
--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).