Open
Conversation
This patch adds some basic files to describe the hinic3 driver. Signed-off-by: Feifei Wang <wangfeifei40@huawei.com> Signed-off-by: Yi Chen <chenyi221@huawei.com> Reviewed-by: Xin Wang <wangxin679@h-partners.com>
Add HW registers definition header file for SP series NIC. Add some headers that define commands and basic defines for use in the code. Signed-off-by: Xin Wang <wangxin679@h-partners.com> Reviewed-by: Yi Chen <chenyi221@huawei.com> Reviewed-by: Feifei Wang <wangfeifei40@huawei.com>
This patch adds some HW interfaces for bar operatioin interfaces, including: mapped bar address geeting, HW attributes getting, msi-x reg operation, function type getting and so on. Signed-off-by: Yi Chen <chenyi221@huawei.com> Reviewed-by: Xin Wang <wangxin679@h-partners.com> Reviewed-by: Feifei Wang <wangfeifei40@huawei.com>
Micocode is named ucode in SP series NIC. Its main responsibility is data transmission and reception. But it can also handle some administration works. It uses cmdq mechanism. This patch introduces data structures, initialization, interfaces, and commands sending functions of cmdq. Signed-off-by: Xin Wang <wangxin679@h-partners.com> Reviewed-by: Feifei Wang <wangfeifei40@huawei.com> Reviewed-by: Yi Chen <chenyi221@huawei.com>
Currently, there are two types of events: pf/vf connection status and port information printing. This patch contains related data structures and function codes. Signed-off-by: Xin Wang <wangxin679@h-partners.com> Reviewed-by: Yi Chen <chenyi221@huawei.com> Reviewed-by: Feifei Wang <wangfeifei40@huawei.com>
Eqs include aeq and ceq. Aeq is a kind of queue for mgmt asynchronous message and mgmt command response message. This patch introduces data structures, initialization, and related interfaces about aeq. Signed-off-by: Yi Chen <chenyi221@huawei.com> Reviewed-by: Xin Wang <wangxin679@h-partners.com> Reviewed-by: Feifei Wang <wangfeifei40@huawei.com>
Mgmt module is a kind of administration module for the chip. It is responsible for handling administration command from host. It mainly uses aeq to implement. This patch adds related data structures, packaged interfaces and function codes. Signed-off-by: Yi Chen <chenyi221@huawei.com> Reviewed-by: Xin Wang <wangxin679@h-partners.com> Reviewed-by: Feifei Wang <wangfeifei40@huawei.com>
Add code and data structure for hardware operation, including configuration, query, initialization and release. Signed-off-by: Yi Chen <chenyi221@huawei.com> Signed-off-by: Xin Wang <wangxin679@h-partners.com> Reviewed-by: Feifei Wang <wangfeifei40@huawei.com>
The items of configurations and queries for NIC business include MAC, VLAN, MTU, RSS and so on. These configurations and queries are handled by mgmt module. This patch introduces related data structures and function codes. Signed-off-by: Yi Chen <chenyi221@huawei.com> Reviewed-by: Xin Wang <wangxin679@h-partners.com> Reviewed-by: Feifei Wang <wangfeifei40@huawei.com>
Work queue is used for cmdq and tx/rx buff description. Nic business needs to configure cmdq context and txq/rxq context. This patch adds data structures and function codes for work queue and context. Signed-off-by: Xin Wang <wangxin679@h-partners.com> Reviewed-by: Feifei Wang <wangfeifei40@huawei.com> Reviewed-by: Yi Chen <chenyi221@huawei.com>
This patch adds support for mailbox of hinic3 PMD driver, mailbox is used for communication between PF/VF driver and MPU. This patch provides mailbox-related data structures and functional code. Signed-off-by: Yi Chen <chenyi221@huawei.com> Reviewed-by: Xin Wang <wangxin679@h-partners.com> Reviewed-by: Feifei Wang <wangfeifei40@huawei.com>
This patch contains data structures and function codes related to device initialization. Signed-off-by: Xin Wang <wangxin679@h-partners.com> Reviewed-by: Feifei Wang <wangfeifei40@huawei.com> Reviewed-by: Yi Chen <chenyi221@huawei.com>
Add ops related function codes. Signed-off-by: Feifei Wang <wangfeifei40@huawei.com> Signed-off-by: Xin Wang <wangxin679@h-partners.com> Reviewed-by: Yi Chen <chenyi221@huawei.com>
This patch add package sending and receiving function codes. Signed-off-by: Feifei Wang <wangfeifei40@huawei.com> Signed-off-by: Yi Chen <chenyi221@huawei.com> Reviewed-by: Xin Wang <wangxin679@h-partners.com>
Add man-machine language support and implements the get eeprom method. Signed-off-by: Xin Wang <wangxin679@h-partners.com> Reviewed-by: Feifei Wang <wangfeifei40@huawei.com> Reviewed-by: Yi Chen <chenyi221@huawei.com>
Add RSS and promiscuous ops related function codes. Signed-off-by: Xin Wang <wangxin679@h-partners.com> Reviewed-by: Feifei Wang <wangfeifei40@huawei.com> Reviewed-by: Yi Chen <chenyi221@huawei.com>
Added support for rte_flow, including ethertype, IPv4, IPv6, and tunnel VXLAN. In addition, user can add or delete filters. Signed-off-by: Yi Chen <chenyi221@huawei.com> Reviewed-by: Xin Wang <wangxin679@h-partners.com> Reviewed-by: Feifei Wang <wangfeifei40@huawei.com>
The meson.build file is added to this patch to enable the hinic3 compilation function. Signed-off-by: Yi Chen <chenyi221@huawei.com> Reviewed-by: Xin Wang <wangxin679@h-partners.com> Reviewed-by: Feifei Wang <wangfeifei40@huawei.com>
shemminger
pushed a commit
that referenced
this pull request
Oct 20, 2025
For '.' and '..' directories (or any short file name),
a out of bound issue occurs.
Caught by UBSan:
EAL: Detected shared linkage of DPDK
../lib/eal/common/eal_common_options.c:420:15: runtime error: index -2
out of bounds for type 'char[256]'
#0 0x7f867eedf206 in eal_plugindir_init
eal_common_options.c
#1 0x7f867eede58a in eal_plugins_init
(build/lib/librte_eal.so.25+0xde58a)
(BuildId: e7e4a1935e4bacb51c82ab1a84098a27decf3b4c)
#2 0x7f867efb8587 in rte_eal_init
(build/lib/librte_eal.so.25+0x1b8587)
(BuildId: e7e4a1935e4bacb51c82ab1a84098a27decf3b4c)
DPDK#3 0x55b62360861e in main
(/home/runner/work/dpdk/dpdk/build/app/dpdk-testpmd+0x9e061e)
(BuildId: d821ec918612c83fad8b5ccb6cc518e66bee48cd)
DPDK#4 0x7f8667429d8f in __libc_start_call_main
csu/../sysdeps/nptl/libc_start_call_main.h:58:16
DPDK#5 0x7f8667429e3f in __libc_start_main
csu/../csu/libc-start.c:392:3
DPDK#6 0x55b622d9d444 in _start
(/home/runner/work/dpdk/dpdk/build/app/dpdk-testpmd+0x175444)
(BuildId: d821ec918612c83fad8b5ccb6cc518e66bee48cd)
SUMMARY: UndefinedBehaviorSanitizer: undefined-behavior
../lib/eal/common/eal_common_options.c:420:15 in
../lib/eal/common/eal_common_options.c:421:15:
runtime error: index 18446744073709551609 out of bounds
for type 'char[256]'
Fixes: c57f6e5 ("eal: fix plugin loading")
Cc: stable@dpdk.org
Signed-off-by: David Marchand <david.marchand@redhat.com>
Acked-by: Bruce Richardson <bruce.richardson@intel.com>
Acked-by: Chengwen Feng <fengchengwen@huawei.com>
shemminger
pushed a commit
that referenced
this pull request
Dec 2, 2025
After creating at least one graph and calling rte_node_edge_update to
add a new edge on a node which is in use in the graph, the node memory
is reallocated but the active graph still has a pointer to the freed
memory.
When destroying the graph, it causes a use-after-free error detected by
libasan:
ERROR: AddressSanitizer: heap-use-after-free
READ of size 8 at 0x7c4baa5e4da8 thread T0
#0 0x0000005ad224 in graph_node_fini lib/graph/graph.c:256
#1 0x0000005ae657 in rte_graph_destroy lib/graph/graph.c:504
...
freed by thread T0 here:
#0 0x7f1bac4e5e4b in realloc.part.0 (/lib64/libasan.so.8+0xe5e4b)
#1 0x0000005ab6d7 in edge_update lib/graph/node.c:271
#2 0x0000005abb1b in rte_node_edge_update lib/graph/node.c:339
...
previously allocated by thread T0 here:
#0 0x7f1bac4e5e4b in realloc.part.0 (/lib64/libasan.so.8+0xe5e4b)
#1 0x0000005ab6d7 in edge_update lib/graph/node.c:271
#2 0x0000005abb1b in rte_node_edge_update lib/graph/node.c:339
...
Use malloc+memcpy and add an internal function to replace all references
to the old node memory before freeing it.
Fixes: c59dac2 ("graph: implement node operations")
Cc: stable@dpdk.org
Signed-off-by: Robin Jarry <rjarry@redhat.com>
Acked-by: Jerin Jacob <jerinj@marvell.com>
shemminger
pushed a commit
that referenced
this pull request
Feb 13, 2026
Each enqueued async flow operation in testpmd has an associated
queue_job struct. It is passed in user data and used to determine
the type of operation when operation results are pulled on a given
queue. This information informs the necessary additional handling
(e.g., freeing flow struct or dumping the queried action state).
If async flow operations were enqueued and results were not pulled
before quitting testpmd, these queue_job structs were leaked as reported
by ASAN:
Direct leak of 88 byte(s) in 1 object(s) allocated from:
#0 0x7f7539084a37 in __interceptor_calloc
../../../../src/libsanitizer/asan/asan_malloc_linux.cpp:154
#1 0x55a872c8e512 in port_queue_flow_create
(/download/dpdk/install/bin/dpdk-testpmd+0x4cd512)
#2 0x55a872c28414 in cmd_flow_cb
(/download/dpdk/install/bin/dpdk-testpmd+0x467414)
DPDK#3 0x55a8734fa6a3 in __cmdline_parse
(/download/dpdk/install/bin/dpdk-testpmd+0xd396a3)
DPDK#4 0x55a8734f6130 in cmdline_valid_buffer
(/download/dpdk/install/bin/dpdk-testpmd+0xd35130)
DPDK#5 0x55a873503b4f in rdline_char_in
(/download/dpdk/install/bin/dpdk-testpmd+0xd42b4f)
DPDK#6 0x55a8734f62ba in cmdline_in
(/download/dpdk/install/bin/dpdk-testpmd+0xd352ba)
DPDK#7 0x55a8734f65eb in cmdline_interact
(/download/dpdk/install/bin/dpdk-testpmd+0xd355eb)
DPDK#8 0x55a872c19b8e in prompt
(/download/dpdk/install/bin/dpdk-testpmd+0x458b8e)
DPDK#9 0x55a872be425a in main
(/download/dpdk/install/bin/dpdk-testpmd+0x42325a)
DPDK#10 0x7f7538756d8f in __libc_start_call_main
../sysdeps/nptl/libc_start_call_main.h:58
This patch addresses that by registering all queue_job structs, for a
given queue, on a linked list. Whenever operation results are pulled
and result is handled, queue_job struct will be removed from that list
and freed.
Before port is closed, during flow flush, testpmd will pull
all of the expected results
(based on the number of queue_job on the list).
Fixes: c9dc038 ("ethdev: add indirect action async query")
Fixes: 99231e4 ("ethdev: add template table resize")
Fixes: 77e7939 ("app/testpmd: add flow rule update command")
Fixes: 3e3edab ("ethdev: add flow quota")
Fixes: 966eb55 ("ethdev: add queue-based API to report aged flow rules")
Cc: stable@dpdk.org
Signed-off-by: Dariusz Sosnowski <dsosnowski@nvidia.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
No description provided.