From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mails.dpdk.org (mails.dpdk.org [217.70.189.124]) by inbox.dpdk.org (Postfix) with ESMTP id ECF15A0548; Wed, 15 Jun 2022 16:02:40 +0200 (CEST) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id D0DFE40F1A; Wed, 15 Jun 2022 16:02:40 +0200 (CEST) Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.133.124]) by mails.dpdk.org (Postfix) with ESMTP id 8595040F19 for ; Wed, 15 Jun 2022 16:02:39 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1655301759; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=NCBNdmkUoIVGe2qo325RUIqNQQZaRRbYUkhCK01C4GE=; b=TgJKV4uhwAnD44PkoljvKvlc2L6kUlVovFB3bPGd3mXzpsnbEUhU/KsdEuYfjsBZLfDnKy ldVB7n97z69HL0JoAFQEgBgLsY7/W4dfxySo/zrQwynI3Im2m8bGimwxrn/XKqSwH9MkKe tooEKXdwI24R6bWlob9tgbeNpcKZ9Ps= Received: from mail-lj1-f197.google.com (mail-lj1-f197.google.com [209.85.208.197]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id us-mta-140-x0iUoTuSMDquDU3VurYvoQ-1; Wed, 15 Jun 2022 10:02:37 -0400 X-MC-Unique: x0iUoTuSMDquDU3VurYvoQ-1 Received: by mail-lj1-f197.google.com with SMTP id b26-20020a2e989a000000b002556f92fa13so1932746ljj.15 for ; Wed, 15 Jun 2022 07:02:37 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=NCBNdmkUoIVGe2qo325RUIqNQQZaRRbYUkhCK01C4GE=; b=Vz0aI4TX7QgwWA8ssPEIF7qOUqdPhbi2WcLQc0hyG2su7KjDA1v/UdOfhQ7mRxm8Rk Rbm2zdKQiCD3a9FwEMJPxmu35z1gdVlxlc8DZqe1wd4U98+XBO/5Erte6n2WthUirBWU DzPubvvipyLMyxggsZAhELljvgTFTuqtjeF48axXK4I+PDtEpMnWEILeVBjSgLQfSTu8 pyghSFeolxZxSq525jcANfISknqw0ayweEV43LHu6lho7EFah5SaOmIfyw4aJUj7qbXx cCegUD7ivqzXRwMLzC/iF7E/9jhxX+wXf54i5HwzvqPcbD3nVP067m2Rpoqnv8Dzbtec Otdw== X-Gm-Message-State: AJIora+6xFmxVgDogh0ulI5mBLyTtaxwPXY//eiPfVtgQlCW0CXo2pX8 cT4gyYojn+SDbUvkwTMtB8PItxlyLPaWkQbKSYkqVdj8G6TUT5tUnvXIgMHJQrBaJU+55Nh+0So cl9jJLUq87CxvJpygVck= X-Received: by 2002:a05:6512:3130:b0:479:385f:e2ac with SMTP id p16-20020a056512313000b00479385fe2acmr6337792lfd.575.1655301755938; Wed, 15 Jun 2022 07:02:35 -0700 (PDT) X-Google-Smtp-Source: AGRyM1t74DuP/eHYj8YmDfSAAe+JPWIjjSTcC1BtcHcUD5OClPifNdASrhCDhhCov1uKOeOdub6Qnol1Mfmkp0+zz94= X-Received: by 2002:a05:6512:3130:b0:479:385f:e2ac with SMTP id p16-20020a056512313000b00479385fe2acmr6337765lfd.575.1655301755684; Wed, 15 Jun 2022 07:02:35 -0700 (PDT) MIME-Version: 1.0 References: <20220607120014.49823-1-fengchengwen@huawei.com> <20220614055900.22848-1-fengchengwen@huawei.com> <20220614055900.22848-3-fengchengwen@huawei.com> In-Reply-To: <20220614055900.22848-3-fengchengwen@huawei.com> From: David Marchand Date: Wed, 15 Jun 2022 16:02:24 +0200 Message-ID: Subject: Re: [PATCH v2 2/3] eal: fix trace init fail with long file-prefix To: Chengwen Feng Cc: Thomas Monjalon , dev , "Burakov, Anatoly" , Jerin Jacob Kollanukkaran , Bruce Richardson Authentication-Results: relay.mimecast.com; auth=pass smtp.auth=CUSA124A263 smtp.mailfrom=dmarchan@redhat.com X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Type: text/plain; charset="UTF-8" X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org On Tue, Jun 14, 2022 at 8:06 AM Chengwen Feng wrote: > > Bug scenario: > 1. start testpmd: > dpdk-testpmd -l 4-6 -a 0000:7d:00.0 --trace=.* \ > -file-prefix=trace_autotest -- -i > 2. then observed: > EAL: eal_trace_init():94 failed to initialize trace [File exists] This is not directly related to the issue being fixed, but this error log is really obscure.. Can we enhance this, maybe in a followup patch? > EAL: FATAL: Cannot init trace > EAL: Cannot init trace > EAL: Error - exiting with code: 1 > > The root cause it that the offset set wrong with long file-prefix and > then lead the strftime return failed. > > Fixes: 321dd5f8fa62 ("trace: add internal init and fini interface") > Cc: stable@dpdk.org > > Signed-off-by: Chengwen Feng Reviewed-by: David Marchand And another topic, I see no reason for the limitation/truncation on the file prefix. Testing with the last patch of the series, I can see odd directory, like EAL: Trace dir: /home/dmarchan/builds/main/build-gcc-shared/app/test/trace_autot-2022-06-15-PM-03-18-39 I'll send a cleanup series for this, later. -- David Marchand