Received: by 10.192.165.148 with SMTP id m20csp233638imm; Fri, 20 Apr 2018 06:02:25 -0700 (PDT) X-Google-Smtp-Source: AIpwx48zRxaHj9cwQZjjMCNpX1Mqm82QzsUSftbC9T4a61vHuTontvDD/Dsox4xN/lwgN1R2fV4z X-Received: by 2002:a17:902:5482:: with SMTP id e2-v6mr9340929pli.215.1524229345805; Fri, 20 Apr 2018 06:02:25 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1524229345; cv=none; d=google.com; s=arc-20160816; b=eHkHKH4VnQRM4nesgLtV0HSa6eJ4PO07WyjWwiVOekdQJIXgwgYBo5SSbB4kFaiOAQ ClGJLXSX1GlNUUspkV5cp8D7G3ajDtiCWnyd+YVte69o3AQl3GyK6sz8oMCDFn3323yp PoWyDoCfl9D03EMSGfAQpB57F68xGIIUeI0pFZRkW6+bnfZqa3kDOgs8tAunQSDzl5r5 poKWo58FoXsLWOuOWJnsBC8laRRrT6BA9ObS7oiKnK4QsiSHL2HxfJUPPNlIRSzHzlJ9 wwm3Pn5mQTjF2AocMUu4nawx6Ie6YKlKpwcnPBtN79HBUKFtTSlVGFuZoDXNLLbpBcj9 pf+A== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding :content-language:in-reply-to:mime-version:user-agent:date :message-id:from:references:cc:to:subject:arc-authentication-results; bh=68Qp2QGtd2SEfqa7egFgbzjqreRbc+5FlQT5gHEloMo=; b=dVQ3Te3LuekPL07BHUTX2LRRrPpx2kY7umTwjLJ6rf7I0/9QJCUKDm4/FbOyACpdRv pb+24cr7uyJPwOntAsmURcdW7FdV5JVhXRfmx4qYZaUZ34Usj6URaJGBenRrZfrg6Ozt Np+ZNVGq+2eOte+pjR650Qogc39zVa8hAlBiqj9QMX4AGLZxULWH9T4AwXNi6RLAMTGL Lf/gIaAHdhkexZW0q3b8VOZvCFwSQ4Ym2cPC0rpgadExVCbuDfm9Ppce+agb0qkBX+9T yeBH68BRKZh0m+SGhUjzx0lGr7aTuJG9Kp+pe94O0tMcWGj+KcnnRdnWvKvww9JVd8M1 jU4A== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id a62si4856810pgc.296.2018.04.20.06.02.10; Fri, 20 Apr 2018 06:02:25 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754848AbeDTNAf (ORCPT + 99 others); Fri, 20 Apr 2018 09:00:35 -0400 Received: from mx2.suse.de ([195.135.220.15]:48404 "EHLO mx2.suse.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1754591AbeDTNAe (ORCPT ); Fri, 20 Apr 2018 09:00:34 -0400 X-Virus-Scanned: by amavisd-new at test-mx.suse.de Received: from relay2.suse.de (charybdis-ext.suse.de [195.135.220.254]) by mx2.suse.de (Postfix) with ESMTP id 0B532AC4E; Fri, 20 Apr 2018 13:00:32 +0000 (UTC) Subject: Re: [PATCH 2/3] xen netback: add fault injection facility To: staskins@amazon.com Cc: jakub.kicinski@netronome.com, hpa@zytor.com, mcroce@redhat.com, tglx@linutronix.de, ggarcia@abra.uab.cat, daniel@iogearbox.net, x86@kernel.org, mingo@redhat.com, xen-devel@lists.xenproject.org, axboe@kernel.dk, konrad.wilk@oracle.com, amir.jer.levy@intel.com, paul.durrant@citrix.com, stefanha@redhat.com, dsa@cumulusnetworks.com, boris.ostrovsky@oracle.com, linux-block@vger.kernel.org, wei.liu2@citrix.com, netdev@vger.kernel.org, linux-kernel@vger.kernel.org, davem@davemloft.net, dwmw@amazon.co.uk, roger.pau@citrix.com References: <20180420104603.17823.31095.stgit@dev-dsk-staskins-1a-ca5afbf2.eu-west-1.amazon.com> <20180420104731.17823.97617.stgit@dev-dsk-staskins-1a-ca5afbf2.eu-west-1.amazon.com> <909fd3b2-19e8-8c13-6ede-cfd6051c6f1d@amazon.com> From: Juergen Gross Message-ID: <5c4e4f3d-03ce-b517-d451-3229c0d542c0@suse.com> Date: Fri, 20 Apr 2018 15:00:28 +0200 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.7.0 MIME-Version: 1.0 In-Reply-To: <909fd3b2-19e8-8c13-6ede-cfd6051c6f1d@amazon.com> Content-Type: text/plain; charset=utf-8 Content-Language: de-DE Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 20/04/18 14:52, staskins@amazon.com wrote: > On 04/20/18 13:25, Juergen Gross wrote: >> On 20/04/18 12:47, Stanislav Kinsburskii wrote: >>> +    for (fi = 0; fi < XENVIF_FI_MAX; fi++) { >>> +        vfi->faults[fi] = xen_fi_dir_add(vfi->dir, >>> +                xenvif_fi_names[fi]); >> How does this work? xenvif_fi_names[] is an empty array and this is the >> only reference to it. Who is allocating the memory for that array? > > Well, it works in the way one adds a var to enum (which is used as a key > later) and a corresponding string into the array (which is used as a > name for the fault directory in sysfs). Then you should size the array via XENVIF_FI_MAX. Juergen