From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mga09.intel.com (mga09.intel.com [134.134.136.24]) by dpdk.org (Postfix) with ESMTP id C44C96942 for ; Thu, 26 Mar 2015 18:36:44 +0100 (CET) Received: from fmsmga001.fm.intel.com ([10.253.24.23]) by orsmga102.jf.intel.com with ESMTP; 26 Mar 2015 10:36:43 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.11,473,1422950400"; d="scan'208";a="686143439" Received: from irsmsx153.ger.corp.intel.com ([163.33.192.75]) by fmsmga001.fm.intel.com with ESMTP; 26 Mar 2015 10:36:43 -0700 Received: from irsmsx108.ger.corp.intel.com ([169.254.11.49]) by IRSMSX153.ger.corp.intel.com ([169.254.9.161]) with mapi id 14.03.0224.002; Thu, 26 Mar 2015 17:36:42 +0000 From: "De Lara Guarch, Pablo" To: "Richardson, Bruce" , "dev@dpdk.org" Thread-Topic: [dpdk-dev] [PATCH] ethdev: fix crash with multiprocess Thread-Index: AQHQZ+bIsHL/zOHVnkurCvEUJWJ3T50vBuqQ Date: Thu, 26 Mar 2015 17:36:42 +0000 Message-ID: References: <1427389365-18631-1-git-send-email-bruce.richardson@intel.com> In-Reply-To: <1427389365-18631-1-git-send-email-bruce.richardson@intel.com> Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-originating-ip: [163.33.239.181] Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 Subject: Re: [dpdk-dev] [PATCH] ethdev: fix crash with multiprocess X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: patches and discussions about DPDK List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 26 Mar 2015 17:36:45 -0000 > -----Original Message----- > From: dev [mailto:dev-bounces@dpdk.org] On Behalf Of Bruce Richardson > Sent: Thursday, March 26, 2015 5:03 PM > To: dev@dpdk.org > Subject: [dpdk-dev] [PATCH] ethdev: fix crash with multiprocess >=20 > The data structure for the rx and tx callbacks is local to each process > since it contains function pointers and cannot be shared between > different unique binaries. However, because it is not in > rte_eth_dev_data structure, the array is not getting initialized for > secondary processes - neither is it getting appropriately resized if the > number of RX/TX queues changes. This causes crashes in secondary > processes as they dereference a null pointer in struct rte_eth_dev. >=20 > This patch fixes this by introducing an upper-bound on the number of > queues per port that can be configured, and then uses this to make the > array statically sized, thereby avoiding the crashes. >=20 > Signed-off-by: Bruce Richardson Tested-by: Pablo de Lara