#
e1a06e39 |
| 18-Oct-2024 |
Robin Jarry <rjarry@redhat.com> |
lpm6: use IPv6 address structure and utils
Replace ad-hoc uint8_t[16] array types in the API of rte_lpm6 with rte_ipv6_addr structures. Replace duplicate functions and macros with common ones from r
lpm6: use IPv6 address structure and utils
Replace ad-hoc uint8_t[16] array types in the API of rte_lpm6 with rte_ipv6_addr structures. Replace duplicate functions and macros with common ones from rte_ip6.h. Update all code accordingly.
NB: the conversion between 16 bytes arrays and RTE_IPV6() literals was done automatically with the following python script and adjusted manually afterwards:
import argparse import re import struct
ip = re.compile( r""" \{ [\s\t\r\n]*([\da-fA-Fx]+)[\s\t\r\n]*, [\s\t\r\n]*([\da-fA-Fx]+)[\s\t\r\n]*, [\s\t\r\n]*([\da-fA-Fx]+)[\s\t\r\n]*, [\s\t\r\n]*([\da-fA-Fx]+)[\s\t\r\n]*, [\s\t\r\n]*([\da-fA-Fx]+)[\s\t\r\n]*, [\s\t\r\n]*([\da-fA-Fx]+)[\s\t\r\n]*, [\s\t\r\n]*([\da-fA-Fx]+)[\s\t\r\n]*, [\s\t\r\n]*([\da-fA-Fx]+)[\s\t\r\n]*, [\s\t\r\n]*([\da-fA-Fx]+)[\s\t\r\n]*, [\s\t\r\n]*([\da-fA-Fx]+)[\s\t\r\n]*, [\s\t\r\n]*([\da-fA-Fx]+)[\s\t\r\n]*, [\s\t\r\n]*([\da-fA-Fx]+)[\s\t\r\n]*, [\s\t\r\n]*([\da-fA-Fx]+)[\s\t\r\n]*, [\s\t\r\n]*([\da-fA-Fx]+)[\s\t\r\n]*, [\s\t\r\n]*([\da-fA-Fx]+)[\s\t\r\n]*, [\s\t\r\n]*([\da-fA-Fx]+)[\s\t\r\n]* \} """, re.VERBOSE, )
def repl(match): u8 = bytes(int(g, 0) for g in match.groups("0")) nums = [] for u16 in struct.unpack("!HHHHHHHH", u8): if u16: nums.append(f"0x{u16:04x}") else: nums.append("0") return f"RTE_IPV6({', '.join(nums)})"
p = argparse.ArgumentParser() p.add_argument("args", nargs="+") args = p.parse_args()
for a in args.args:
with open(a) as f: buf = f.read()
buf = ip.sub(repl, buf) with open(a, "w") as f: f.write(buf)
Signed-off-by: Robin Jarry <rjarry@redhat.com>
show more ...
|
#
7e06c0de |
| 15-Apr-2024 |
Tyler Retzlaff <roretzla@linux.microsoft.com> |
examples: move alignment attribute on types for MSVC
Move location of __rte_aligned(a) to new conventional location. The new placement between {struct,union} and the tag allows the desired alignment
examples: move alignment attribute on types for MSVC
Move location of __rte_aligned(a) to new conventional location. The new placement between {struct,union} and the tag allows the desired alignment to be imparted on the type regardless of the toolchain being used for both C and C++. Additionally, it avoids confusion by Doxygen when generating documentation.
Signed-off-by: Tyler Retzlaff <roretzla@linux.microsoft.com> Reviewed-by: Morten Brørup <mb@smartsharesystems.com> Acked-by: Morten Brørup <mb@smartsharesystems.com> Acked-by: Akhil Goyal <gakhil@marvell.com>
show more ...
|
#
6b9dabfd |
| 19-Dec-2023 |
Anoob Joseph <anoobj@marvell.com> |
examples/ipsec-secgw: fix width of variables
'rte_eth_rx_burst' returns uint16_t. The same value need to be passed to 'process_packets' functions which performs further processing. Having this funct
examples/ipsec-secgw: fix width of variables
'rte_eth_rx_burst' returns uint16_t. The same value need to be passed to 'process_packets' functions which performs further processing. Having this function use 'uint8_t' can result in issues when MAX_PKT_BURST is larger.
The route functions (route4_pkts & route6_pkts) take uint8_t as the argument. The caller can pass larger values as the field that is passed is of type uint32_t. And the function can work with uint32_t as it loops through the packets and sends it out. Using uint8_t can result in silent packet drops.
Fixes: 4fbfa6c7c921 ("examples/ipsec-secgw: update eth header during route lookup") Cc: stable@dpdk.org
Signed-off-by: Anoob Joseph <anoobj@marvell.com> Acked-by: Konstantin Ananyev <konstantin.ananyev@huawei.com> Acked-by: Akhil Goyal <gakhil@marvell.com>
show more ...
|
#
79bdb787 |
| 20-Sep-2023 |
Akhil Goyal <gakhil@marvell.com> |
security: hide security context
rte_security_ctx is used by all security APIs to identify which device security_op it need to call and hence it should be opaque to the application. Hence, it is now
security: hide security context
rte_security_ctx is used by all security APIs to identify which device security_op it need to call and hence it should be opaque to the application. Hence, it is now moved to internal header file and all APIs will now take an opaque pointer for it. The fast path inline APIs like set metadata need to get flags from security_ctx. The flags are now retrieved using inline APIs which use macros to get the offset of flags in security_ctx.
Signed-off-by: Akhil Goyal <gakhil@marvell.com> Acked-by: Ciara Power <ciara.power@intel.com> Acked-by: Hemant Agrawal <hemant.agrawal@nxp.com>
show more ...
|
#
aabf7ec4 |
| 05-Jun-2023 |
Nithin Dabilpuram <ndabilpuram@marvell.com> |
examples/ipsec-secgw: avoid error logs in fast path
Avoid printing errors due to bad packets in fast path as it effects performance. Make them RTE_LOG_DP() instead. Also print the actual ptype that
examples/ipsec-secgw: avoid error logs in fast path
Avoid printing errors due to bad packets in fast path as it effects performance. Make them RTE_LOG_DP() instead. Also print the actual ptype that is used to classify the pkt.
Signed-off-by: Nithin Dabilpuram <ndabilpuram@marvell.com> Acked-by: Akhil Goyal <gakhil@marvell.com>
show more ...
|
#
d8d51d4f |
| 27-Oct-2022 |
Rahul Bhansali <rbhansali@marvell.com> |
examples/ipsec-secgw: support per SA HW reassembly
This add the support of hardware reassembly per SA basis. In SA rule, new parameter reassembly_en is added to enable HW reassembly per SA. For exam
examples/ipsec-secgw: support per SA HW reassembly
This add the support of hardware reassembly per SA basis. In SA rule, new parameter reassembly_en is added to enable HW reassembly per SA. For example: sa in <idx> aead_algo <algo> aead_key <key> mode ipv4-tunnel src <ip> dst <ip> type inline-protocol-offload port_id <id> reassembly_en
Stats counter frag_dropped will represent the number of fragment drop in case of reassembly failures.
Signed-off-by: Rahul Bhansali <rbhansali@marvell.com> Acked-by: Akhil Goyal <gakhil@marvell.com>
show more ...
|
#
68d25915 |
| 12-Aug-2022 |
Srujana Challa <schalla@marvell.com> |
security: remove user data get API
The API rte_security_get_userdata() was being unused by most of the drivers and it was retrieving userdata from mbuf dynamic field. Hence, the API was removed and
security: remove user data get API
The API rte_security_get_userdata() was being unused by most of the drivers and it was retrieving userdata from mbuf dynamic field. Hence, the API was removed and the application can directly get the userdata from dynamic field. This helps in removing extra checks in datapath.
Signed-off-by: Srujana Challa <schalla@marvell.com> Acked-by: Akhil Goyal <gakhil@marvell.com>
show more ...
|
#
dae3a7af |
| 24-Aug-2022 |
Amit Prakash Shukla <amitprakashs@marvell.com> |
examples/ipsec-secgw: fix build with GCC 12
Typecasting uint32_t array to uint16_t and accessing it as max array size(at time of declaration of uint32_t array) causes gcc-12 to throw an error.
GCC
examples/ipsec-secgw: fix build with GCC 12
Typecasting uint32_t array to uint16_t and accessing it as max array size(at time of declaration of uint32_t array) causes gcc-12 to throw an error.
GCC 12 raises the following warning:
In function 'send_multi_pkts', inlined from 'route6_pkts_neon' at ../examples/ipsec-secgw/ipsec_lpm_neon.h:170:2, inlined from 'ipsec_poll_mode_wrkr_inl_pr' at ../examples/ipsec-secgw/ipsec_worker.c:1257:4: ../examples/ipsec-secgw/ipsec_neon.h:261:21: error: 'dst_port' may be used uninitialized [-Werror=maybe-uninitialized] 261 | dlp = dst_port[i - 1]; | ~~~~^~~~~~~~~~~~~~~~~ In file included from ../examples/ipsec-secgw/ipsec_worker.c:16: ../examples/ipsec-secgw/ipsec_worker.c: In function 'ipsec_poll_mode_wrkr_inl_pr': ../examples/ipsec-secgw/ipsec_lpm_neon.h:118:17: note: 'dst_port' declared here 118 | int32_t dst_port[MAX_PKT_BURST]; | ^~~~~~~~
Fixes: 6eb3ba03995c ("examples/ipsec-secgw: support poll mode NEON LPM lookup") Fixes: dcbf9ad5fdf4 ("examples/ipsec-secgw: move fast path helper functions") Cc: stable@dpdk.org
Signed-off-by: Amit Prakash Shukla <amitprakashs@marvell.com> Acked-by: Akhil Goyal <gakhil@marvell.com>
show more ...
|
#
0d76e22d |
| 29-Apr-2022 |
Nithin Dabilpuram <ndabilpuram@marvell.com> |
examples/ipsec-secgw: add poll mode worker for inline proto
Add separate worker thread when all SA's are of type inline protocol offload and librte_ipsec is enabled in order to make it more optimal
examples/ipsec-secgw: add poll mode worker for inline proto
Add separate worker thread when all SA's are of type inline protocol offload and librte_ipsec is enabled in order to make it more optimal for that case. Current default worker supports all kinds of SA leading to doing lot of per-packet checks and branching based on SA type which can be of 5 types of SA's.
Also make a provision for choosing different poll mode workers for different combinations of SA types with default being existing poll mode worker that supports all kinds of SA's.
Signed-off-by: Nithin Dabilpuram <ndabilpuram@marvell.com> Acked-by: Akhil Goyal <gakhil@marvell.com>
show more ...
|
#
4fbfa6c7 |
| 29-Apr-2022 |
Nithin Dabilpuram <ndabilpuram@marvell.com> |
examples/ipsec-secgw: update eth header during route lookup
Update ethernet header during route lookup instead of doing way later while performing Tx burst. Advantages to doing is at route lookup is
examples/ipsec-secgw: update eth header during route lookup
Update ethernet header during route lookup instead of doing way later while performing Tx burst. Advantages to doing is at route lookup is that no additional IP version checks based on packet data are needed and packet data is already in cache as route lookup is already consuming that data.
This is also useful for inline protocol offload cases of v4inv6 or v6inv4 outbound tunnel operations as packet data will not have any info about what is the tunnel protocol.
Signed-off-by: Nithin Dabilpuram <ndabilpuram@marvell.com> Acked-by: Akhil Goyal <gakhil@marvell.com>
show more ...
|
#
c7e6d808 |
| 29-Apr-2022 |
Nithin Dabilpuram <ndabilpuram@marvell.com> |
examples/ipsec-secgw: get security context from lcore conf
Store security context pointer in lcore Rx queue config and get it from there in fast path for better performance. Currently rte_eth_dev_ge
examples/ipsec-secgw: get security context from lcore conf
Store security context pointer in lcore Rx queue config and get it from there in fast path for better performance. Currently rte_eth_dev_get_sec_ctx() which is meant to be control path API is called per packet basis. For every call to that API, ethdev port status is checked.
Signed-off-by: Nithin Dabilpuram <ndabilpuram@marvell.com> Acked-by: Akhil Goyal <gakhil@marvell.com>
show more ...
|
#
d04bb1c5 |
| 29-Apr-2022 |
Nithin Dabilpuram <ndabilpuram@marvell.com> |
examples/ipsec-secgw: use HW parsed packet type in poll mode
Use HW parsed packet type when ethdev supports necessary protocols. If packet type is not supported, then register ethdev callbacks for p
examples/ipsec-secgw: use HW parsed packet type in poll mode
Use HW parsed packet type when ethdev supports necessary protocols. If packet type is not supported, then register ethdev callbacks for parse packet in SW. This is better for performance as it effects fast path.
Signed-off-by: Nithin Dabilpuram <ndabilpuram@marvell.com> Acked-by: Akhil Goyal <gakhil@marvell.com>
show more ...
|
#
dcbf9ad5 |
| 29-Apr-2022 |
Nithin Dabilpuram <ndabilpuram@marvell.com> |
examples/ipsec-secgw: move fast path helper functions
Move fast path helper functions to header file for easy access.
Signed-off-by: Nithin Dabilpuram <ndabilpuram@marvell.com> Acked-by: Akhil Goya
examples/ipsec-secgw: move fast path helper functions
Move fast path helper functions to header file for easy access.
Signed-off-by: Nithin Dabilpuram <ndabilpuram@marvell.com> Acked-by: Akhil Goyal <gakhil@marvell.com>
show more ...
|
#
9ad50c29 |
| 27-Feb-2020 |
Lukasz Bartosik <lbartosik@marvell.com> |
examples/ipsec-secgw: add app mode worker
Add application inbound/outbound worker thread and IPsec application processing code for event mode.
Example ipsec-secgw command in app mode: ipsec-secgw -
examples/ipsec-secgw: add app mode worker
Add application inbound/outbound worker thread and IPsec application processing code for event mode.
Example ipsec-secgw command in app mode: ipsec-secgw -w 0002:02:00.0,ipsec_in_max_spi=128 -w 0002:03:00.0,ipsec_in_max_spi=128 -w 0002:0e:00.0 -w 0002:10:00.1 --log-level=8 -c 0x1 -- -P -p 0x3 -u 0x1 -f aes-gcm.cfg --transfer-mode event --event-schedule-type parallel
Signed-off-by: Anoob Joseph <anoobj@marvell.com> Signed-off-by: Ankur Dwivedi <adwivedi@marvell.com> Signed-off-by: Lukasz Bartosik <lbartosik@marvell.com> Acked-by: Konstantin Ananyev <konstantin.ananyev@intel.com> Acked-by: Akhil Goyal <akhil.goyal@nxp.com>
show more ...
|