Linux IEEE 802.15.4 and 6LoWPAN development
 help / color / mirror / Atom feed
From: Alexander Aring <alex.aring@gmail.com>
To: linux-wpan@vger.kernel.org
Subject: Advantages and disadvantages of phy/interface set cmd
Date: Fri, 20 Mar 2015 22:42:46 +0100	[thread overview]
Message-ID: <20150320214244.GE3952@omega> (raw)

Hi,

I wrote in my previous mails that I will open a new thread to talk about
the advantages and disadvantages of the new set commands for
phy/interface.

1. What is the set phy/interface set command?

See [0], this was a try to introduce the command.

It simple handle all interface and phy setting into their own command.
The current behaviour is to call CMD_SET_CHANNEL. CMD_SET_CCA, etc...
for each phy attribute. With the SET command the setting is determined
if the attribute is set.

The same for interface settings which are MAC settings.


Advantages:

In userspace you setup the whole attrs table of netlink for nl802154 and
simple call only one command which is the SET command.

You can simple keep the old behaviour when you call the SET command and
set only ONE attribute. That should make no difference.

Disadvantages:

If you set more than one attribute and the setting failed between them,
then we need to run some "rollback" for the old values or we simple do
nothing. This is at the moment the at most some -EINVAL or -EOPNOTSUPP returns,
I think we can deal with it when we have more capability flags so a
userspace application can ask before setting if the phy supports that value.

We still need to run then a "rollback" for -EIO and others mistakes but this is
very unlikely. Other solution is to make _nothing_ here and the user
need to react to the error (But userspace application should prevent to
run into such error by getting capabilities).


My opinion:

We should change it because we can still keep the old behaviour and have
"more" easier access for all attributes. So maybe somebody knows more
advantages or disadvantages to contribute this decision.


- Alex

[0] http://www.spinics.net/lists/linux-wpan/msg01550.html

                 reply	other threads:[~2015-03-20 21:42 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

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=20150320214244.GE3952@omega \
    --to=alex.aring@gmail.com \
    --cc=linux-wpan@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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox