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 1E6344261F for ; Fri, 22 Sep 2023 18:54:05 +0200 (CEST) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 0E34C402EC; Fri, 22 Sep 2023 18:54:05 +0200 (CEST) Received: from mx0b-0016f401.pphosted.com (mx0a-0016f401.pphosted.com [67.231.148.174]) by mails.dpdk.org (Postfix) with ESMTP id 31FE94013F; Fri, 22 Sep 2023 18:54:02 +0200 (CEST) Received: from pps.filterd (m0045849.ppops.net [127.0.0.1]) by mx0a-0016f401.pphosted.com (8.17.1.19/8.17.1.19) with ESMTP id 38M19tMS017757; Fri, 22 Sep 2023 09:54:01 -0700 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=marvell.com; h=from : to : cc : subject : date : message-id : mime-version : content-transfer-encoding : content-type; s=pfpt0220; bh=NhtY5L6sSqF9M6UVT3ONy5mNmhNket0afw4MYhCRmqQ=; b=kq8UFN0IuF3o6a8bgVu8VagfOs433/P8VVyKpXU/93BpKVtQhFGod2MtDkeiUi6smHQA udqEaq+ZW0c0SXSQsAmjQyKDyhUAiGmdQk5uT9WAGGYK3soJPgPYcacRtEiCOYJ1tZIL EP+v5JP9qKNCVCAcymdvP1e4RpVjJ91onTfOMRIFgiYHcAgW0ne9Ae7TbRe84F6e5cMp 87Q4G9G1u1Styz5MrNsZ2wHxGZzGvzMDYUiUYBqm+oMTvKPSxHWzXrLPpbWIfYvupM9W 1Ykn9ggGiAQE/ktct8N5AYOpZ6AmrpMUQSLs6tWSkZY4OFHICZw3Y1GAchgr37x9o5b1 Og== Received: from dc5-exch01.marvell.com ([199.233.59.181]) by mx0a-0016f401.pphosted.com (PPS) with ESMTPS id 3t8trb3vka-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-SHA384 bits=256 verify=NOT); Fri, 22 Sep 2023 09:54:00 -0700 Received: from DC5-EXCH02.marvell.com (10.69.176.39) by DC5-EXCH01.marvell.com (10.69.176.38) with Microsoft SMTP Server (TLS) id 15.0.1497.48; Fri, 22 Sep 2023 09:53:59 -0700 Received: from maili.marvell.com (10.69.176.80) by DC5-EXCH02.marvell.com (10.69.176.39) with Microsoft SMTP Server id 15.0.1497.48 via Frontend Transport; Fri, 22 Sep 2023 09:53:59 -0700 Received: from ml-host-33.caveonetworks.com (unknown [10.110.143.233]) by maili.marvell.com (Postfix) with ESMTP id E49433F706F; Fri, 22 Sep 2023 09:53:58 -0700 (PDT) From: Srikanth Yalavarthi To: David Marchand , Aaron Conole , Igor Russkikh CC: , , , , , , Subject: [PATCH 1/1] eal: enable xz read support and ignore warning Date: Fri, 22 Sep 2023 09:53:55 -0700 Message-ID: <20230922165356.31567-1-syalavarthi@marvell.com> X-Mailer: git-send-email 2.41.0 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Content-Type: text/plain X-Proofpoint-ORIG-GUID: K1G-xeQtNZGCHWtFIO5hRsi6b6HiXgdw X-Proofpoint-GUID: K1G-xeQtNZGCHWtFIO5hRsi6b6HiXgdw X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.267,Aquarius:18.0.980,Hydra:6.0.619,FMLib:17.11.176.26 definitions=2023-09-22_15,2023-09-21_01,2023-05-22_02 X-BeenThere: stable@dpdk.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: patches for DPDK stable branches List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: stable-bounces@dpdk.org 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. Fixes: 40edb9c0d36b ("eal: handle compressed firmware") Cc: stable@dpdk.org Signed-off-by: Srikanth Yalavarthi --- lib/eal/unix/eal_firmware.c | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/lib/eal/unix/eal_firmware.c b/lib/eal/unix/eal_firmware.c index d1616b0bd9..05c06c222a 100644 --- a/lib/eal/unix/eal_firmware.c +++ b/lib/eal/unix/eal_firmware.c @@ -25,12 +25,19 @@ static int firmware_open(struct firmware_read_ctx *ctx, const char *name, size_t blocksize) { struct archive_entry *e; + int err; ctx->a = archive_read_new(); if (ctx->a == NULL) return -1; + + err = archive_read_support_filter_xz(ctx->a); + if (err != ARCHIVE_OK && err != ARCHIVE_WARN) { + ctx->a = NULL; + return -1; + } + if (archive_read_support_format_raw(ctx->a) != ARCHIVE_OK || - archive_read_support_filter_xz(ctx->a) != ARCHIVE_OK || archive_read_open_filename(ctx->a, name, blocksize) != ARCHIVE_OK || archive_read_next_header(ctx->a, &e) != ARCHIVE_OK) { archive_read_free(ctx->a); -- 2.41.0