From: Johannes Berg <johannes@sipsolutions.net>
To: Ben Greear <greearb@candelatech.com>
Cc: netdev@vger.kernel.org
Subject: Re: [PATCH 3/4] mac80211-hwsim: Pass rate-ctrl flags and tx-power to user-space
Date: Fri, 17 Apr 2015 13:23:28 +0200 [thread overview]
Message-ID: <1429269808.1885.2.camel@sipsolutions.net> (raw)
In-Reply-To: <552E909E.6010405@candelatech.com>
On Wed, 2015-04-15 at 09:23 -0700, Ben Greear wrote:
> On 04/14/2015 01:15 AM, Johannes Berg wrote:
> > On Fri, 2015-04-03 at 14:12 -0700, greearb@candelatech.com wrote:
> >
> >> +/* Auxilary info to allow user-space to better understand the rate */
> >> +struct hwsim_tx_rate2 {
> >> + u16 rc_flags; /* rate-ctrl flags (see mac80211_rate_control_flags) */
> >
> > I really don't like this - it ties internal API to userspace API. You
> > may argue that this is userspace that is for debug purposes only, but
> > I'm sure you'll also scratch your head very confused when I change the
> > rate control flags for any reason and your code breaks :)
>
> Is this a documentation only issue (at this point, while code matches)?
Well, technically this could be done.
> Then later, we can add translation to keep user-space API the same
> as needed?
We'll almost certainly forget that though, so better to have a
translation layer now.
OTOH though, perhaps we don't even want to advertise all these flags. We
might want to change the details of how these work, so I think it'd be
good to actually analyse them and see which ones really are needed. That
really applies more to the rx-status flags then here perhaps.
> And in that case, maybe I'll make it u32 to give room down the road?
That makes sense - netlink attributes are even 4-byte aligned so there's
no space saving with u16 either :)
johannes
next prev parent reply other threads:[~2015-04-17 11:23 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-04-03 21:12 [PATCH 1/4] mac80211-hwsim: notify user-space about channel change greearb
2015-04-03 21:12 ` [PATCH 2/4] mac80211-hwsim: remove dmesg spam about get-survey greearb
2015-04-14 8:14 ` Johannes Berg
2015-04-03 21:12 ` [PATCH 3/4] mac80211-hwsim: Pass rate-ctrl flags and tx-power to user-space greearb
2015-04-14 8:15 ` Johannes Berg
2015-04-15 16:23 ` Ben Greear
2015-04-17 11:23 ` Johannes Berg [this message]
2015-04-03 21:12 ` [PATCH 4/4] mac80211-hwsim: enable better rx-status when using netlink greearb
2015-04-14 8:17 ` Johannes Berg
2015-04-05 14:16 ` [PATCH 1/4] mac80211-hwsim: notify user-space about channel change Sergei Shtylyov
2015-04-14 8:14 ` Johannes Berg
-- strict thread matches above, loose matches on Subject: below --
2015-04-03 21:13 greearb
2015-04-03 21:13 ` [PATCH 3/4] mac80211-hwsim: Pass rate-ctrl flags and tx-power to user-space greearb
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=1429269808.1885.2.camel@sipsolutions.net \
--to=johannes@sipsolutions.net \
--cc=greearb@candelatech.com \
--cc=netdev@vger.kernel.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.