From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mga01.intel.com (mga01.intel.com [192.55.52.88]) by dpdk.org (Postfix) with ESMTP id 5AA41AAC5; Tue, 17 Apr 2018 15:49:03 +0200 (CEST) X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from orsmga005.jf.intel.com ([10.7.209.41]) by fmsmga101.fm.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 17 Apr 2018 06:49:02 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.48,463,1517904000"; d="scan'208";a="217253028" Received: from fmsmsx106.amr.corp.intel.com ([10.18.124.204]) by orsmga005.jf.intel.com with ESMTP; 17 Apr 2018 06:49:01 -0700 Received: from fmsmsx125.amr.corp.intel.com (10.18.125.40) by FMSMSX106.amr.corp.intel.com (10.18.124.204) with Microsoft SMTP Server (TLS) id 14.3.319.2; Tue, 17 Apr 2018 06:49:01 -0700 Received: from shsmsx101.ccr.corp.intel.com (10.239.4.153) by FMSMSX125.amr.corp.intel.com (10.18.125.40) with Microsoft SMTP Server (TLS) id 14.3.319.2; Tue, 17 Apr 2018 06:49:01 -0700 Received: from shsmsx102.ccr.corp.intel.com ([169.254.2.79]) by SHSMSX101.ccr.corp.intel.com ([169.254.1.40]) with mapi id 14.03.0319.002; Tue, 17 Apr 2018 21:48:59 +0800 From: "Zhang, Qi Z" To: "Dai, Wei" , "Lu, Wenzhuo" , "Ananyev, Konstantin" , "Lin, Xueqin" CC: "dev@dpdk.org" , "stable@dpdk.org" Thread-Topic: [PATCH] net/ixgbe: fix segfault in configuring VF VLAN strip Thread-Index: AQHT1V2d9DKXdVaGEEO8+DOW/RgQdaQE+lrQ Date: Tue, 17 Apr 2018 13:48:58 +0000 Message-ID: <039ED4275CED7440929022BC67E706115319A158@shsmsx102.ccr.corp.intel.com> References: <1523866465-26067-1-git-send-email-wei.dai@intel.com> In-Reply-To: <1523866465-26067-1-git-send-email-wei.dai@intel.com> Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-titus-metadata-40: eyJDYXRlZ29yeUxhYmVscyI6IiIsIk1ldGFkYXRhIjp7Im5zIjoiaHR0cDpcL1wvd3d3LnRpdHVzLmNvbVwvbnNcL0ludGVsMyIsImlkIjoiZGZiZmRhYjYtYWZlZS00Zjk0LThlYjktNGUyNzM4NGIyOWIzIiwicHJvcHMiOlt7Im4iOiJDVFBDbGFzc2lmaWNhdGlvbiIsInZhbHMiOlt7InZhbHVlIjoiQ1RQX05UIn1dfV19LCJTdWJqZWN0TGFiZWxzIjpbXSwiVE1DVmVyc2lvbiI6IjE3LjIuNS4xOCIsIlRydXN0ZWRMYWJlbEhhc2giOiJpK3FMUk1RN3hVTU01RjEyREJPSGt5dDQyaGloZHc0YTJocElKOWRoWmhNSkc3N3gzNEVRV0hLV1VYa1Vyc0ZvIn0= x-ctpclassification: CTP_NT dlp-product: dlpe-windows dlp-version: 11.0.200.100 dlp-reaction: no-action x-originating-ip: [10.239.127.40] Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 Subject: Re: [dpdk-dev] [PATCH] net/ixgbe: fix segfault in configuring VF VLAN strip X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 17 Apr 2018 13:49:04 -0000 > -----Original Message----- > From: Dai, Wei > Sent: Monday, April 16, 2018 4:14 PM > To: Lu, Wenzhuo ; Ananyev, Konstantin > ; Zhang, Qi Z ; Lin, > Xueqin > Cc: dev@dpdk.org; Dai, Wei ; stable@dpdk.org > Subject: [PATCH] net/ixgbe: fix segfault in configuring VF VLAN strip >=20 > 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 =3D dev->data->rx_queues[i] is null pointer. >=20 > Fixes: 860a94d3c692 ("net/ixgbe: support VLAN strip per queue offloading = in > VF") > Cc: stable@dpdk.org >=20 > Signed-off-by: Wei Dai Acked-by: Qi Zhang (Wrong "Fixes" reference, will be correct during apply) > --- > drivers/net/ixgbe/ixgbe_ethdev.c | 4 +--- > 1 file changed, 1 insertion(+), 3 deletions(-) >=20 > 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 =3D > - IXGBE_DEV_PRIVATE_TO_HW(dev->data->dev_private); > struct ixgbe_rx_queue *rxq; > uint16_t i; > int on =3D 0; >=20 > /* VF function only support hw strip feature, others are not support */ > if (mask & ETH_VLAN_STRIP_MASK) { > - for (i =3D 0; i < hw->mac.max_rx_queues; i++) { > + for (i =3D 0; i < dev->data->nb_rx_queues; i++) { > rxq =3D dev->data->rx_queues[i]; > on =3D !!(rxq->offloads & DEV_RX_OFFLOAD_VLAN_STRIP); > ixgbevf_vlan_strip_queue_set(dev, i, on); > -- > 2.7.5