Linux IEEE 802.15.4 and 6LoWPAN development
 help / color / mirror / Atom feed
* Advantages and disadvantages of phy/interface set cmd
@ 2015-03-20 21:42 Alexander Aring
  0 siblings, 0 replies; only message in thread
From: Alexander Aring @ 2015-03-20 21:42 UTC (permalink / raw)
  To: linux-wpan

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

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2015-03-20 21:42 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-03-20 21:42 Advantages and disadvantages of phy/interface set cmd Alexander Aring

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox