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 B664E42643; Tue, 26 Sep 2023 15:57:15 +0200 (CEST) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 8C3EE402AA; Tue, 26 Sep 2023 15:57:15 +0200 (CEST) Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.129.124]) by mails.dpdk.org (Postfix) with ESMTP id 527F24027D for ; Tue, 26 Sep 2023 15:57:14 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1695736633; 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: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=HGAOosP2h996ZlnYFAH8bAZb0XdoPqj5X4NMlj/XSX0=; b=DJEFaKvPTAR8d+L4tVqXeSJgjq4DUVPkF1NiqfXFrhZze/I9W8KF6bLdNtijoi/P+4yAlF smoZwjBMfgxqrVdbjur3BYtNB7cPUUaVFYPP7Gqz3UceYrtxg6rg1mO51wUpL5qInYrPnx gNabIdtMcWvYKP3Mmri9a74GHLmQA5o= 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.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-575-dlcdQW_iNwWrpJ3PltVEDg-1; Tue, 26 Sep 2023 09:57:12 -0400 X-MC-Unique: dlcdQW_iNwWrpJ3PltVEDg-1 Received: by mail-lj1-f197.google.com with SMTP id 38308e7fff4ca-2c0165b5c5cso124787991fa.1 for ; Tue, 26 Sep 2023 06:57:12 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1695736631; x=1696341431; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=HGAOosP2h996ZlnYFAH8bAZb0XdoPqj5X4NMlj/XSX0=; b=Og4GFnAQ8vbRyNPe58X4t4yEDxQfZYazqR5bv2GiDgQpP4VQ4ovrpEaA53blcCpd7Z dfO6T/nlbjovNbPmZu12s+FiK8BlNqu1+J0ikdxK2nCXxrOHQj30ryhqjvzCZHL10n90 xtSqgYAJgQkGe/B3lLtrXkuWdnzehndSuQXv/9D0Ylx8VoXkucHPK/JWaUf3JHw2N7fB pKtzmMGN8VLpQQzHRTEUiQYGen+ULQdwaXdGGHDI/pwiTsDfx3HrlMQELEwPdlOYLM48 o31dZfAGdGaXq5i0uDJd0ZKocthBNJKghCEEhFUx6JYq+tP9MyJo38PZWWK5eOY37LEM oOoQ== X-Gm-Message-State: AOJu0YwBS7apM4iGT4uqGQInuPmILah82CT+y+2i3keTWThq2M+X1vVT 2v+qmL3m5Gks7DVvJCoKS8v5+wfIBc2LdBrFn1Od61swBWNN+sc+kfk9fpud7/yP4Msu/xIShDF 1ObpAr7S8a+SojRY7uck= X-Received: by 2002:ac2:4248:0:b0:503:3707:66ed with SMTP id m8-20020ac24248000000b00503370766edmr7873370lfl.34.1695736630971; Tue, 26 Sep 2023 06:57:10 -0700 (PDT) X-Google-Smtp-Source: AGHT+IEyyaN0MOywcMO7trOlNAwWLr5oJWNuuoI7ohsS2h8nTBFt2Af+OpAwV1rnvyIm30weaF1ABYxZdbJVDqfVJno= X-Received: by 2002:ac2:4248:0:b0:503:3707:66ed with SMTP id m8-20020ac24248000000b00503370766edmr7873351lfl.34.1695736630609; Tue, 26 Sep 2023 06:57:10 -0700 (PDT) MIME-Version: 1.0 References: <20230922165356.31567-1-syalavarthi@marvell.com> <20230926133006.31534-1-syalavarthi@marvell.com> In-Reply-To: <20230926133006.31534-1-syalavarthi@marvell.com> From: David Marchand Date: Tue, 26 Sep 2023 15:56:59 +0200 Message-ID: Subject: Re: [PATCH v2 1/1] eal: update xz read support and ignore warning To: Srikanth Yalavarthi Cc: Aaron Conole , Igor Russkikh , dev@dpdk.org, sshankarnara@marvell.com, aprabhu@marvell.com, ptakkar@marvell.com, jerinjacobk@gmail.com, stable@dpdk.org X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable 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, Sep 26, 2023 at 3:30=E2=80=AFPM Srikanth Yalavarthi wrote: > > archive_read_support_filter_xz returns a warning when > compression is not fully supported and is supported > through external program. This warning can be ignored > when reading the files through firmware open as only > decompression is required. Same comment as before, this sentence is confusing. Compressing files does not matter in DPDK rte_firmware_ API. The commit title and commitlog won't help people understand in which case the issue is reproduced, and how this patch fixes it. Suggesting the following title and commitlog: """ eal/unix: fix firmware reading with external xz support libarchive may support xz decompression only through an external (slower) helper. In such a case, archive_read_support_filter_xz() returns ARCHIVE_WARN. Fixes: 40edb9c0d36b ("eal: handle compressed firmware") Cc: stable@dpdk.org """ > > Fixes: 40edb9c0d36b ("eal: handle compressed firmware") > Cc: stable@dpdk.org > > Signed-off-by: Srikanth Yalavarthi > Change-Id: I38cce556ec637af03dbde74d7d18318af48082d6 This is internal scm stuff and must be dropped. > --- > lib/eal/unix/eal_firmware.c | 28 ++++++++++++++++++++-------- > 1 file changed, 20 insertions(+), 8 deletions(-) > > diff --git a/lib/eal/unix/eal_firmware.c b/lib/eal/unix/eal_firmware.c > index d1616b0bd9..16690b4245 100644 > --- a/lib/eal/unix/eal_firmware.c > +++ b/lib/eal/unix/eal_firmware.c > @@ -25,19 +25,31 @@ static int > firmware_open(struct firmware_read_ctx *ctx, const char *name, size_t bl= ocksize) > { > struct archive_entry *e; > + int err; > > ctx->a =3D archive_read_new(); > if (ctx->a =3D=3D NULL) > return -1; > - if (archive_read_support_format_raw(ctx->a) !=3D ARCHIVE_OK || > - archive_read_support_filter_xz(ctx->a) !=3D ARCHI= VE_OK || > - archive_read_open_filename(ctx->a, name, blocksiz= e) !=3D ARCHIVE_OK || > - archive_read_next_header(ctx->a, &e) !=3D ARCHIVE= _OK) { > - archive_read_free(ctx->a); > - ctx->a =3D NULL; > - return -1; > - } > + > + if (archive_read_support_format_raw(ctx->a) !=3D ARCHIVE_OK) > + goto error; > + > + err =3D archive_read_support_filter_xz(ctx->a); > + if (err !=3D ARCHIVE_OK && err !=3D ARCHIVE_WARN) > + goto error; > + > + if (archive_read_open_filename(ctx->a, name, blocksize) !=3D ARCH= IVE_OK) > + goto error; > + > + if (archive_read_next_header(ctx->a, &e)) I did a typo when quickly writting the snippet previously. It should be "archive_read_next_header(ctx->a, &e) !=3D ARCHIVE_OK" > + goto error; > + > return 0; > + > +error: > + archive_read_free(ctx->a); > + ctx->a =3D NULL; > + return -1; > } > > static ssize_t > -- > 2.41.0 > --=20 David Marchand