From: "Zhang, Qi Z" <qi.z.zhang@intel.com>
To: "Dai, Wei" <wei.dai@intel.com>,
"Lu, Wenzhuo" <wenzhuo.lu@intel.com>,
"Ananyev, Konstantin" <konstantin.ananyev@intel.com>,
"Lin, Xueqin" <xueqin.lin@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: Tue, 17 Apr 2018 13:48:58 +0000 [thread overview]
Message-ID: <039ED4275CED7440929022BC67E706115319A158@shsmsx102.ccr.corp.intel.com> (raw)
In-Reply-To: <1523866465-26067-1-git-send-email-wei.dai@intel.com>
> -----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>
Acked-by: Qi Zhang <qi.z.zhang@intel.com>
(Wrong "Fixes" reference, will be correct during apply)
> ---
> 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-17 13:49 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
2018-04-16 8:57 ` Lin, Xueqin
2018-04-17 13:48 ` Zhang, Qi Z [this message]
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=039ED4275CED7440929022BC67E706115319A158@shsmsx102.ccr.corp.intel.com \
--to=qi.z.zhang@intel.com \
--cc=dev@dpdk.org \
--cc=konstantin.ananyev@intel.com \
--cc=stable@dpdk.org \
--cc=wei.dai@intel.com \
--cc=wenzhuo.lu@intel.com \
--cc=xueqin.lin@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).