DPDK patches and discussions
 help / color / mirror / Atom feed
From: David Marchand <david.marchand@redhat.com>
To: Anoob Joseph <anoobj@marvell.com>,
	Ankur Dwivedi <adwivedi@marvell.com>,
	 Jerin Jacob <jerinj@marvell.com>
Cc: Akhil Goyal <gakhil@marvell.com>,
	NBU-Contact-Thomas Monjalon <thomas@monjalon.net>,
	 Tejasree Kondoj <ktejasree@marvell.com>,
	"dev@dpdk.org" <dev@dpdk.org>,
	 Archana Muniganti <marchana@marvell.com>,
	Ali Alnubani <alialnu@oss.nvidia.com>
Subject: Re: [dpdk-dev] [PATCH v2 01/20] crypto/cnxk: add driver skeleton
Date: Thu, 8 Jul 2021 22:15:43 +0200	[thread overview]
Message-ID: <CAJFAV8ym2cjAPbeE9LSVfD=pBf6nmE-V8-tzomzD3rROrs1ryg@mail.gmail.com> (raw)
In-Reply-To: <DM4PR12MB5167A591B92AF2AF39697CC6DA199@DM4PR12MB5167.namprd12.prod.outlook.com>

On Thu, Jul 8, 2021 at 7:08 PM Ali Alnubani <alialnu@oss.nvidia.com> wrote:
> > -----Original Message-----
> > From: dev <dev-bounces@dpdk.org> On Behalf Of Anoob Joseph
> > Sent: Friday, June 25, 2021 8:56 AM
> > To: Akhil Goyal <gakhil@marvell.com>; NBU-Contact-Thomas Monjalon
> > <thomas@monjalon.net>
> > Cc: Ankur Dwivedi <adwivedi@marvell.com>; Jerin Jacob
> > <jerinj@marvell.com>; Tejasree Kondoj <ktejasree@marvell.com>;
> > dev@dpdk.org; Anoob Joseph <anoobj@marvell.com>; Archana Muniganti
> > <marchana@marvell.com>
> > Subject: [dpdk-dev] [PATCH v2 01/20] crypto/cnxk: add driver skeleton
> >
>
> This patch is causing the following exception with debug mode in main (02edbfab1e):
> """
> meson --werror --buildtype=debug build && ninja -C build
> ...
> ValueError: Buffer size too small (4 instead of at least 12 bytes)
> ...
> """

- 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 <module>
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)
Traceback (most recent call last):
File "../buildtools/gen-pmdinfo-cfile.py", line 20, in <module>
subprocess.run(pmdinfogen + paths + [output], check=True)
File "/usr/lib/python3.6/subprocess.py", line 438, in run
output=stdout, stderr=stderr)
subprocess.CalledProcessError: Command '['/usr/bin/python3',
'../buildtools/pmdinfogen.py', 'elf',
'/home/runner/work/dpdk/dpdk/build/buildtools/tmp1ajyjflf/crypto_cnxk_cn9k_cryptodev.c.o',
'/home/runner/work/dpdk/dpdk/build/buildtools/tmp1ajyjflf/crypto_cnxk_cn9k_cryptodev_ops.c.o',
'/home/runner/work/dpdk/dpdk/build/buildtools/tmp1ajyjflf/crypto_cnxk_cn10k_cryptodev.c.o',
'/home/runner/work/dpdk/dpdk/build/buildtools/tmp1ajyjflf/crypto_cnxk_cn10k_cryptodev_ops.c.o',
'/home/runner/work/dpdk/dpdk/build/buildtools/tmp1ajyjflf/crypto_cnxk_cn10k_ipsec.c.o',
'/home/runner/work/dpdk/dpdk/build/buildtools/tmp1ajyjflf/crypto_cnxk_cnxk_cryptodev.c.o',
'/home/runner/work/dpdk/dpdk/build/buildtools/tmp1ajyjflf/crypto_cnxk_cnxk_cryptodev_capabilities.c.o',
'/home/runner/work/dpdk/dpdk/build/buildtools/tmp1ajyjflf/crypto_cnxk_cnxk_cryptodev_ops.c.o',
'/home/runner/work/dpdk/dpdk/build/buildtools/tmp1ajyjflf/crypto_cnxk_cnxk_cryptodev_sec.c.o',
'drivers/rte_crypto_cnxk.pmd.c']' returned non-zero exit status 1.

I don't get the relation with the debug mode, but there must be
something different with the pci table symbols for this driver.

My bet is on drivers/crypto/cnxk/cn9k_cryptodev.c:
static struct rte_pci_id pci_id_cpt_table[] = {
        {
        },
        /* sentinel */
        {
                .device_id = 0
        },
};

Adding some pci id, like the cn9k vf cpt pci id, will likely fix the issue.
And as a bonus, this will make this driver actually do something.


- There is also another issue with clang + debug.
This seems rather old, nobody complained.
Fixed with:

Author: David Marchand <david.marchand@redhat.com>
Date:   Thu Jul 8 22:10:11 2021 +0200

    net/octeontx/base: fix debug build with clang

    Remove conflicting declaration of this symbol.

    Fixes: d0d654986018 ("net/octeontx: support event Rx adapter")
    Cc: stable@dpdk.org

    Signed-off-by: David Marchand <david.marchand@redhat.com>

