From: Denis Kenzior <denkenz@gmail.com>
To: iwd@lists.01.org
Subject: Re: [PATCH 1/7] ip-pool: Track IPv4 addresses in use
Date: Wed, 26 May 2021 14:43:34 -0500 [thread overview]
Message-ID: <18de2797-b3fd-fd9f-7843-e34faf382278@gmail.com> (raw)
In-Reply-To: <20210525125508.2695708-1-andrew.zaborowski@intel.com>
[-- Attachment #1: Type: text/plain, Size: 2436 bytes --]
Hi Andrew,
On 5/25/21 7:55 AM, Andrew Zaborowski wrote:
> Add the ip-pool submodule that tracks IPv4 addresses in use on the
> system for use when selecting the address for a new AP.
> ---
> Makefile.am | 1 +
> src/ip-pool.c | 160 ++++++++++++++++++++++++++++++++++++++++++++++++++
> src/ip-pool.h | 32 ++++++++++
> 3 files changed, 193 insertions(+)
> create mode 100644 src/ip-pool.c
> create mode 100644 src/ip-pool.h
>
<snip>
So I'm completely fine with the implementation now...
> diff --git a/src/ip-pool.h b/src/ip-pool.h
> new file mode 100644
> index 00000000..6a220735
> --- /dev/null
> +++ b/src/ip-pool.h
> @@ -0,0 +1,32 @@
> +/*
> + *
> + * Wireless daemon for Linux
> + *
> + * Copyright (C) 2021 Intel Corporation. All rights reserved.
> + *
> + * This library is free software; you can redistribute it and/or
> + * modify it under the terms of the GNU Lesser General Public
> + * License as published by the Free Software Foundation; either
> + * version 2.1 of the License, or (at your option) any later version.
> + *
> + * This library is distributed in the hope that it will be useful,
> + * but WITHOUT ANY WARRANTY; without even the implied warranty of
> + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
> + * Lesser General Public License for more details.
> + *
> + * You should have received a copy of the GNU Lesser General Public
> + * License along with this library; if not, write to the Free Software
> + * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
> + *
> + */
> +
> +struct netdev;
Is there a strong reason for making this tighly-coupled to netdev? I mean in
theory ip-pool can be reused by netconfig for example, which also tracks IPv4/v6
addresses (for some unknown reason, but one thing at a time...)
> +
> +struct ip_pool_addr4_record {
> + uint32_t addr;
> + uint8_t prefix_len;
> + uint32_t ifindex;
> + bool secondary;
> +};
Is there a compelling reason to use a dedicated structure (leaking
implementation details) instead of returning a newly allocated l_rtnl_address
instead?
> +
> +const struct ip_pool_addr4_record *ip_pool_get_addr4(struct netdev *netdev);
>
This function is used exactly once, when the profile is loaded. So it isn't
exactly on the hot-path where raw access to the store is needed.
Regards,
-Denis
next prev parent reply other threads:[~2021-05-26 19:43 UTC|newest]
Thread overview: 18+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-05-25 12:55 [PATCH 1/7] ip-pool: Track IPv4 addresses in use Andrew Zaborowski
2021-05-25 12:55 ` [PATCH 2/7] ip-pool: Add subnet address selection logic Andrew Zaborowski
2021-05-26 19:56 ` Denis Kenzior
2021-05-26 20:06 ` Denis Kenzior
2021-05-26 21:50 ` Andrew Zaborowski
2021-05-25 12:55 ` [PATCH 3/7] ap: Refactor DHCP settings loading Andrew Zaborowski
2021-05-25 12:55 ` [PATCH 4/7] ap: Refactor global address pool loading Andrew Zaborowski
2021-05-25 12:55 ` [PATCH 5/7] ap: Send a specific error message on async AP start failure Andrew Zaborowski
2021-05-25 12:55 ` [PATCH 6/7] autotests: Update APRanges usage in testAP Andrew Zaborowski
2021-05-25 12:55 ` [PATCH 7/7] doc: Update AP settings in iwd.ap(5) and iwd.config(5) Andrew Zaborowski
2021-05-26 19:43 ` Denis Kenzior [this message]
2021-05-26 21:37 ` [PATCH 1/7] ip-pool: Track IPv4 addresses in use Andrew Zaborowski
2021-05-26 21:56 ` Denis Kenzior
2021-05-26 22:02 ` Denis Kenzior
2021-05-26 22:36 ` Andrew Zaborowski
2021-05-26 22:55 ` Denis Kenzior
2021-05-26 23:26 ` Andrew Zaborowski
2021-05-26 23:33 ` Denis Kenzior
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=18de2797-b3fd-fd9f-7843-e34faf382278@gmail.com \
--to=denkenz@gmail.com \
--cc=iwd@lists.01.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox