On 7/28/26 8:32 PM, Timothy Redaelli via dev wrote:
> Split network address types and parsing/formatting functions out of
> the monolithic packets.[ch] into a new netaddr.[ch] module:

Hi, Timothy.  Thanks for the update and sorry for delay.

This patch fails to build on FreeBSD as seen in CI due to missing
declaration on AF_INET[6] in the new netaddr module.

> 
>  - netaddr.h: Ethernet address constants, inline helpers, IPv4/IPv6
>    address parsing/formatting declarations, format macros (IP_FMT,
>    ETH_ADDR_FMT, etc.), and the ovs_16aligned_in6_addr type.
>  - netaddr.c: ~35 address functions moved from packets.c, including

is that an accurate number?

>    ip_parse(), ipv6_parse(), ipv6_string_mapped(), eth_addr_from_string(),
>    eth_addr_is_reserved(), ip_format_masked(), ipv6_format_addr(),
>    and all IPv6 address math (bitand, create_mask, count_cidr_bits, etc.).
> 
> packets.h now includes netaddr.h, so all existing consumers see no
> change.  packets.[ch] retains packet header structs, protocol
> constants, dp_packet manipulation, and tunnel-related functions.
> 
> This is a preparatory refactoring for the upcoming library split:
> netaddr.[ch] will move into the utilities library while packets.[ch]
> stays in the main libopenvswitch, cleanly resolving the logical
> isolation concern without inlining address functions into headers.
> 
> Signed-off-by: Timothy Redaelli <[email protected]>
> ---
>  lib/automake.mk |   2 +
>  lib/netaddr.c   | 667 ++++++++++++++++++++++++++++++++++++++++++++++++
>  lib/netaddr.h   | 418 ++++++++++++++++++++++++++++++
>  lib/packets.c   | 641 ----------------------------------------------
>  lib/packets.h   | 390 +---------------------------
>  5 files changed, 1088 insertions(+), 1030 deletions(-)
>  create mode 100644 lib/netaddr.c
>  create mode 100644 lib/netaddr.h

[...]

> @@ -1148,110 +893,6 @@ BUILD_ASSERT_DECL(MLD2_RECORD_LEN == sizeof(struct 
> mld2_record));
>  /* The IPv6 flow label is in the lower 20 bits of the first 32-bit word. */
>  #define IPV6_LABEL_MASK 0x000fffff
>  
> -/* Example:
> - *
> - * char *string = "1 ::1 2";
> - * char ipv6_s[IPV6_SCAN_LEN + 1];
> - * struct in6_addr ipv6;
> - *
> - * if (ovs_scan(string, "%d"IPV6_SCAN_FMT"%d", &a, ipv6_s, &b)
> - *     && inet_pton(AF_INET6, ipv6_s, &ipv6) == 1) {
> - *     ...
> - * }
> - */

Looks like this example got lost during the move.

> -#define IPV6_SCAN_FMT "%46[0123456789abcdefABCDEF:.]"
> -#define IPV6_SCAN_LEN 46
Best regards, Ilya Maximets.
_______________________________________________
dev mailing list
[email protected]
https://mail.openvswitch.org/mailman/listinfo/ovs-dev

Reply via email to