|
Revision tags: v24.11, v24.11-rc4, v24.11-rc3, v24.11-rc2, v24.11-rc1 |
|
| #
e214d58e |
| 13-Oct-2024 |
Morten Brørup <mb@smartsharesystems.com> |
net: improve VLAN header type alignment
Ethernet packets can be VLAN tagged, i.e. an Ethernet header can have a VLAN tag (a.k.a. VLAN header) embedded. Since the Ethernet header is 2 byte aligned, a
net: improve VLAN header type alignment
Ethernet packets can be VLAN tagged, i.e. an Ethernet header can have a VLAN tag (a.k.a. VLAN header) embedded. Since the Ethernet header is 2 byte aligned, and the VLAN tag is directly related to the Ethernet header, the VLAN tag is also 2 byte aligned, so packing the VLAN tag structure is not necessary.
Furthermore, the Ethernet header type is implicitly 2 byte aligned, so removed the superfluous explicit 2 byte alignment.
Added static_asserts to verify the size and alignment of the various Ethernet types.
Signed-off-by: Morten Brørup <mb@smartsharesystems.com> Acked-by: Chengwen Feng <fengchengwen@huawei.com> Acked-by: Bruce Richardson <bruce.richardson@intel.com>
show more ...
|
| #
719834a6 |
| 20-Sep-2024 |
Mattias Rönnblom <mattias.ronnblom@ericsson.com> |
use C linkage where appropriate in headers
Assure that 'extern "C" { /../ }' do not cover files included from a particular header file, and address minor issues resulting from this change of order.
use C linkage where appropriate in headers
Assure that 'extern "C" { /../ }' do not cover files included from a particular header file, and address minor issues resulting from this change of order.
Dealing with C++ should delegate to the individual include file level, rather than being imposed by the user of that file. For example, forcing C linkage prevents __Generic macros being replaced with overloaded static inline functions in C++ translation units.
Eliminate 'extern "C"' from files which do not declare any symbols (e.g., only macros or struct types).
On the other hand, the headers check is too naive in assuming that all headers must contain a 'extern "C"'. Such a check was added in commit 1ee492bdc4ff ("buildtools/chkincs: check missing C++ guards"). Since this current change results in many headers not containing such a token, remove the check for 'extern "C"' until we have a better implementation.
Signed-off-by: Mattias Rönnblom <mattias.ronnblom@ericsson.com> Acked-by: Morten Brørup <mb@smartsharesystems.com> Signed-off-by: David Marchand <david.marchand@redhat.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 |
|
| #
c6552d9a |
| 04-Mar-2024 |
Tyler Retzlaff <roretzla@linux.microsoft.com> |
lib: move alignment attribute on types for MSVC
The current location used for __rte_aligned(a) for alignment of types is not compatible with MSVC. There is only a single location accepted by both to
lib: move alignment attribute on types for MSVC
The current location used for __rte_aligned(a) for alignment of types is not compatible with MSVC. There is only a single location accepted by both toolchains.
The standard offers no alignment facility that compatibly interoperates with C and C++ but it may be achieved by relocating the placement of __rte_aligned(a) to the aforementioned location accepted by all currently supported toolchains.
To allow alignment for both compilers, do the following:
* Expand __rte_aligned(a) to __declspec(align(a)) when building with MSVC.
* Move __rte_aligned from the end of {struct,union} definitions to be between {struct,union} and tag.
The placement between {struct,union} and the tag allows the desired alignment to be imparted on the type regardless of the toolchain being used for all of GCC, LLVM, MSVC compilers building both C and C++.
Note: this move has an additional benefit as Doxygen is not confused anymore like for the rte_event_vector struct definition.
Signed-off-by: Tyler Retzlaff <roretzla@linux.microsoft.com> Acked-by: Morten Brørup <mb@smartsharesystems.com> Acked-by: Bruce Richardson <bruce.richardson@intel.com> Acked-by: Konstantin Ananyev <konstantin.ananyev@huawei.com> Acked-by: Chengwen Feng <fengchengwen@huawei.com> Reviewed-by: Maxime Coquelin <maxime.coquelin@redhat.com> Signed-off-by: David Marchand <david.marchand@redhat.com>
show more ...
|
|
Revision tags: v24.03-rc1 |
|
| #
b74087f1 |
| 19-Feb-2024 |
Alan Elder <alan.elder@microsoft.com> |
net: add macros for VLAN metadata parsing
Add common macros for extracting parts of VLAN tag.
Fixes: 4e9c73e96e83 ("net/netvsc: add Hyper-V network device") Cc: stable@dpdk.org
Signed-off-by: Alan
net: add macros for VLAN metadata parsing
Add common macros for extracting parts of VLAN tag.
Fixes: 4e9c73e96e83 ("net/netvsc: add Hyper-V network device") Cc: stable@dpdk.org
Signed-off-by: Alan Elder <alan.elder@microsoft.com> Reviewed-by: Ferruh Yigit <ferruh.yigit@amd.com>
show more ...
|
|
Revision tags: v23.11, v23.11-rc4, v23.11-rc3, v23.11-rc2, v23.11-rc1 |
|
| #
df6e6dde |
| 03-Oct-2023 |
Stephen Hemminger <stephen@networkplumber.org> |
net: accept more MAC address inputs for parser API
This updates rte_ether_addr_unformat() to accept more types formats for MAC address. It allows IEEE, IETF and Cisco formats. Leading zeros are allo
net: accept more MAC address inputs for parser API
This updates rte_ether_addr_unformat() to accept more types formats for MAC address. It allows IEEE, IETF and Cisco formats. Leading zeros are allowed for byte formats.
Signed-off-by: Stephen Hemminger <stephen@networkplumber.org> Acked-by: Morten Brørup <mb@smartsharesystems.com> Acked-by: Ferruh Yigit <ferruh.yigit@amd.com>
show more ...
|
|
Revision tags: v23.07, v23.07-rc4, v23.07-rc3, v23.07-rc2, v23.07-rc1, v23.03, v23.03-rc4, v23.03-rc3, v23.03-rc2 |
|
| #
23f3dac4 |
| 22-Feb-2023 |
Stephen Hemminger <stephen@networkplumber.org> |
remove repeated words
Signed-off-by: Stephen Hemminger <stephen@networkplumber.org>
|
|
Revision tags: 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 |
|
| #
30a1de10 |
| 15-Feb-2022 |
Sean Morrissey <sean.morrissey@intel.com> |
lib: remove unneeded header includes
These header includes have been flagged by the iwyu_tool and removed.
Signed-off-by: Sean Morrissey <sean.morrissey@intel.com>
|
|
Revision tags: v22.03-rc1, v21.11, v21.11-rc4, v21.11-rc3 |
|
| #
25cf2630 |
| 17-Nov-2021 |
Ferruh Yigit <ferruh.yigit@intel.com> |
net: add macro for VLAN header length
Multiple drivers are defining macros for VLAN header length, to remove the redundancy defining macro in the ether header. And updated drivers to use the new mac
net: add macro for VLAN header length
Multiple drivers are defining macros for VLAN header length, to remove the redundancy defining macro in the ether header. And updated drivers to use the new macro.
Signed-off-by: Ferruh Yigit <ferruh.yigit@intel.com> Acked-by: Haiyue Wang <haiyue.wang@intel.com> Acked-by: Rosen Xu <rosen.xu@intel.com> Acked-by: Jiawen Wu <jiawenwu@trustnetic.com>
show more ...
|
|
Revision tags: v21.11-rc2, v21.11-rc1 |
|
| #
a3f8d058 |
| 21-Oct-2021 |
Eli Britstein <elibr@nvidia.com> |
net: avoid cast-align warning in VLAN insert function
In rte_vlan_insert there is a casting of rte_pktmbuf_prepend returned value to (struct rte_ether_hdr *), which causes cast-align warning when us
net: avoid cast-align warning in VLAN insert function
In rte_vlan_insert there is a casting of rte_pktmbuf_prepend returned value to (struct rte_ether_hdr *), which causes cast-align warning when using strict cast align flag with supporting gcc: gcc (Ubuntu 9.3.0-17ubuntu1~20.04) 9.3.0 CFLAGS="-Wcast-align=strict" make V=1 -C examples/l2fwd clean static
In file included from main.c:35: /dpdk/build/include/rte_ether.h:370:7: warning: cast increases required alignment of target type [-Wcast-align] 370 | nh = (struct rte_ether_hdr *) | ^
As the code assumes correct alignment, add first a (void *) casting, to avoid the warning.
Fixes: c974021a5949 ("ether: add soft vlan encap/decap") Cc: stable@dpdk.org
Signed-off-by: Eli Britstein <elibr@nvidia.com> Acked-by: Olivier Matz <olivier.matz@6wind.com>
show more ...
|
| #
daa02b5c |
| 15-Oct-2021 |
Olivier Matz <olivier.matz@6wind.com> |
mbuf: add namespace to offload flags
Fix the mbuf offload flags namespace by adding an RTE_ prefix to the name. The old flags remain usable, but a deprecation warning is issued at compilation.
Sign
mbuf: add namespace to offload flags
Fix the mbuf offload flags namespace by adding an RTE_ prefix to the name. The old flags remain usable, but a deprecation warning is issued at compilation.
Signed-off-by: Olivier Matz <olivier.matz@6wind.com> Acked-by: Andrew Rybchenko <andrew.rybchenko@oktetlabs.ru> Acked-by: Ajit Khaparde <ajit.khaparde@broadcom.com> Acked-by: Somnath Kotur <somnath.kotur@broadcom.com>
show more ...
|
| #
04d43857 |
| 07-Oct-2021 |
Dmitry Kozlyuk <dmitry.kozliuk@gmail.com> |
net: rename Ethernet header fields
Definition of `rte_ether_addr` structure used a workaround allowing DPDK and Windows SDK headers to be used in the same file, because Windows SDK defines `s_addr`
net: rename Ethernet header fields
Definition of `rte_ether_addr` structure used a workaround allowing DPDK and Windows SDK headers to be used in the same file, because Windows SDK defines `s_addr` as a macro. Rename `s_addr` to `src_addr` and `d_addr` to `dst_addr` to avoid the conflict and remove the workaround. Deprecation notice: https://mails.dpdk.org/archives/dev/2021-July/215270.html
Signed-off-by: Dmitry Kozlyuk <dmitry.kozliuk@gmail.com>
show more ...
|
| #
2cea5168 |
| 31-Aug-2021 |
Stephen Hemminger <stephen@networkplumber.org> |
net: promote string to ethernet to stable
This function has been in since 19.11.
Signed-off-by: Stephen Hemminger <stephen@networkplumber.org> Acked-by: Andrew Rybchenko <andrew.rybchenko@oktetlabs
net: promote string to ethernet to stable
This function has been in since 19.11.
Signed-off-by: Stephen Hemminger <stephen@networkplumber.org> Acked-by: Andrew Rybchenko <andrew.rybchenko@oktetlabs.ru> Acked-by: Ferruh Yigit <ferruh.yigit@intel.com> Acked-by: Olivier Matz <olivier.matz@6wind.com>
show more ...
|
| #
a7db3afc |
| 25-Aug-2021 |
Aman Deep Singh <aman.deep.singh@intel.com> |
net: add macro to extract MAC address bytes
Added macros to simplify print of MAC address. The six bytes of a MAC address are extracted in a macro here, to improve code readablity.
Signed-off-by: A
net: add macro to extract MAC address bytes
Added macros to simplify print of MAC address. The six bytes of a MAC address are extracted in a macro here, to improve code readablity.
Signed-off-by: Aman Deep Singh <aman.deep.singh@intel.com> Reviewed-by: Ferruh Yigit <ferruh.yigit@intel.com>
show more ...
|
| #
c2c4f87b |
| 25-Aug-2021 |
Aman Deep Singh <aman.deep.singh@intel.com> |
net: add macro for MAC address print
Added macro to print six bytes of MAC address. The MAC addresses will be printed in upper case hexadecimal format. In case there is a specific check for lower ca
net: add macro for MAC address print
Added macro to print six bytes of MAC address. The MAC addresses will be printed in upper case hexadecimal format. In case there is a specific check for lower case MAC address, the user may need to make a change in such test case after this patch.
Signed-off-by: Aman Deep Singh <aman.deep.singh@intel.com> Reviewed-by: Ferruh Yigit <ferruh.yigit@intel.com>
show more ...
|
|
Revision tags: v21.08, v21.08-rc4, v21.08-rc3, v21.08-rc2, v21.08-rc1, v21.05, v21.05-rc4, v21.05-rc3 |
|
| #
dc2c712f |
| 06-May-2021 |
David Marchand <david.marchand@redhat.com> |
net: add endianness annotations to ethernet headers
Spotted by sparse in OVS build:
/home/runner/work/ovs/ovs/dpdk-dir/build/include/rte_flow.h:789:27: error: incorrect type in initializer (differe
net: add endianness annotations to ethernet headers
Spotted by sparse in OVS build:
/home/runner/work/ovs/ovs/dpdk-dir/build/include/rte_flow.h:789:27: error: incorrect type in initializer (different base types) /home/runner/work/ovs/ovs/dpdk-dir/build/include/rte_flow.h:789:27: expected unsigned short [usertype] ether_type /home/runner/work/ovs/ovs/dpdk-dir/build/include/rte_flow.h:789:27: got restricted ovs_be16 [usertype] /home/runner/work/ovs/ovs/dpdk-dir/build/include/rte_flow.h:829:25: error: incorrect type in initializer (different base types) /home/runner/work/ovs/ovs/dpdk-dir/build/include/rte_flow.h:829:25: expected unsigned short [usertype] vlan_tci /home/runner/work/ovs/ovs/dpdk-dir/build/include/rte_flow.h:829:25: got restricted ovs_be16 [usertype] /home/runner/work/ovs/ovs/dpdk-dir/build/include/rte_flow.h:830:26: error: incorrect type in initializer (different base types) /home/runner/work/ovs/ovs/dpdk-dir/build/include/rte_flow.h:830:26: expected unsigned short [usertype] eth_proto /home/runner/work/ovs/ovs/dpdk-dir/build/include/rte_flow.h:830:26: got restricted ovs_be16 [usertype]
This was not caught before as no code in headers was using those fields. This changed with commit 6f2168b69aee ("ethdev: reuse ethernet header definition in flow item") and commit a56a262e3408 ("ethdev: reuse VLAN header definition in flow item").
Signed-off-by: David Marchand <david.marchand@redhat.com> Acked-by: Olivier Matz <olivier.matz@6wind.com>
show more ...
|
|
Revision tags: v21.05-rc2, v21.05-rc1 |
|
| #
99a2dd95 |
| 20-Apr-2021 |
Bruce Richardson <bruce.richardson@intel.com> |
lib: remove librte_ prefix from directory names
There is no reason for the DPDK libraries to all have 'librte_' prefix on the directory names. This prefix makes the directory names longer and also m
lib: remove librte_ prefix from directory names
There is no reason for the DPDK libraries to all have 'librte_' prefix on the directory names. This prefix makes the directory names longer and also makes it awkward to add features referring to individual libraries in the build - should the lib names be specified with or without the prefix. Therefore, we can just remove the library prefix and use the library's unique name as the directory name, i.e. 'eal' rather than 'librte_eal'
Signed-off-by: Bruce Richardson <bruce.richardson@intel.com>
show more ...
|