|
Revision tags: v24.11, v24.11-rc4, v24.11-rc3, v24.11-rc2, v24.11-rc1 |
|
| #
a3923d6b |
| 08-Oct-2024 |
Stephen Hemminger <stephen@networkplumber.org> |
bpf: fix free function mismatch if convert fails
If conversion of cBF to eBPF fails then an object allocated with rte_malloc() would be passed to free().
[908/3201] Compiling C object lib/librte_bp
bpf: fix free function mismatch if convert fails
If conversion of cBF to eBPF fails then an object allocated with rte_malloc() would be passed to free().
[908/3201] Compiling C object lib/librte_bpf.a.p/bpf_bpf_convert.c.o ../lib/bpf/bpf_convert.c: In function ‘rte_bpf_convert’: ../lib/bpf/bpf_convert.c:559:17: warning: ‘free’ called on pointer returned from a mismatched allocation function [-Wmismatched-dealloc] 559 | free(prm); | ^~~~~~~~~ ../lib/bpf/bpf_convert.c:545:15: note: returned from ‘rte_zmalloc’ 545 | prm = rte_zmalloc("bpf_filter", | ^~~~~~~~~~~~~~~~~~~~~~~~~ 546 | sizeof(*prm) + ebpf_len * sizeof(*ebpf), 0); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Fixes: 2eccf6afbea9 ("bpf: add function to convert classic BPF to DPDK BPF") Cc: stable@dpdk.org
Signed-off-by: Stephen Hemminger <stephen@networkplumber.org> Acked-by: Morten Brørup <mb@smartsharesystems.com> Acked-by: Konstantin Ananyev <konstantin.ananyev@huawei.com> Acked-by: Wathsala Vithanage <wathsala.vithanage@arm.com>
show more ...
|
|
Revision tags: v24.07, v24.07-rc4, v24.07-rc3, v24.07-rc2, v24.07-rc1, v24.03, v24.03-rc4, v24.03-rc3, v24.03-rc2, v24.03-rc1 |
|
| #
0e21c7c0 |
| 07-Dec-2023 |
David Marchand <david.marchand@redhat.com> |
lib: replace logging helpers
This is a preparation step before the next change.
Many libraries have their own logging helpers that do not add a newline in their format string. Some previous changes
lib: replace logging helpers
This is a preparation step before the next change.
Many libraries have their own logging helpers that do not add a newline in their format string. Some previous changes fixed places where some of those helpers are called without a trailing newline. Using RTE_LOG_LINE in the existing helpers will ensure we don't introduce new issues in the future.
The problem is that if we simply convert to the RTE_LOG_LINE helper, a future fix may introduce a regression since the logging helper change won't be backported.
To address this concern, rename existing helpers: backporting a call to them will trigger some conflict or build issue in LTS branches.
Note: - bpf and vhost that still has some debug multilines messages, a direct call to RTE_LOG/RTE_LOG_DP is used: this will make it easier to notice such special cases, - about previously publicly exposed logging helpers, when such helper is not publicly used (iow in public inline API), it is removed from the public API (this is the case for the member library),
Signed-off-by: David Marchand <david.marchand@redhat.com> Reviewed-by: Andrew Rybchenko <andrew.rybchenko@oktetlabs.ru>
show more ...
|
|
Revision tags: v23.11, v23.11-rc4, v23.11-rc3, v23.11-rc2, v23.11-rc1, v23.07, v23.07-rc4, v23.07-rc3, v23.07-rc2, v23.07-rc1, v23.03, v23.03-rc4, v23.03-rc3 |
|
| #
cf095b1e |
| 14-Mar-2023 |
J.J. Martzki <mars14850@gmail.com> |
bpf: rename functions to avoid conflict with libpcap
The library libpcap has their function 'bpf_validate' either so there would be a multiple definition issue when linking with librte_bpf.a and lib
bpf: rename functions to avoid conflict with libpcap
The library libpcap has their function 'bpf_validate' either so there would be a multiple definition issue when linking with librte_bpf.a and libpcap.a statically (Same as http://dpdk.org/patch/52631). So just rename the function names to avoid such issue.
Signed-off-by: J.J. Martzki <mars14850@gmail.com> Acked-by: Konstantin Ananyev <konstantin.v.ananyev@yandex.ru>
show more ...
|
|
Revision tags: v23.03-rc2, v23.03-rc1, v22.11, v22.11-rc4, v22.11-rc3, v22.11-rc2, v22.11-rc1, v22.07, v22.07-rc4, v22.07-rc3, v22.07-rc2, v22.07-rc1, v22.03, v22.03-rc4, v22.03-rc3, v22.03-rc2, v22.03-rc1 |
|
| #
7be78d02 |
| 29-Nov-2021 |
Josh Soref <jsoref@gmail.com> |
fix spelling in comments and strings
The tool comes from https://github.com/jsoref
Signed-off-by: Josh Soref <jsoref@gmail.com> Signed-off-by: Thomas Monjalon <thomas@monjalon.net>
|
|
Revision tags: v21.11, v21.11-rc4, v21.11-rc3, v21.11-rc2, v21.11-rc1 |
|
| #
2eccf6af |
| 20-Oct-2021 |
Stephen Hemminger <stephen@networkplumber.org> |
bpf: add function to convert classic BPF to DPDK BPF
The pcap library emits classic BPF (32 bit) and is useful for creating filter programs. The DPDK BPF library only implements extended BPF (eBPF)
bpf: add function to convert classic BPF to DPDK BPF
The pcap library emits classic BPF (32 bit) and is useful for creating filter programs. The DPDK BPF library only implements extended BPF (eBPF). Add an function to convert from old to new.
The rte_bpf_convert function uses rte_malloc to put the resulting program in hugepage shared memory so it can be passed from a secondary process to a primary process.
The code to convert was originally done as part of the Linux kernel implementation then converted to a userspace program. See https://github.com/tklauser/filter2xdp
Both authors have agreed that it is allowable to create a modified version of this code and license it with BSD license used by DPDK.
Signed-off-by: Stephen Hemminger <stephen@networkplumber.org> Acked-by: Konstantin Ananyev <konstantin.ananyev@intel.com> Acked-by: Ray Kinsella <mdr@ashroe.eu>
show more ...
|