From: Courtney Cavin <courtney.cavin-/MT0OVThwyLZJqsBc5GL+g@public.gmane.org>
To: David Miller <davem-fT/PcQaiUtIeIZ0/mPfg9Q@public.gmane.org>
Cc: "Andersson,
Bj?rn" <Bjorn.Andersson-/MT0OVThwyLZJqsBc5GL+g@public.gmane.org>,
"linux-kernel-u79uwXL29TY76Z2rM5mHXA@public.gmane.org"
<linux-kernel-u79uwXL29TY76Z2rM5mHXA@public.gmane.org>,
"linux-api-u79uwXL29TY76Z2rM5mHXA@public.gmane.org"
<linux-api-u79uwXL29TY76Z2rM5mHXA@public.gmane.org>,
"netdev-u79uwXL29TY76Z2rM5mHXA@public.gmane.org"
<netdev-u79uwXL29TY76Z2rM5mHXA@public.gmane.org>,
"srinivas.kandagatla-QSEj5FYQhm4dnm+yROfE0A@public.gmane.org"
<srinivas.kandagatla-QSEj5FYQhm4dnm+yROfE0A@public.gmane.org>,
"linux-arm-msm-u79uwXL29TY76Z2rM5mHXA@public.gmane.org"
<linux-arm-msm-u79uwXL29TY76Z2rM5mHXA@public.gmane.org>,
"linux-arm-kernel-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r@public.gmane.org"
<linux-arm-kernel-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r@public.gmane.org>
Subject: Re: [PATCH] net: add Qualcomm IPC router
Date: Wed, 16 Dec 2015 16:01:41 -0800 [thread overview]
Message-ID: <20151217000141.GG28026@sonymobile.com> (raw)
In-Reply-To: <20151215.160114.1178824607335349574.davem-fT/PcQaiUtIeIZ0/mPfg9Q@public.gmane.org>
On Tue, Dec 15, 2015 at 10:01:14PM +0100, David Miller wrote:
> From: Bjorn Andersson <bjorn.andersson-/MT0OVThwyLZJqsBc5GL+g@public.gmane.org>
> Date: Fri, 11 Dec 2015 12:41:59 -0800
>
> > +static unsigned int qrtr_local_nid = 1;
> > +module_param_named(node_id, qrtr_local_nid, uint, S_IRUGO);
> > +MODULE_PARM_DESC(idVendor, "Local Node Identifier");
>
> Module parameters suck.
>
> Allow the user to choose this dynamically. You have roughtly two choices.
>
> 1) Subvert the 'protocol' field passed to ->create() and use that, it is
> being ignored otherwise.
>
> 2) Put it into the socket address for bind().
So each socket can have its own node id? That doesn't seem right.
The way these node ids are assigned is by a system designer (in this
case Qualcomm). The ARM, Linux CPU is always node 1, the audio DSP is
always node 5, etc. Anyone with the knowhow could reassign these
numbers, but there's no reason to have them be dynamic during runtime.
Additionally, allowing dynamic assignment would require code to prevent
id duplication for known remote nodes, as well as to deal with cases in
which remote node discovery happens after local sockets have acquired
that node's id.
Maybe the first socket created needs CAP_NET_ADMIN, and uses the
'protocol' field to set the node id? Ugh. Gross.
We could hardcode the value in kconfig, but that seems like a worse
solution than a module parameter.
I'm open to further suggestions.
-Courtney
next prev parent reply other threads:[~2015-12-17 0:01 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-12-11 20:41 [PATCH] net: add Qualcomm IPC router Bjorn Andersson
2015-12-15 21:01 ` David Miller
[not found] ` <20151215.160114.1178824607335349574.davem-fT/PcQaiUtIeIZ0/mPfg9Q@public.gmane.org>
2015-12-15 21:13 ` Dan Williams
[not found] ` <1450214005.4464.9.camel-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org>
2015-12-15 21:14 ` Dan Williams
2015-12-17 0:01 ` Courtney Cavin [this message]
[not found] ` <20151217000141.GG28026-/MT0OVThwyLZJqsBc5GL+g@public.gmane.org>
2015-12-17 0:16 ` David Miller
2015-12-16 23:28 ` Courtney Cavin
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=20151217000141.GG28026@sonymobile.com \
--to=courtney.cavin-/mt0ovthwylzjqsbc5gl+g@public.gmane.org \
--cc=Bjorn.Andersson-/MT0OVThwyLZJqsBc5GL+g@public.gmane.org \
--cc=davem-fT/PcQaiUtIeIZ0/mPfg9Q@public.gmane.org \
--cc=linux-api-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
--cc=linux-arm-kernel-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r@public.gmane.org \
--cc=linux-arm-msm-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
--cc=linux-kernel-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
--cc=netdev-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
--cc=srinivas.kandagatla-QSEj5FYQhm4dnm+yROfE0A@public.gmane.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).