Thread (26 messages) 26 messages, 4 authors, 2021-07-09

Re: [dpdk-dev] [PATCH v2 01/20] crypto/cnxk: add driver skeleton

From: David Marchand <hidden>
Date: 2021-07-08 20:16:02

On Thu, Jul 8, 2021 at 7:08 PM Ali Alnubani [off-list ref] wrote:
quoted
-----Original Message-----
From: dev <redacted> On Behalf Of Anoob Joseph
Sent: Friday, June 25, 2021 8:56 AM
To: Akhil Goyal <redacted>; NBU-Contact-Thomas Monjalon
[off-list ref]
Cc: Ankur Dwivedi <redacted>; Jerin Jacob
[off-list ref]; Tejasree Kondoj [off-list ref];
dev@dpdk.org; Anoob Joseph [off-list ref]; Archana Muniganti
[off-list ref]
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 [off-list ref]
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 [off-list ref]
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
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help