linux-wpan.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Alan Cox <gnomes@lxorguk.ukuu.org.uk>
To: "Andreas Färber" <afaerber@suse.de>
Cc: "Jian-Hong Pan" <starnight@g.ncu.edu.tw>,
	netdev@vger.kernel.org, linux-arm-kernel@lists.infradead.org,
	linux-kernel@vger.kernel.org, "Jiri Pirko" <jiri@resnulli.us>,
	"Marcel Holtmann" <marcel@holtmann.org>,
	"David S. Miller" <davem@davemloft.net>,
	"Matthias Brugger" <mbrugger@suse.com>,
	"Janus Piwek" <jpiwek@arroweurope.com>,
	"Michael Röder" <michael.roeder@avnet.eu>,
	"Dollar Chen" <dollar.chen@wtmec.com>,
	"Ken Yu" <ken.yu@rakwireless.com>,
	"Konstantin Böhm" <konstantin.boehm@ancud.de>,
	"Jan Jongboom" <jan.jongboom@arm.com>,
	"Jon Ortego" <Jon.Ortego@imst.de>,
	"contact@snootlab.com" <contact@snootlab.com>,
	"Ben Whitten" <ben.whitten@lairdtech.com>,
	"Brian Ray" <brian.ray@link-labs.com>,
	lora@globalsat.com.tw, "Alexander Graf" <agraf@suse.de>,
	"Michal Kubeček" <mkubecek@suse.cz>,
	"Rob Herring" <robh@kernel.org>,
	devicetree@vger.kernel.org, "Steve deRosier" <derosier@gmail.com>,
	"Mark Brown" <broonie@kernel.org>,
	linux-spi@vger.kernel.org,
	"Pieter ROBYNS" <pieter.robyns@uhasselt.be>,
	"Hasnain Virk" <Hasnain.Virk@arm.com>,
	"linux-wpan - ML" <linux-wpan@vger.kernel.org>,
	"Stefan Schmidt" <stefan@datenfreihafen.org>,
	"Daniele Comel" <dcomel@mipot.com>,
	shess@hessware.de, "Xue Liu" <liuxuenetmail@gmail.com>
Subject: Re: [RFC net-next 00/15] net: A socket API for LoRa
Date: Mon, 13 Aug 2018 13:36:00 +0100	[thread overview]
Message-ID: <20180813133600.180abc03@alans-desktop> (raw)
In-Reply-To: <11276f7d-0175-05e9-a9bd-c72868067081@suse.de>

> The simple answer is that, inspired by CAN, it uses an ifindex to select
> the interface the user asked to use. That then also answers Alan's next
> question: This ifindex determines which interface it goes out to.
> 
> sockaddr_lora was in patch 02/15, latest code here:
> https://git.kernel.org/pub/scm/linux/kernel/git/afaerber/linux-lora.git/tree/include/uapi/linux/lora.h?h=lora-next

And any loopback just becomes an ifindex, likewise any virtual lorawan
device (eg when testing in a cloud or simulating radio properties).

> I still think the user will need to explicitly say which interface they
> want to bind their socket to. AFAIU the device EUI is more comparable to

It does make it very hard for any vaguely complex environment because if
for example you have two interfaces enumerated via USB they will appear
in random order each boot.

CANbus is a bit of a mess in this sense but it's so statically configured
and embedded into industrial devices it's less of a problem.

I just wonder if the name would be a better binding (so you can sort the
order out), or a local physical identifier of some kind so that your
enumeration is consistent.

> Loopback mode would require a separate virtual device driver such as
> fakelr or vlora.

And a tunnel device, which is easy enough if you've got tap support or
similar.

Alan

  reply	other threads:[~2018-08-13 15:19 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <20180701110804.32415-1-afaerber@suse.de>
     [not found] ` <CAC=mGzgUCopz2xTOA0R-WD8a1DOaOOUn=YpfdMiJ33y3hnh6kg@mail.gmail.com>
2018-08-05  0:11   ` [RFC net-next 00/15] net: A socket API for LoRa Andreas Färber
2018-08-08 20:36     ` Alan Cox
2018-08-08 22:42       ` Andreas Färber
2018-08-09 11:59         ` Alan Cox
2018-08-09 15:02           ` Jian-Hong Pan
2018-08-09 15:21             ` Alexander Aring
2018-08-10 15:57             ` Alan Cox
2018-08-11 18:30               ` Stefan Schmidt
2018-08-12 16:49                 ` Andreas Färber
2018-08-12 16:37               ` Jian-Hong Pan
2018-08-12 17:59                 ` Andreas Färber
2018-08-13 12:36                   ` Alan Cox [this message]
2018-08-09 15:12           ` Alexander Aring
2018-08-09  0:50     ` Andreas Färber
     [not found] ` <BY1PR02MB11147C7443AB9623D6B65798E75A0@BY1PR02MB1114.namprd02.prod.outlook.com>
     [not found]   ` <e08cdcfb-207f-bd73-2afd-f775810b72b7@suse.de>
     [not found]     ` <BY1PR02MB11143134B9ABAC9C9929A9C4E7530@BY1PR02MB1114.namprd02.prod.outlook.com>
2018-08-05 13:49       ` Andreas Färber

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=20180813133600.180abc03@alans-desktop \
    --to=gnomes@lxorguk.ukuu.org.uk \
    --cc=Hasnain.Virk@arm.com \
    --cc=Jon.Ortego@imst.de \
    --cc=afaerber@suse.de \
    --cc=agraf@suse.de \
    --cc=ben.whitten@lairdtech.com \
    --cc=brian.ray@link-labs.com \
    --cc=broonie@kernel.org \
    --cc=contact@snootlab.com \
    --cc=davem@davemloft.net \
    --cc=dcomel@mipot.com \
    --cc=derosier@gmail.com \
    --cc=devicetree@vger.kernel.org \
    --cc=dollar.chen@wtmec.com \
    --cc=jan.jongboom@arm.com \
    --cc=jiri@resnulli.us \
    --cc=jpiwek@arroweurope.com \
    --cc=ken.yu@rakwireless.com \
    --cc=konstantin.boehm@ancud.de \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-spi@vger.kernel.org \
    --cc=linux-wpan@vger.kernel.org \
    --cc=liuxuenetmail@gmail.com \
    --cc=lora@globalsat.com.tw \
    --cc=marcel@holtmann.org \
    --cc=mbrugger@suse.com \
    --cc=michael.roeder@avnet.eu \
    --cc=mkubecek@suse.cz \
    --cc=netdev@vger.kernel.org \
    --cc=pieter.robyns@uhasselt.be \
    --cc=robh@kernel.org \
    --cc=shess@hessware.de \
    --cc=starnight@g.ncu.edu.tw \
    --cc=stefan@datenfreihafen.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;
as well as URLs for NNTP newsgroup(s).