Received: by 2002:ac0:a5a7:0:0:0:0:0 with SMTP id m36-v6csp3074556imm; Mon, 13 Aug 2018 05:41:26 -0700 (PDT) X-Google-Smtp-Source: AA+uWPwWC9cdNLv1CSruqJFaxPwIbD5Se/oIfZ9Eu866LdAiS5X4EfOZfrh3cegk6BE1aMcTpOdI X-Received: by 2002:a17:902:7b83:: with SMTP id w3-v6mr16344743pll.192.1534164086559; Mon, 13 Aug 2018 05:41:26 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1534164086; cv=none; d=google.com; s=arc-20160816; b=oKMFPEa0r+dSV60DsQJXhUGcZgKc1TVMxzgBgNW1btHwhS+Q3cQZvSfpQrEGtbcnsE I5m40G6MD3++Ea+nLeHORn3d1WvneS+5BooJJmw+nKcMzyB3gfR3gNvbBBOpNVhOkPcg 75loTkibEm/Z4BgQtzOteptRQyaahKXD1VF1MShw0GnkxNeozUxFXzPeHjHkn3tvNTVr NirjpoWuLhM7aB1pOTabbyS8EM6TxphDvsNY9otMaKauPPgioYJ4MBH97elxRVnIenYx DYyrDgpgAso9fPhRamnbrolhPgwJ75vyUtTeW8JcJos0FDN/+/CYjM4GEAr1AgcWQWF1 N3MA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :organization:references:in-reply-to:message-id:subject:cc:to:from :date:arc-authentication-results; bh=JuD1IgOL0ckQtLQGGGQtLDeUHCcWrk4D6UQWCCak7tw=; b=oJNYzCVEbVQX/FXXx/JyZFLbkXUX0dmIs3cerqKT+ximZpXUFR5Ran7Ku+QXMwfpkD NKvJcxvqxsnLYGmgPsHVNpCUKsUE5nbRm95SmHY0ezkkK5GVefBojf1E9DwH9TIoHObe 493U0nqxX5XJ5jfoS4L8z+wI7j/YrwRbHxSpSoBp6a9BOqk1FkhMonrXqTglXzItuAho uOHcCd3rglcI1zJV75ajjyPO5pF5U6CCG4pdyxH5d3t/1Lol2lKWunjZPa6Swex40DJM wPh0Ik36Fqp7tfoCzP601HLcKSHWSuLEDpOItLo3gGwhE6fEzO0N2jCSCt3jBCUpKD8i DUcQ== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id c16-v6si18896189pfj.333.2018.08.13.05.41.11; Mon, 13 Aug 2018 05:41:26 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1729122AbeHMPTg (ORCPT + 99 others); Mon, 13 Aug 2018 11:19:36 -0400 Received: from www.llwyncelyn.cymru ([82.70.14.225]:52626 "EHLO fuzix.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728455AbeHMPTg (ORCPT ); Mon, 13 Aug 2018 11:19:36 -0400 Received: from alans-desktop (82-70-14-226.dsl.in-addr.zen.co.uk [82.70.14.226]) by fuzix.org (8.15.2/8.15.2) with ESMTP id w7DCa1iG010017; Mon, 13 Aug 2018 13:36:01 +0100 Date: Mon, 13 Aug 2018 13:36:00 +0100 From: Alan Cox To: Andreas =?UTF-8?B?RsOkcmJlcg==?= Cc: Jian-Hong Pan , netdev@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, Jiri Pirko , Marcel Holtmann , "David S. Miller" , Matthias Brugger , Janus Piwek , Michael =?UTF-8?B?UsO2ZGVy?= , Dollar Chen , Ken Yu , Konstantin =?UTF-8?B?QsO2aG0=?= , Jan Jongboom , Jon Ortego , "contact@snootlab.com" , Ben Whitten , Brian Ray , lora@globalsat.com.tw, Alexander Graf , Michal =?UTF-8?B?S3ViZcSNZWs=?= , Rob Herring , devicetree@vger.kernel.org, Steve deRosier , Mark Brown , linux-spi@vger.kernel.org, Pieter ROBYNS , Hasnain Virk , linux-wpan - ML , Stefan Schmidt , Daniele Comel , shess@hessware.de, Xue Liu Subject: Re: [RFC net-next 00/15] net: A socket API for LoRa Message-ID: <20180813133600.180abc03@alans-desktop> In-Reply-To: <11276f7d-0175-05e9-a9bd-c72868067081@suse.de> References: <20180701110804.32415-1-afaerber@suse.de> <92ee4016-1da9-826b-3674-b2d604a64848@suse.de> <20180808213640.10a1d76f@alans-desktop> <20180809125939.39ac2cc9@alans-desktop> <20180810165711.59bf26f7@alans-desktop> <11276f7d-0175-05e9-a9bd-c72868067081@suse.de> Organization: Intel Corporation X-Mailer: Claws Mail 3.16.0 (GTK+ 2.24.32; x86_64-redhat-linux-gnu) MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org > 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