All of lore.kernel.org
 help / color / mirror / Atom feed
From: Denis Kenzior <denkenz@gmail.com>
To: iwd@lists.01.org
Subject: Re: [PATCH 1/2] ap: Move AP parameters to a struct
Date: Thu, 27 Aug 2020 12:26:30 -0500	[thread overview]
Message-ID: <33efefff-422e-eae1-5584-9d2653fe5e06@gmail.com> (raw)
In-Reply-To: <CAOq732LBD_zppOtfu6iqG06+QcTQfpO8gTJoT-wSe0LaLkaebw@mail.gmail.com>

[-- Attachment #1: Type: text/plain, Size: 1220 bytes --]

Hi Andrew,

>> I do wonder why you decided to make authorized_macs into a double-level array
>> instead of just a flat one...  You can always realloc if you need to grow it..
> 
> Right, I thought it's just more natural when you can access n'th
> element with array[n], or you can iterate like over a list like I did
> here.
> And you don't need to make assumptions about the length of the array.

That just seems so wasteful though?  I mean each pointer is 8 bytes on 64-bit, 
more than you pay for the mac address itself.  Plus god knows how much you pay 
in malloc overhead.  No point being wasteful unnecessarily.

>>
>> I think eventually we probably want to make this a proper API.  like
>> ap_config_new, ap_config_set_ssid, ap_config_set_passphrase, etc.
> 
> Do you mean eventually, or now?  I personally would prefer l_settings
> over that, once you add accessors it loses the benefit of a nice
> struct that can be read and written easily.
> 
But this can be defined inside ap.c.  So opaque only to clients of ap.c.  Do you 
need to access the struct elsewhere?  If so, then the whole blurb in the 
documentation about ap_start taking ownership isn't really true...

Regards,
-Denis

  reply	other threads:[~2020-08-27 17:26 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-08-26  0:18 [PATCH 1/2] ap: Move AP parameters to a struct Andrew Zaborowski
2020-08-26  0:18 ` [PATCH 2/2] ap: Add an optional client count limit parameter Andrew Zaborowski
2020-08-27 17:14   ` Denis Kenzior
2020-08-27 17:02 ` [PATCH 1/2] ap: Move AP parameters to a struct Denis Kenzior
2020-08-27 17:24   ` Andrew Zaborowski
2020-08-27 17:26     ` Denis Kenzior [this message]
2020-08-27 18:00       ` Andrew Zaborowski
2020-08-27 18:04         ` 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=33efefff-422e-eae1-5584-9d2653fe5e06@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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.