linux-wpan.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Alexander Aring <aring@mojatatu.com>
To: Stefan Schmidt <stefan@datenfreihafen.org>
Cc: "Clément Péron" <peron.clem@gmail.com>,
	"Romuald Cari" <romuald.cari@devialet.com>,
	linux-wpan@vger.kernel.org,
	"Alexander Aring" <alex.aring@gmail.com>,
	"Stefan Schmidt" <stefan@osg.samsung.com>,
	"David S . Miller" <davem@davemloft.net>,
	netdev@vger.kernel.org, linux-kernel@vger.kernel.org,
	"Clément Peron" <clement.peron@devialet.com>
Subject: Re: [PATCH] ieee802154: add rx LQI from userspace
Date: Mon, 9 Jul 2018 17:17:54 -0400	[thread overview]
Message-ID: <20180709211754.v2oqe3y77fvdd5qa@x220t> (raw)
In-Reply-To: <ac0ff951-627d-9694-741d-03f6bc4d6ddc@datenfreihafen.org>

On Mon, Jul 09, 2018 at 10:49:08AM +0200, Stefan Schmidt wrote:
> Hello Clement.
> 
> Finally coming to review the patch. Sorry for the delay.
....
> >  
> > +	if (ro->want_lqi) {
> > +		err = put_cmsg(msg, SOL_IEEE802154, WPAN_WANTLQI,
> > +			       sizeof(uint8_t), &(mac_cb(skb)->lqi));
> > +		if (err)
> > +			goto done;
> > +	}
> > +
> 
> I am wondering a bit about the LQI you get back here. Maybe Alex can
> also shed some lights on it. The LQI value stored here is always from
> the last frame send (to any peer)? Or is it the last frame send to this
> specific peer?
>

LQI is available only for per received frame [0], it's important to store
it always when address information are available for the received frame.
The peer you get from the socket layer so far I understood.

Storing means: maybe with some intelligent logic behind to calculate the
average... one LQI value alone don't say anything. With this patch you
can do such logic in user space as a LQI to peer database[1].

Otherwise we already talked about a similar handling as wireless does
with "iw ... station dump" to have such handling in kernel - out of
scope of this discussion.

Side notes:

[0] Ack frames has no address information but it refers to a transmitted
    frame with address information... so not always true. But ack
    handling is offloaded anyhow in the most cases.

[1] Getting complicated how to map a short/pan _and_ extended to _ONE_
    peer entry. -> MLME assoc()/IPv6 ndisc information are needed here.

- Alex

  reply	other threads:[~2018-07-09 21:18 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-06-07 14:08 [PATCH] ieee802154: add rx LQI from userspace Clément Péron
2018-07-02 13:28 ` Clément Péron
2018-07-02 13:58   ` Stefan Schmidt
2018-07-02 17:53   ` Alexander Aring
2018-07-09  8:49 ` Stefan Schmidt
2018-07-09 21:17   ` Alexander Aring [this message]
2018-07-10 15:13   ` Clément Péron
2018-07-13 15:43     ` Stefan Schmidt
2018-08-06  9:07 ` Stefan Schmidt

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=20180709211754.v2oqe3y77fvdd5qa@x220t \
    --to=aring@mojatatu.com \
    --cc=alex.aring@gmail.com \
    --cc=clement.peron@devialet.com \
    --cc=davem@davemloft.net \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-wpan@vger.kernel.org \
    --cc=netdev@vger.kernel.org \
    --cc=peron.clem@gmail.com \
    --cc=romuald.cari@devialet.com \
    --cc=stefan@datenfreihafen.org \
    --cc=stefan@osg.samsung.com \
    /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;
as well as URLs for NNTP newsgroup(s).