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 F051DA0548; Fri, 9 Jul 2021 17:22:48 +0200 (CEST) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id DA9D0416AD; Fri, 9 Jul 2021 17:22:48 +0200 (CEST) Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [216.205.24.124]) by mails.dpdk.org (Postfix) with ESMTP id C098B4014D for ; Fri, 9 Jul 2021 17:22:47 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1625844167; 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=KmLKO3rxfsJ8DSEiATfvHLRZOXcSz/TfdUA+TIKIXs0=; b=SW1TXgbIXbCLKb2nCHC7uJrfMl4Bw/puNnCcWZnfxTz9XnGHdONdXg8YrWgczY60Zfd0XD V8lltdJ4wc1ykfuuNrBz07f3JyPy1TiXjL3tOg0vjlhnvHj2Izk9ro4a68Klgq+4OXh50u Zlp/Wtci71KaPYhxqyRV5pUOm6hpba0= Received: from mail-vs1-f71.google.com (mail-vs1-f71.google.com [209.85.217.71]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-163-84j5YmorMmG0EmgSbG4W2Q-1; Fri, 09 Jul 2021 11:22:42 -0400 X-MC-Unique: 84j5YmorMmG0EmgSbG4W2Q-1 Received: by mail-vs1-f71.google.com with SMTP id o7-20020a6773070000b029028fbea1b30cso1271881vsc.19 for ; Fri, 09 Jul 2021 08:22:42 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=KmLKO3rxfsJ8DSEiATfvHLRZOXcSz/TfdUA+TIKIXs0=; b=R6Ep5Jl2E1goTx72N7Ug4JQQGeKHW1V3wdchkdl03P3NFdAeQaoZNI3XlQWzpg/iJe 7uGKgH6KfbXOg5ooEJgOhgbF2QgXZsS3MLLn8naJuasF/m5yr1gUYpWoRMt+XrHMDlmg Ii2iKvMIu0QG2aqIGxYjav641ukQk2i5yQtjF79VfzDzI7paxHcf0gByAYFxw7piU7uO ZAlNIUPzmYSmmV8lF3c61lgSwun29Is4ik+aWjCNmHy6GoqoIM++IXNDidnbyAknsfhT lZa+c0V0INcALSxqDVQEW15f+v9TVhmZHSv59xqP9DD1aFzABdGuTE7g2JY/94QFLAQR CA7w== X-Gm-Message-State: AOAM533vbyjuXyuVICW+9RfIkKiegWmL4ucH2wKe8PY2pSXGqEjgpjai 9jFHlmJoIO39gMv+rt31PFonAPi+eID1ooQWQcwhPCQ4FSpl5MDK+IOf6Wf++/Hm+pxGjzaDJiB 4vtqobQULijW8i9/dBWI= X-Received: by 2002:a67:df85:: with SMTP id x5mr36954710vsk.17.1625844161655; Fri, 09 Jul 2021 08:22:41 -0700 (PDT) X-Google-Smtp-Source: ABdhPJy8CGLEOUKyhrGNmfIPDwBB8d2oSWYRFXYM/rF4v0LEL4TsSjPyqsuUApYKc9s+2VoVo+mHB4LqeoIRY9FUGo8= X-Received: by 2002:a67:df85:: with SMTP id x5mr36954680vsk.17.1625844161487; Fri, 09 Jul 2021 08:22:41 -0700 (PDT) MIME-Version: 1.0 References: <1624600591-29841-1-git-send-email-anoobj@marvell.com> <1624600591-29841-2-git-send-email-anoobj@marvell.com> In-Reply-To: From: David Marchand Date: Fri, 9 Jul 2021 17:22:30 +0200 Message-ID: To: Dmitry Kozlyuk Cc: Akhil Goyal , NBU-Contact-Thomas Monjalon , Tejasree Kondoj , "dev@dpdk.org" , Archana Muniganti , Ali Alnubani , Anoob Joseph , Ankur Dwivedi , Jerin Jacob 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" Subject: Re: [dpdk-dev] [PATCH v2 01/20] crypto/cnxk: add driver skeleton 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 Sender: "dev" Hello, On Thu, Jul 8, 2021 at 10:15 PM David Marchand wrote: > - Reproduced the issue in Ubuntu 18.04 GHA vms: > > FAILED: drivers/rte_crypto_cnxk.pmd.c > /usr/bin/python3 ../buildtools/gen-pmdinfo-cfile.py > /home/runner/work/dpdk/dpdk/build/buildtools ar > /home/runner/work/dpdk/dpdk/build/drivers/libtmp_rte_crypto_cnxk.a > drivers/rte_crypto_cnxk.pmd.c /usr/bin/python3 > ../buildtools/pmdinfogen.py elf > Traceback (most recent call last): > File "../buildtools/pmdinfogen.py", line 274, in > main() > File "../buildtools/pmdinfogen.py", line 269, in main > drivers = load_drivers(image) > File "../buildtools/pmdinfogen.py", line 203, in load_drivers > drivers.append(Driver.load(image, symbol)) > File "../buildtools/pmdinfogen.py", line 157, in load > driver.pci_ids = cls._load_pci_ids(image, pci_table_name_symbol) > File "../buildtools/pmdinfogen.py", line 177, in _load_pci_ids > pci_id = rte_pci_id.from_buffer_copy(data) > ValueError: Buffer size too small (4 instead of at least 12 bytes) I spent some time trying to understand this error, there is probably multiple bug(s) somewhere between pyelftools/ctype/pmdinfogen. In any case, on my f32, before https://git.dpdk.org/dpdk/commit/?id=b146c30d3c0e (that hides the issue), with a more "recent" pyelftools + python than Ubuntu 18.04, I can see: $ cat $HOME/builds/build-clang-shared/drivers/rte_crypto_cnxk.pmd.c static __attribute__((unused)) const char *generator = "../../dpdk/buildtools/pmdinfogen.py"; const char crypto_cn9k_pmd_info[] __attribute__((used)) = "PMD_INFO_STRING= {\"name\": \"crypto_cn9k\", \"kmod\": \"vfio-pci\", \"pci_ids\": [[10272, 25926, 28516, 24946], [11824, 11569, 11827, 25446]]}"; const char crypto_cn10k_pmd_info[] __attribute__((used)) = "PMD_INFO_STRING= {\"name\": \"crypto_cn10k\", \"kmod\": \"vfio-pci\", \"pci_ids\": [[6013, 41203, 65535, 65535]]}"; $ nm -S /home/dmarchan/builds/build-clang-shared/drivers/librte_crypto_cnxk.so |grep cpt_table 000000000001d400 0000000000000018 b pci_id_cpt_table 000000000001d2f0 0000000000000018 d pci_id_cpt_table You'll notice the former is located in bss. $ hexdump -s $(($(printf "%d" 0x000000000001d400) - $(printf "%d" 0x1000))) -n $(printf "%d" 0x18) /home/dmarchan/builds/build-clang-shared/drivers/librte_crypto_cnxk.so 001c400 6e61 2067 6576 7372 6f69 206e 3031 302e 001c410 312e 2820 6546 6f64 001c418 $ hexdump -s $(($(printf "%d" 0x000000000001d2f0) - $(printf "%d" 0x1000))) -n $(printf "%d" 0x18) /home/dmarchan/builds/build-clang-shared/drivers/librte_crypto_cnxk.so 001c2f0 ffff 00ff 177d a0f3 ffff ffff 0000 0000 001c300 0000 0000 0000 0000 001c308 Those values match what the pmd.c file contains. Are we missing a "memset()" for such symbols in pmdinfogen? Or maybe a warning that we are adding an empty pci ids table.. There is no urgency, but if you find some time to look at this. Thanks. -- David Marchand