Advantages and disadvantages of phy/interface set cmd

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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
--
To unsubscribe from this list: send the line "unsubscribe linux-wpan" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html




[Index of Archives]     [Linux NFS]     [Linux NILFS]     [Linux USB Devel]     [Linux Audio Users]     [Photo]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux