| 71f8bd4e | 16-Jun-2021 |
Stephen Hemminger <[email protected]> |
net/tap: define offload capabilities constants
Since the offload values are always the same, these can just be data instead of code.
Signed-off-by: Stephen Hemminger <[email protected]> Ac
net/tap: define offload capabilities constants
Since the offload values are always the same, these can just be data instead of code.
Signed-off-by: Stephen Hemminger <[email protected]> Acked-by: Keith Wiles <[email protected]>
show more ...
|
| 45a08ef5 | 30-Jun-2021 |
Olivier Matz <[email protected]> |
net: introduce functions to verify L4 checksums
Since commit d5df2ae0428a ("net: fix unneeded replacement of TCP checksum 0"), the functions rte_ipv4_udptcp_cksum() and rte_ipv6_udptcp_cksum() can r
net: introduce functions to verify L4 checksums
Since commit d5df2ae0428a ("net: fix unneeded replacement of TCP checksum 0"), the functions rte_ipv4_udptcp_cksum() and rte_ipv6_udptcp_cksum() can return either 0x0000 or 0xffff when used to verify a packet containing a valid checksum.
Since these functions should be used to calculate the checksum to set in a packet, introduce 2 new helpers for checksum verification. They return 0 if the checksum is valid in the packet.
Use this new helper in net/tap driver.
Signed-off-by: Olivier Matz <[email protected]> Acked-by: Morten Brørup <[email protected]> Reviewed-by: Andrew Rybchenko <[email protected]>
show more ...
|
| 375474b4 | 30-Jun-2021 |
Olivier Matz <[email protected]> |
net/tap: fix Rx checksum flags on TCP packets
Since commit d5df2ae0428a ("net: fix unneeded replacement of TCP checksum 0"), the functions rte_ipv4_udptcp_cksum() or rte_ipv6_udptcp_cksum() can retu
net/tap: fix Rx checksum flags on TCP packets
Since commit d5df2ae0428a ("net: fix unneeded replacement of TCP checksum 0"), the functions rte_ipv4_udptcp_cksum() or rte_ipv6_udptcp_cksum() can return either 0x0000 or 0xffff when used to verify a packet containing a valid checksum.
This new behavior broke the checksum verification in tap driver for TCP packets: these packets are marked with PKT_RX_L4_CKSUM_BAD.
Fix this by checking the 2 possible values. A next commit will introduce a checksum verification helper to simplify this a bit.
Fixes: d5df2ae0428a ("net: fix unneeded replacement of TCP checksum 0") Cc: [email protected]
Signed-off-by: Olivier Matz <[email protected]> Acked-by: Andrew Rybchenko <[email protected]>
show more ...
|
| a625ab89 | 11-May-2021 |
Ferruh Yigit <[email protected]> |
net/tap: fix build with GCC 11
Reproduced with '--buildtype=debugoptimized' config, compiler version: gcc (GCC) 12.0.0 20210509 (experimental)
There are multiple build errors, like: In file include
net/tap: fix build with GCC 11
Reproduced with '--buildtype=debugoptimized' config, compiler version: gcc (GCC) 12.0.0 20210509 (experimental)
There are multiple build errors, like: In file included from ../drivers/net/tap/tap_flow.c:13: In function ‘rte_jhash_2hashes’, inlined from ‘rte_jhash’ at ../lib/hash/rte_jhash.h:284:2, inlined from ‘tap_flow_set_handle’ at ../drivers/net/tap/tap_flow.c:1306:12, inlined from ‘rss_enable’ at ../drivers/net/tap/tap_flow.c:1909:3, inlined from ‘priv_flow_process’ at ../drivers/net/tap/tap_flow.c:1228:11: ../lib/hash/rte_jhash.h:238:9: warning: ‘flow’ may be used uninitialized [-Wmaybe-uninitialized] 238 | __rte_jhash_2hashes(key, length, pc, pb, 1); | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ../drivers/net/tap/tap_flow.c: In function ‘priv_flow_process’: ../lib/hash/rte_jhash.h:81:1: note: by argument 1 of type ‘const void *’ to ‘__rte_jhash_2hashes.constprop’ declared here 81 | __rte_jhash_2hashes(const void *key, uint32_t length, uint32_t *pc, | ^~~~~~~~~~~~~~~~~~~ ../drivers/net/tap/tap_flow.c:1028:1: note: ‘flow’ declared here 1028 | priv_flow_process(struct pmd_internals *pmd, | ^~~~~~~~~~~~~~~~~
Fix strict aliasing rule by using union.
Bugzilla ID: 690 Fixes: de96fe68ae95 ("net/tap: add basic flow API patterns and actions") Cc: [email protected]
Signed-off-by: Ferruh Yigit <[email protected]> Acked-by: Kevin Traynor <[email protected]>
show more ...
|