diff --git a/drivers/net/octeontx/base/octeontx_pkivf.h
b/drivers/net/octeontx/base/octeontx_pkivf.h
index d41eaa57ed..8c86841ea6 100644
--- a/drivers/net/octeontx/base/octeontx_pkivf.h
+++ b/drivers/net/octeontx/base/octeontx_pkivf.h
@@ -362,7 +362,6 @@ int octeontx_pki_port_open(int port);
 int octeontx_pki_port_hash_config(int port, pki_hash_cfg_t *hash_cfg);
 int octeontx_pki_port_pktbuf_config(int port, pki_pktbuf_cfg_t *buf_cfg);
 int octeontx_pki_port_create_qos(int port, pki_qos_cfg_t *qos_cfg);
-int octeontx_pki_port_close(int port);
 int octeontx_pki_port_errchk_config(int port, pki_errchk_cfg_t *cfg);
 int octeontx_pki_port_vlan_fltr_config(int port,
                                pki_port_vlan_filter_config_t *fltr_cfg);



-- 
David Marchand


  reply	other threads:[~2021-07-08 20:16 UTC|newest]

Thread overview: 26+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <http://patches.dpdk.org/project/dpdk/cover/1622652221-22732-1-git-send-email-anoobj@marvell.com/>
2021-06-25  5:56 ` [dpdk-dev] [PATCH v2 00/20] Add Marvell CNXK crypto PMDs Anoob Joseph
2021-06-25  5:56   ` [dpdk-dev] [PATCH v2 01/20] crypto/cnxk: add driver skeleton Anoob Joseph
2021-07-08 17:08     ` Ali Alnubani
2021-07-08 20:15       ` David Marchand [this message]
2021-07-09 15:22         ` David Marchand
2021-06-25  5:56   ` [dpdk-dev] [PATCH v2 02/20] crypto/cnxk: add probe and remove Anoob Joseph
2021-06-25  5:56   ` [dpdk-dev] [PATCH v2 03/20] crypto/cnxk: add device control ops Anoob Joseph
2021-06-25  5:56   ` [dpdk-dev] [PATCH v2 04/20] crypto/cnxk: add queue pair ops Anoob Joseph
2021-06-25  5:56   ` [dpdk-dev] [PATCH v2 05/20] crypto/cnxk: add session ops framework Anoob Joseph
2021-06-25  5:56   ` [dpdk-dev] [PATCH v2 06/20] crypto/cnxk: add enqueue burst op Anoob Joseph
2021-06-25  5:56   ` [dpdk-dev] [PATCH v2 07/20] crypto/cnxk: add dequeue " Anoob Joseph
2021-06-25  5:56   ` [dpdk-dev] [PATCH v2 08/20] crypto/cnxk: add cipher operation in session Anoob Joseph
2021-06-25  5:56   ` [dpdk-dev] [PATCH v2 09/20] crypto/cnxk: add auth " Anoob Joseph
2021-06-25  5:56   ` [dpdk-dev] [PATCH v2 10/20] crypto/cnxk: add aead " Anoob Joseph
2021-06-25  5:56   ` [dpdk-dev] [PATCH v2 11/20] crypto/cnxk: add chained " Anoob Joseph
2021-06-25  5:56   ` [dpdk-dev] [PATCH v2 12/20] crypto/cnxk: add flexi crypto cipher encrypt Anoob Joseph
2021-06-25  5:56   ` [dpdk-dev] [PATCH v2 13/20] crypto/cnxk: add flexi crypto cipher decrypt Anoob Joseph
2021-06-25  5:56   ` [dpdk-dev] [PATCH v2 14/20] crypto/cnxk: add ZUC and SNOW3G encrypt Anoob Joseph
2021-06-25  5:56   ` [dpdk-dev] [PATCH v2 15/20] crypto/cnxk: add ZUC and SNOW3G decrypt Anoob Joseph
2021-06-25  5:56   ` [dpdk-dev] [PATCH v2 16/20] crypto/cnxk: add KASUMI encrypt Anoob Joseph
2021-06-25  5:56   ` [dpdk-dev] [PATCH v2 17/20] crypto/cnxk: add KASUMI decrypt Anoob Joseph
2021-06-25  5:56   ` [dpdk-dev] [PATCH v2 18/20] crypto/cnxk: add digest support Anoob Joseph
2021-06-25  5:56   ` [dpdk-dev] [PATCH v2 19/20] crypto/cnxk: add symmetric crypto capabilities Anoob Joseph
2021-06-25  5:56   ` [dpdk-dev] [PATCH v2 20/20] test/crypto: enable cnxk crypto PMDs Anoob Joseph
2021-06-28 19:19   ` [dpdk-dev] [PATCH v2 00/20] Add Marvell CNXK " Akhil Goyal
2021-06-28 20:31     ` Akhil Goyal

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to='CAJFAV8ym2cjAPbeE9LSVfD=pBf6nmE-V8-tzomzD3rROrs1ryg@mail.gmail.com' \
    --to=david.marchand@redhat.com \
    --cc=adwivedi@marvell.com \
    --cc=alialnu@oss.nvidia.com \
    --cc=anoobj@marvell.com \
    --cc=dev@dpdk.org \
    --cc=gakhil@marvell.com \
    --cc=jerinj@marvell.com \
    --cc=ktejasree@marvell.com \
    --cc=marchana@marvell.com \
    --cc=thomas@monjalon.net \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).