| 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 ...
|
| 51a3c7a1 | 28-Sep-2023 |
Rakesh Kudurumalla <rkudurumalla@marvell.com> |
node: add IPv4 UDP
IPv4 UDP packets are given to application with specified UDP destination port given by user.
Signed-off-by: Rakesh Kudurumalla <rkudurumalla@marvell.com> Acked-by: Nithin Dabilpu
node: add IPv4 UDP
IPv4 UDP packets are given to application with specified UDP destination port given by user.
Signed-off-by: Rakesh Kudurumalla <rkudurumalla@marvell.com> Acked-by: Nithin Dabilpuram <ndabilpuram@marvell.com>
show more ...
|
| 16ac29cb | 31-May-2023 |
Amit Prakash Shukla <amitprakashs@marvell.com> |
lib: add IPv6 rewrite node
Similar to IPv4 rewrite node, patch adds IPv6 rewrite node.
Signed-off-by: Amit Prakash Shukla <amitprakashs@marvell.com> Acked-by: Nithin Dabilpuram <ndabilpuram@marvell
lib: add IPv6 rewrite node
Similar to IPv4 rewrite node, patch adds IPv6 rewrite node.
Signed-off-by: Amit Prakash Shukla <amitprakashs@marvell.com> Acked-by: Nithin Dabilpuram <ndabilpuram@marvell.com>
show more ...
|
| 20365d79 | 31-May-2023 |
Sunil Kumar Kori <skori@marvell.com> |
node: add IPv6 lookup node
Similar to IPv4 lookup node, patch adds IPv6 lookup node.
Signed-off-by: Sunil Kumar Kori <skori@marvell.com> Signed-off-by: Amit Prakash Shukla <amitprakashs@marvell.com
node: add IPv6 lookup node
Similar to IPv4 lookup node, patch adds IPv6 lookup node.
Signed-off-by: Sunil Kumar Kori <skori@marvell.com> Signed-off-by: Amit Prakash Shukla <amitprakashs@marvell.com> Acked-by: Nithin Dabilpuram <ndabilpuram@marvell.com>
show more ...
|