On 2/6/26 10:54 AM, Ales Musil wrote:
> Add helpers for parsing masked MAC in format of MAC/MAC and
> MAC/prefix. In additions to utils that convert MAC into prefix
> len and in reverse, creating MAC mask from prefix len. This
> will be used for the extended port_security parsing.
> 
> Acked-by: Dumitru Ceara <[email protected]>
> Acked-by: Lorenzo Bianconi <[email protected]>
> Signed-off-by: Ales Musil <[email protected]>
> ---
> v4: Rebase on top of latest main.
> v5: Rebase on top of latest main.
>     Add Dumitru's ack.
>     Add Lorenzo's ack.
> ---
>  lib/ovn-util.c   | 49 ++++++++++++++++++++++++++++++++++++++++++++++++
>  lib/ovn-util.h   | 18 ++++++++++++++++++
>  tests/ovn.at     | 49 ++++++++++++++++++++++++++++++++++++++++++++++++
>  tests/test-ovn.c | 22 ++++++++++++++++++++++
>  4 files changed, 138 insertions(+)
> 
> diff --git a/lib/ovn-util.c b/lib/ovn-util.c
> index 1e754ac1c..090ad1f48 100644
> --- a/lib/ovn-util.c
> +++ b/lib/ovn-util.c
> @@ -1762,3 +1762,52 @@ shuffled_range(size_t n)
>  
>      return indices;
>  }
> +
> +/* Parses string 's', which must be a MAC address with an optional mask or
> + * mask prefix length.  Stores the MAC address into '*ea' and the mask prefix
> + * length into '*len' (if 's' does not contain a mask, all-one-bits
> + * is assumed).
> + *
> + * Returns true if successful, otherwise false and the '*ea' is zeroed out in
> + * case. */
> +bool
> +eth_addr_parse_masked(const char *s, struct eth_addr *ea, unsigned int *plen)

Nit: the comment talks about '*len' but the argument is '*plen'.

With this fixed up, my ack stands:

Acked-by: Dumitru Ceara <[email protected]>

Thanks,
Dumitru

_______________________________________________
dev mailing list
[email protected]
https://mail.openvswitch.org/mailman/listinfo/ovs-dev

Reply via email to