Netdev List
 help / color / mirror / Atom feed
* Re: [RFC net-next 00/15] net: A socket API for LoRa
From: Jian-Hong Pan @ 2018-08-12 16:37 UTC (permalink / raw)
  To: Alan Cox
  Cc: Andreas Färber, netdev,
	<linux-arm-kernel@lists.infradead.org\,
	linux-kernel@vger.kernel.org>,, Jiri Pirko, Marcel Holtmann,
	David S. Miller, Matthias Brugger, Janus Piwek,
	Michael Röder, Dollar Chen, Ken Yu, Konstantin Böhm,
	Jan Jongboom, Jon Ortego, linux-kernel@vger.kernel.org>,,
	Ben Whitten
In-Reply-To: <20180810165711.59bf26f7@alans-desktop>

Alan Cox <gnomes@lxorguk.ukuu.org.uk> 於 2018年8月10日 週五 下午11:57寫道:
>
> > Except saving power, mitigating the wireless signal conflict on the
> > air is one of the reasons.
>
> If the device level is always receiving when not transmitting it has no
> effect on this. The act of listening does not harm other traffic.

My friend had tested practically:
If he changes the LoRa interface to RX mode after TX completes
immediately, he will receive the signals like reflection echo some
times.
That is interesting!

There is a paper "Exploring LoRa and LoRaWAN A suitable protocol for
IoT weather stations?" by Kristoffer Olsson & Sveinn Finnsson
http://publications.lib.chalmers.se/records/fulltext/252610/252610.pdf
In chapter 3.2 Chirp Spread Spectrum, it describes the reflection echo
phenomenon.
I think that is why LoRaWAN places the RX delay time which avoids
receiving the reflection noise.

> > The sleep/idle/stop mitigate the unconcerned RF signals or messages.
>
> At the physical level it's irrelevant. If we are receiving then we might
> hear more things we later discard. It's not running on a tiny
> microcontroller so the extra CPU cycles are not going to kill us.

According different power resource, LoRaWAN defines Class A, B and C.
Class A is the basic and both Class B and C devices must also
implement the feature of Class A.
If the end device has sufficient power available, it can also
implement the Class C: Continuously listening end-device.
Here are the descriptions in LoRaWAN spec. for Class C:
- The Class C end-device will listen with RX2 windows parameters as
often as possible.
- The end-device listens on RX2 when it is not either (a) sending or
(b) receiving on RX1, according to Class A definition.
- 1. It will open a short window on RX2 parameters between the end of
the uplink transmission and the beginning of the RX1 reception window.
(*)
  2. It will switch to RX2 reception parameters as soon as the RX1
reception window is closed; the RX2 reception window will remain open
until the end-device has to send another message.

According to the LoRaWAN Regional Parameters, the DataRate (including
spreading factor and bandwidth) and frequency channel of RX1 and RX2
windows may be different.(*)

So, yes!  Class C opens the RX windows almost all the time, except the TX time.
And uses different channel to avoid the reflection noise (*).

However, Class C must also implements Class A and C is more complex than A.
I think starting from the simpler one and adding more features and
complexity in the future will be a better practice.

> > > How do you plan to deal with routing if you've got multiple devices ?
> >
> > For LoRaWAN, it is a star topology.
>
> No the question was much more how you plan to deal with it in the OS. If
> for example I want to open a LORA connection to something, then there
> needs to be a proper process to figure out where the target is and how to
> get traffic to them.
>
> I guess it's best phrased as
>
> - What does a struct sockaddr_lora look like

According to LoRaWAN spec, the Data Message only has the device's
DevAddr (the device's address in 4 bytes) field related to "address".
The device just sends the uplink Data Message through the interface
and does not know the destination.  Then, a LoRaWAN gateway receives
the uplink Data Message and forwards to the designated network server.
So, end device does not care about the destination.  It only knows
there is a gateway will forward its message to some where.
Therefore, only the DevAddr as the source address will be meaningful
for uplink Data Message.

> - How does the kernel decide which interface it goes out of (if any), and
>   if it loops back

There is the MAC Header in the Data Message which is one byte.
Bits 5 to 7 indicate which kind of type the message is.
000: Join Request
001: Join Accept
010: Unconfirmed Data Up
011: Unconfirmed Data Down
100: Confirmed Data Up
101: Confirmed Data Down
110: RFU
111: Proprietary

So, end device only accepts the types of downlink and the matched
DevAddr (the device's address) in downlink Data Message for RX.

> remembering we might only be talking to a hub, or we might even be a
> virtualized LORA interface where we are pretending to be some kind of
> sensor and feeding it back.
>
> Long term yes I think Alexander is right the inevitable fate of all
> networks is to become a link layer in order to transmit IP frames 8)

Yeah, maybe.  It will be easier for life.
But I have not seen the formal standard for that yet or I missed it.
If the standard appears, we can try to implement it.

Jian-Hong Pan

^ permalink raw reply

* [PATCH net-next 13/13] net: sched: act_mirred method rename for grep-ability and consistency
From: Jamal Hadi Salim @ 2018-08-12 13:35 UTC (permalink / raw)
  To: davem; +Cc: xiyou.wangcong, jiri, netdev, kernel, Jamal Hadi Salim
In-Reply-To: <20180812133501.15278-1-jhs@emojatatu.com>

From: Jamal Hadi Salim <jhs@mojatatu.com>

Signed-off-by: Jamal Hadi Salim <jhs@mojatatu.com>
---
 net/sched/act_mirred.c | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/net/sched/act_mirred.c b/net/sched/act_mirred.c
index 327be257033d..8ec216001077 100644
--- a/net/sched/act_mirred.c
+++ b/net/sched/act_mirred.c
@@ -190,8 +190,8 @@ static int tcf_mirred_init(struct net *net, struct nlattr *nla,
 	return ret;
 }
 
-static int tcf_mirred(struct sk_buff *skb, const struct tc_action *a,
-		      struct tcf_result *res)
+static int tcf_mirred_act(struct sk_buff *skb, const struct tc_action *a,
+			  struct tcf_result *res)
 {
 	struct tcf_mirred *m = to_mirred(a);
 	struct sk_buff *skb2 = skb;
@@ -406,7 +406,7 @@ static struct tc_action_ops act_mirred_ops = {
 	.kind		=	"mirred",
 	.type		=	TCA_ACT_MIRRED,
 	.owner		=	THIS_MODULE,
-	.act		=	tcf_mirred,
+	.act		=	tcf_mirred_act,
 	.stats_update	=	tcf_stats_update,
 	.dump		=	tcf_mirred_dump,
 	.cleanup	=	tcf_mirred_release,
-- 
2.11.0

^ permalink raw reply related

* [PATCH net-next 12/13] net: sched: act_vlan method rename for grep-ability and consistency
From: Jamal Hadi Salim @ 2018-08-12 13:35 UTC (permalink / raw)
  To: davem; +Cc: xiyou.wangcong, jiri, netdev, kernel, Jamal Hadi Salim
In-Reply-To: <20180812133501.15278-1-jhs@emojatatu.com>

From: Jamal Hadi Salim <jhs@mojatatu.com>

Signed-off-by: Jamal Hadi Salim <jhs@mojatatu.com>
---
 net/sched/act_vlan.c | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/net/sched/act_vlan.c b/net/sched/act_vlan.c
index 5bde17fe3608..d1f5028384c9 100644
--- a/net/sched/act_vlan.c
+++ b/net/sched/act_vlan.c
@@ -22,8 +22,8 @@
 static unsigned int vlan_net_id;
 static struct tc_action_ops act_vlan_ops;
 
-static int tcf_vlan(struct sk_buff *skb, const struct tc_action *a,
-		    struct tcf_result *res)
+static int tcf_vlan_act(struct sk_buff *skb, const struct tc_action *a,
+			struct tcf_result *res)
 {
 	struct tcf_vlan *v = to_vlan(a);
 	struct tcf_vlan_params *p;
@@ -307,7 +307,7 @@ static struct tc_action_ops act_vlan_ops = {
 	.kind		=	"vlan",
 	.type		=	TCA_ACT_VLAN,
 	.owner		=	THIS_MODULE,
-	.act		=	tcf_vlan,
+	.act		=	tcf_vlan_act,
 	.dump		=	tcf_vlan_dump,
 	.init		=	tcf_vlan_init,
 	.cleanup	=	tcf_vlan_cleanup,
-- 
2.11.0

^ permalink raw reply related

* [PATCH net-next 11/13] net: sched: act_skbmod method rename for grep-ability and consistency
From: Jamal Hadi Salim @ 2018-08-12 13:34 UTC (permalink / raw)
  To: davem; +Cc: xiyou.wangcong, jiri, netdev, kernel, Jamal Hadi Salim
In-Reply-To: <20180812133501.15278-1-jhs@emojatatu.com>

From: Jamal Hadi Salim <jhs@mojatatu.com>

Signed-off-by: Jamal Hadi Salim <jhs@mojatatu.com>
---
 net/sched/act_skbmod.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/net/sched/act_skbmod.c b/net/sched/act_skbmod.c
index e9c86ade3b40..d6a1af0c4171 100644
--- a/net/sched/act_skbmod.c
+++ b/net/sched/act_skbmod.c
@@ -24,7 +24,7 @@ static unsigned int skbmod_net_id;
 static struct tc_action_ops act_skbmod_ops;
 
 #define MAX_EDIT_LEN ETH_HLEN
-static int tcf_skbmod_run(struct sk_buff *skb, const struct tc_action *a,
+static int tcf_skbmod_act(struct sk_buff *skb, const struct tc_action *a,
 			  struct tcf_result *res)
 {
 	struct tcf_skbmod *d = to_skbmod(a);
@@ -270,7 +270,7 @@ static struct tc_action_ops act_skbmod_ops = {
 	.kind		=	"skbmod",
 	.type		=	TCA_ACT_SKBMOD,
 	.owner		=	THIS_MODULE,
-	.act		=	tcf_skbmod_run,
+	.act		=	tcf_skbmod_act,
 	.dump		=	tcf_skbmod_dump,
 	.init		=	tcf_skbmod_init,
 	.cleanup	=	tcf_skbmod_cleanup,
-- 
2.11.0

^ permalink raw reply related

* [PATCH net-next 10/13] net: sched: act_skbedit method rename for grep-ability and consistency
From: Jamal Hadi Salim @ 2018-08-12 13:34 UTC (permalink / raw)
  To: davem; +Cc: xiyou.wangcong, jiri, netdev, kernel, Jamal Hadi Salim
In-Reply-To: <20180812133501.15278-1-jhs@emojatatu.com>

From: Jamal Hadi Salim <jhs@mojatatu.com>

Signed-off-by: Jamal Hadi Salim <jhs@mojatatu.com>
---
 net/sched/act_skbedit.c | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/net/sched/act_skbedit.c b/net/sched/act_skbedit.c
index a6db47ebec11..926d7bc4a89d 100644
--- a/net/sched/act_skbedit.c
+++ b/net/sched/act_skbedit.c
@@ -33,8 +33,8 @@
 static unsigned int skbedit_net_id;
 static struct tc_action_ops act_skbedit_ops;
 
-static int tcf_skbedit(struct sk_buff *skb, const struct tc_action *a,
-		       struct tcf_result *res)
+static int tcf_skbedit_act(struct sk_buff *skb, const struct tc_action *a,
+			   struct tcf_result *res)
 {
 	struct tcf_skbedit *d = to_skbedit(a);
 	struct tcf_skbedit_params *params;
@@ -310,7 +310,7 @@ static struct tc_action_ops act_skbedit_ops = {
 	.kind		=	"skbedit",
 	.type		=	TCA_ACT_SKBEDIT,
 	.owner		=	THIS_MODULE,
-	.act		=	tcf_skbedit,
+	.act		=	tcf_skbedit_act,
 	.dump		=	tcf_skbedit_dump,
 	.init		=	tcf_skbedit_init,
 	.cleanup	=	tcf_skbedit_cleanup,
-- 
2.11.0

^ permalink raw reply related

* [PATCH net-next 09/13] net: sched: act_simple method rename for grep-ability and consistency
From: Jamal Hadi Salim @ 2018-08-12 13:34 UTC (permalink / raw)
  To: davem; +Cc: xiyou.wangcong, jiri, netdev, kernel, Jamal Hadi Salim
In-Reply-To: <20180812133501.15278-1-jhs@emojatatu.com>

From: Jamal Hadi Salim <jhs@mojatatu.com>

Signed-off-by: Jamal Hadi Salim <jhs@mojatatu.com>
---
 net/sched/act_simple.c | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/net/sched/act_simple.c b/net/sched/act_simple.c
index 18e4452574cd..e616523ba3c1 100644
--- a/net/sched/act_simple.c
+++ b/net/sched/act_simple.c
@@ -28,8 +28,8 @@ static unsigned int simp_net_id;
 static struct tc_action_ops act_simp_ops;
 
 #define SIMP_MAX_DATA	32
-static int tcf_simp(struct sk_buff *skb, const struct tc_action *a,
-		    struct tcf_result *res)
+static int tcf_simp_act(struct sk_buff *skb, const struct tc_action *a,
+			struct tcf_result *res)
 {
 	struct tcf_defact *d = to_defact(a);
 
@@ -207,7 +207,7 @@ static struct tc_action_ops act_simp_ops = {
 	.kind		=	"simple",
 	.type		=	TCA_ACT_SIMP,
 	.owner		=	THIS_MODULE,
-	.act		=	tcf_simp,
+	.act		=	tcf_simp_act,
 	.dump		=	tcf_simp_dump,
 	.cleanup	=	tcf_simp_release,
 	.init		=	tcf_simp_init,
-- 
2.11.0

^ permalink raw reply related

* [PATCH net-next 08/13] net: sched: act_police method rename for grep-ability and consistency
From: Jamal Hadi Salim @ 2018-08-12 13:34 UTC (permalink / raw)
  To: davem; +Cc: xiyou.wangcong, jiri, netdev, kernel, Jamal Hadi Salim
In-Reply-To: <20180812133501.15278-1-jhs@emojatatu.com>

From: Jamal Hadi Salim <jhs@mojatatu.com>

Signed-off-by: Jamal Hadi Salim <jhs@mojatatu.com>
---
 net/sched/act_police.c | 16 ++++++++--------
 1 file changed, 8 insertions(+), 8 deletions(-)

diff --git a/net/sched/act_police.c b/net/sched/act_police.c
index 88c16d80c1cf..06f0742db593 100644
--- a/net/sched/act_police.c
+++ b/net/sched/act_police.c
@@ -56,7 +56,7 @@ struct tc_police_compat {
 static unsigned int police_net_id;
 static struct tc_action_ops act_police_ops;
 
-static int tcf_act_police_walker(struct net *net, struct sk_buff *skb,
+static int tcf_police_walker(struct net *net, struct sk_buff *skb,
 				 struct netlink_callback *cb, int type,
 				 const struct tc_action_ops *ops,
 				 struct netlink_ext_ack *extack)
@@ -73,7 +73,7 @@ static const struct nla_policy police_policy[TCA_POLICE_MAX + 1] = {
 	[TCA_POLICE_RESULT]	= { .type = NLA_U32 },
 };
 
-static int tcf_act_police_init(struct net *net, struct nlattr *nla,
+static int tcf_police_init(struct net *net, struct nlattr *nla,
 			       struct nlattr *est, struct tc_action **a,
 			       int ovr, int bind, bool rtnl_held,
 			       struct netlink_ext_ack *extack)
@@ -203,7 +203,7 @@ static int tcf_act_police_init(struct net *net, struct nlattr *nla,
 	return err;
 }
 
-static int tcf_act_police(struct sk_buff *skb, const struct tc_action *a,
+static int tcf_police_act(struct sk_buff *skb, const struct tc_action *a,
 			  struct tcf_result *res)
 {
 	struct tcf_police *police = to_police(a);
@@ -267,7 +267,7 @@ static int tcf_act_police(struct sk_buff *skb, const struct tc_action *a,
 	return police->tcf_action;
 }
 
-static int tcf_act_police_dump(struct sk_buff *skb, struct tc_action *a,
+static int tcf_police_dump(struct sk_buff *skb, struct tc_action *a,
 			       int bind, int ref)
 {
 	unsigned char *b = skb_tail_pointer(skb);
@@ -335,10 +335,10 @@ static struct tc_action_ops act_police_ops = {
 	.kind		=	"police",
 	.type		=	TCA_ID_POLICE,
 	.owner		=	THIS_MODULE,
-	.act		=	tcf_act_police,
-	.dump		=	tcf_act_police_dump,
-	.init		=	tcf_act_police_init,
-	.walk		=	tcf_act_police_walker,
+	.act		=	tcf_police_act,
+	.dump		=	tcf_police_dump,
+	.init		=	tcf_police_init,
+	.walk		=	tcf_police_walker,
 	.lookup		=	tcf_police_search,
 	.delete		=	tcf_police_delete,
 	.size		=	sizeof(struct tcf_police),
-- 
2.11.0

^ permalink raw reply related

* [PATCH net-next 07/13] net: sched: act_pedit method rename for grep-ability and consistency
From: Jamal Hadi Salim @ 2018-08-12 13:34 UTC (permalink / raw)
  To: davem; +Cc: xiyou.wangcong, jiri, netdev, kernel, Jamal Hadi Salim
In-Reply-To: <20180812133501.15278-1-jhs@emojatatu.com>

From: Jamal Hadi Salim <jhs@mojatatu.com>

Signed-off-by: Jamal Hadi Salim <jhs@mojatatu.com>
---
 net/sched/act_pedit.c | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/net/sched/act_pedit.c b/net/sched/act_pedit.c
index 3f62da72ab6a..8a7a7cb94e83 100644
--- a/net/sched/act_pedit.c
+++ b/net/sched/act_pedit.c
@@ -288,8 +288,8 @@ static int pedit_skb_hdr_offset(struct sk_buff *skb,
 	return ret;
 }
 
-static int tcf_pedit(struct sk_buff *skb, const struct tc_action *a,
-		     struct tcf_result *res)
+static int tcf_pedit_act(struct sk_buff *skb, const struct tc_action *a,
+			 struct tcf_result *res)
 {
 	struct tcf_pedit *p = to_pedit(a);
 	int i;
@@ -471,7 +471,7 @@ static struct tc_action_ops act_pedit_ops = {
 	.kind		=	"pedit",
 	.type		=	TCA_ACT_PEDIT,
 	.owner		=	THIS_MODULE,
-	.act		=	tcf_pedit,
+	.act		=	tcf_pedit_act,
 	.dump		=	tcf_pedit_dump,
 	.cleanup	=	tcf_pedit_cleanup,
 	.init		=	tcf_pedit_init,
-- 
2.11.0

^ permalink raw reply related

* [PATCH net-next 06/13] net: sched: act_nat method rename for grep-ability and consistency
From: Jamal Hadi Salim @ 2018-08-12 13:34 UTC (permalink / raw)
  To: davem; +Cc: xiyou.wangcong, jiri, netdev, kernel, Jamal Hadi Salim
In-Reply-To: <20180812133501.15278-1-jhs@emojatatu.com>

From: Jamal Hadi Salim <jhs@mojatatu.com>

Signed-off-by: Jamal Hadi Salim <jhs@mojatatu.com>
---
 net/sched/act_nat.c | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/net/sched/act_nat.c b/net/sched/act_nat.c
index 4dd9188a72fd..822e903bfc25 100644
--- a/net/sched/act_nat.c
+++ b/net/sched/act_nat.c
@@ -93,8 +93,8 @@ static int tcf_nat_init(struct net *net, struct nlattr *nla, struct nlattr *est,
 	return ret;
 }
 
-static int tcf_nat(struct sk_buff *skb, const struct tc_action *a,
-		   struct tcf_result *res)
+static int tcf_nat_act(struct sk_buff *skb, const struct tc_action *a,
+		       struct tcf_result *res)
 {
 	struct tcf_nat *p = to_tcf_nat(a);
 	struct iphdr *iph;
@@ -311,7 +311,7 @@ static struct tc_action_ops act_nat_ops = {
 	.kind		=	"nat",
 	.type		=	TCA_ACT_NAT,
 	.owner		=	THIS_MODULE,
-	.act		=	tcf_nat,
+	.act		=	tcf_nat_act,
 	.dump		=	tcf_nat_dump,
 	.init		=	tcf_nat_init,
 	.walk		=	tcf_nat_walker,
-- 
2.11.0

^ permalink raw reply related

* [PATCH net-next 05/13] net: sched: act_ipt method rename for grep-ability and consistency
From: Jamal Hadi Salim @ 2018-08-12 13:34 UTC (permalink / raw)
  To: davem; +Cc: xiyou.wangcong, jiri, netdev, kernel, Jamal Hadi Salim
In-Reply-To: <20180812133501.15278-1-jhs@emojatatu.com>

From: Jamal Hadi Salim <jhs@mojatatu.com>

Signed-off-by: Jamal Hadi Salim <jhs@mojatatu.com>
---
 net/sched/act_ipt.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/net/sched/act_ipt.c b/net/sched/act_ipt.c
index e149f0e66cb6..51f235bbeb5b 100644
--- a/net/sched/act_ipt.c
+++ b/net/sched/act_ipt.c
@@ -222,8 +222,8 @@ static int tcf_xt_init(struct net *net, struct nlattr *nla,
 			      bind);
 }
 
-static int tcf_ipt(struct sk_buff *skb, const struct tc_action *a,
-		   struct tcf_result *res)
+static int tcf_ipt_act(struct sk_buff *skb, const struct tc_action *a,
+		       struct tcf_result *res)
 {
 	int ret = 0, result = 0;
 	struct tcf_ipt *ipt = to_ipt(a);
@@ -348,7 +348,7 @@ static struct tc_action_ops act_ipt_ops = {
 	.kind		=	"ipt",
 	.type		=	TCA_ACT_IPT,
 	.owner		=	THIS_MODULE,
-	.act		=	tcf_ipt,
+	.act		=	tcf_ipt_act,
 	.dump		=	tcf_ipt_dump,
 	.cleanup	=	tcf_ipt_release,
 	.init		=	tcf_ipt_init,
@@ -406,7 +406,7 @@ static struct tc_action_ops act_xt_ops = {
 	.kind		=	"xt",
 	.type		=	TCA_ACT_XT,
 	.owner		=	THIS_MODULE,
-	.act		=	tcf_ipt,
+	.act		=	tcf_ipt_act,
 	.dump		=	tcf_ipt_dump,
 	.cleanup	=	tcf_ipt_release,
 	.init		=	tcf_xt_init,
-- 
2.11.0

^ permalink raw reply related

* [PATCH net-next 04/13] net: sched: act_gact method rename for grep-ability and consistency
From: Jamal Hadi Salim @ 2018-08-12 13:34 UTC (permalink / raw)
  To: davem; +Cc: xiyou.wangcong, jiri, netdev, kernel, Jamal Hadi Salim
In-Reply-To: <20180812133501.15278-1-jhs@emojatatu.com>

From: Jamal Hadi Salim <jhs@mojatatu.com>

Signed-off-by: Jamal Hadi Salim <jhs@mojatatu.com>
---
 net/sched/act_gact.c | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/net/sched/act_gact.c b/net/sched/act_gact.c
index bfccd34a3968..52a3e474d822 100644
--- a/net/sched/act_gact.c
+++ b/net/sched/act_gact.c
@@ -133,8 +133,8 @@ static int tcf_gact_init(struct net *net, struct nlattr *nla,
 	return ret;
 }
 
-static int tcf_gact(struct sk_buff *skb, const struct tc_action *a,
-		    struct tcf_result *res)
+static int tcf_gact_act(struct sk_buff *skb, const struct tc_action *a,
+			struct tcf_result *res)
 {
 	struct tcf_gact *gact = to_gact(a);
 	int action = READ_ONCE(gact->tcf_action);
@@ -254,7 +254,7 @@ static struct tc_action_ops act_gact_ops = {
 	.kind		=	"gact",
 	.type		=	TCA_ACT_GACT,
 	.owner		=	THIS_MODULE,
-	.act		=	tcf_gact,
+	.act		=	tcf_gact_act,
 	.stats_update	=	tcf_gact_stats_update,
 	.dump		=	tcf_gact_dump,
 	.init		=	tcf_gact_init,
-- 
2.11.0

^ permalink raw reply related

* [PATCH net-next 03/13] net: sched: act_sum method rename for grep-ability and consistency
From: Jamal Hadi Salim @ 2018-08-12 13:34 UTC (permalink / raw)
  To: davem; +Cc: xiyou.wangcong, jiri, netdev, kernel, Jamal Hadi Salim
In-Reply-To: <20180812133501.15278-1-jhs@emojatatu.com>

From: Jamal Hadi Salim <jhs@mojatatu.com>

Signed-off-by: Jamal Hadi Salim <jhs@mojatatu.com>
---
 net/sched/act_csum.c | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/net/sched/act_csum.c b/net/sched/act_csum.c
index f01c59ba6d12..5596fae4e478 100644
--- a/net/sched/act_csum.c
+++ b/net/sched/act_csum.c
@@ -555,8 +555,8 @@ static int tcf_csum_ipv6(struct sk_buff *skb, u32 update_flags)
 	return 0;
 }
 
-static int tcf_csum(struct sk_buff *skb, const struct tc_action *a,
-		    struct tcf_result *res)
+static int tcf_csum_act(struct sk_buff *skb, const struct tc_action *a,
+			struct tcf_result *res)
 {
 	struct tcf_csum *p = to_tcf_csum(a);
 	struct tcf_csum_params *params;
@@ -670,7 +670,7 @@ static struct tc_action_ops act_csum_ops = {
 	.kind		= "csum",
 	.type		= TCA_ACT_CSUM,
 	.owner		= THIS_MODULE,
-	.act		= tcf_csum,
+	.act		= tcf_csum_act,
 	.dump		= tcf_csum_dump,
 	.init		= tcf_csum_init,
 	.cleanup	= tcf_csum_cleanup,
-- 
2.11.0

^ permalink raw reply related

* [PATCH net-next 02/13] net: sched: act_bpf method rename for grep-ability and consistency
From: Jamal Hadi Salim @ 2018-08-12 13:34 UTC (permalink / raw)
  To: davem; +Cc: xiyou.wangcong, jiri, netdev, kernel, Jamal Hadi Salim
In-Reply-To: <20180812133501.15278-1-jhs@emojatatu.com>

From: Jamal Hadi Salim <jhs@mojatatu.com>

Signed-off-by: Jamal Hadi Salim <jhs@mojatatu.com>
---
 net/sched/act_bpf.c | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/net/sched/act_bpf.c b/net/sched/act_bpf.c
index 9e8a33f9fee3..9b30e62805c7 100644
--- a/net/sched/act_bpf.c
+++ b/net/sched/act_bpf.c
@@ -34,8 +34,8 @@ struct tcf_bpf_cfg {
 static unsigned int bpf_net_id;
 static struct tc_action_ops act_bpf_ops;
 
-static int tcf_bpf(struct sk_buff *skb, const struct tc_action *act,
-		   struct tcf_result *res)
+static int tcf_bpf_act(struct sk_buff *skb, const struct tc_action *act,
+		       struct tcf_result *res)
 {
 	bool at_ingress = skb_at_tc_ingress(skb);
 	struct tcf_bpf *prog = to_bpf(act);
@@ -406,7 +406,7 @@ static struct tc_action_ops act_bpf_ops __read_mostly = {
 	.kind		=	"bpf",
 	.type		=	TCA_ACT_BPF,
 	.owner		=	THIS_MODULE,
-	.act		=	tcf_bpf,
+	.act		=	tcf_bpf_act,
 	.dump		=	tcf_bpf_dump,
 	.cleanup	=	tcf_bpf_cleanup,
 	.init		=	tcf_bpf_init,
-- 
2.11.0

^ permalink raw reply related

* [PATCH net-next 01/13] net: sched: act_connmark method rename for grep-ability and consistency
From: Jamal Hadi Salim @ 2018-08-12 13:34 UTC (permalink / raw)
  To: davem; +Cc: xiyou.wangcong, jiri, netdev, kernel, Jamal Hadi Salim
In-Reply-To: <20180812133501.15278-1-jhs@emojatatu.com>

From: Jamal Hadi Salim <jhs@mojatatu.com>

Signed-off-by: Jamal Hadi Salim <jhs@mojatatu.com>
---
 net/sched/act_connmark.c | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/net/sched/act_connmark.c b/net/sched/act_connmark.c
index 2f9bc833d046..54c0bf54f2ac 100644
--- a/net/sched/act_connmark.c
+++ b/net/sched/act_connmark.c
@@ -31,8 +31,8 @@
 static unsigned int connmark_net_id;
 static struct tc_action_ops act_connmark_ops;
 
-static int tcf_connmark(struct sk_buff *skb, const struct tc_action *a,
-			struct tcf_result *res)
+static int tcf_connmark_act(struct sk_buff *skb, const struct tc_action *a,
+			    struct tcf_result *res)
 {
 	const struct nf_conntrack_tuple_hash *thash;
 	struct nf_conntrack_tuple tuple;
@@ -209,7 +209,7 @@ static struct tc_action_ops act_connmark_ops = {
 	.kind		=	"connmark",
 	.type		=	TCA_ACT_CONNMARK,
 	.owner		=	THIS_MODULE,
-	.act		=	tcf_connmark,
+	.act		=	tcf_connmark_act,
 	.dump		=	tcf_connmark_dump,
 	.init		=	tcf_connmark_init,
 	.walk		=	tcf_connmark_walker,
-- 
2.11.0

^ permalink raw reply related

* [PATCH net-next 00/13] net: sched: actions rename for grep-ability and consistency
From: Jamal Hadi Salim @ 2018-08-12 13:34 UTC (permalink / raw)
  To: davem; +Cc: xiyou.wangcong, jiri, netdev, kernel, Jamal Hadi Salim

From: Jamal Hadi Salim <jhs@mojatatu.com>

Having a structure (example tcf_mirred) and a function with the same name is
not good for readability or grepability.

This long overdue patchset improves it and make sure there is consistency
across all actions

Jamal Hadi Salim (13):
  net: sched: act_connmark method rename for grep-ability and
    consistency
  net: sched: act_bpf method rename for grep-ability and consistency
  net: sched: act_sum method rename for grep-ability and consistency
  net: sched: act_gact method rename for grep-ability and consistency
  net: sched: act_ipt method rename for grep-ability and consistency
  net: sched: act_nat method rename for grep-ability and consistency
  net: sched: act_pedit method rename for grep-ability and consistency
  net: sched: act_police method rename for grep-ability and consistency
  net: sched: act_simple method rename for grep-ability and consistency
  net: sched: act_skbedit method rename for grep-ability and consistency
  net: sched: act_skbmod method rename for grep-ability and consistency
  net: sched: act_vlan method rename for grep-ability and consistency
  net: sched: act_mirred method rename for grep-ability and consistency

 net/sched/act_bpf.c      |  6 +++---
 net/sched/act_connmark.c |  6 +++---
 net/sched/act_csum.c     |  6 +++---
 net/sched/act_gact.c     |  6 +++---
 net/sched/act_ipt.c      |  8 ++++----
 net/sched/act_mirred.c   |  6 +++---
 net/sched/act_nat.c      |  6 +++---
 net/sched/act_pedit.c    |  6 +++---
 net/sched/act_police.c   | 16 ++++++++--------
 net/sched/act_simple.c   |  6 +++---
 net/sched/act_skbedit.c  |  6 +++---
 net/sched/act_skbmod.c   |  4 ++--
 net/sched/act_vlan.c     |  6 +++---
 13 files changed, 44 insertions(+), 44 deletions(-)

-- 
2.11.0

^ permalink raw reply

* [PATCH net-next v2] cpumask: make cpumask_next_wrap available without smp
From: Willem de Bruijn @ 2018-08-12 13:14 UTC (permalink / raw)
  To: netdev; +Cc: davem, caleb.raitto, lkp, Willem de Bruijn

From: Willem de Bruijn <willemb@google.com>

The kbuild robot shows build failure on machines without CONFIG_SMP:

  drivers/net/virtio_net.c:1916:10: error:
    implicit declaration of function 'cpumask_next_wrap'

cpumask_next_wrap is exported from lib/cpumask.o, which has

    lib-$(CONFIG_SMP) += cpumask.o

same as other functions, also define it as static inline in the
NR_CPUS==1 branch in include/linux/cpumask.h.

If wrap is true and next == start, return nr_cpumask_bits, or 1.
Else wrap across the range of valid cpus, here [0].

Fixes: 2ca653d607ce ("virtio_net: Stripe queue affinities across cores.")
Signed-off-by: Willem de Bruijn <willemb@google.com>
---
 include/linux/cpumask.h | 7 +++++++
 1 file changed, 7 insertions(+)

diff --git a/include/linux/cpumask.h b/include/linux/cpumask.h
index 57f20a0a77949..147bdec42215d 100644
--- a/include/linux/cpumask.h
+++ b/include/linux/cpumask.h
@@ -159,6 +159,13 @@ static inline unsigned int cpumask_next_and(int n,
 	return n+1;
 }
 
+static inline unsigned int cpumask_next_wrap(int n, const struct cpumask *mask,
+					     int start, bool wrap)
+{
+	/* cpu0 unless stop condition, wrap and at cpu0, then nr_cpumask_bits */
+	return (wrap && n == 0);
+}
+
 /* cpu must be a valid cpu, ie 0, so there's no other choice. */
 static inline unsigned int cpumask_any_but(const struct cpumask *mask,
 					   unsigned int cpu)
-- 
2.18.0.597.ga71716f1ad-goog

^ permalink raw reply related

* [PATCH] mt76: Enable NL80211_EXT_FEATURE_CQM_RSSI_LIST
From: Kristian Evensen @ 2018-08-12 14:52 UTC (permalink / raw)
  To: linux-wireless, kvalo, netdev, linux-kernel; +Cc: Kristian Evensen

Enable the use of CQM with mt76-devices.

Signed-off-by: Kristian Evensen <kristian.evensen@gmail.com>
---
 drivers/net/wireless/mediatek/mt76/mac80211.c | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/drivers/net/wireless/mediatek/mt76/mac80211.c b/drivers/net/wireless/mediatek/mt76/mac80211.c
index 029d54bc..3eb328ff 100644
--- a/drivers/net/wireless/mediatek/mt76/mac80211.c
+++ b/drivers/net/wireless/mediatek/mt76/mac80211.c
@@ -305,6 +305,8 @@ int mt76_register_device(struct mt76_dev *dev, bool vht,
 
 	wiphy->features |= NL80211_FEATURE_ACTIVE_MONITOR;
 
+	wiphy_ext_feature_set(wiphy, NL80211_EXT_FEATURE_CQM_RSSI_LIST);
+
 	wiphy->available_antennas_tx = dev->antenna_mask;
 	wiphy->available_antennas_rx = dev->antenna_mask;
 
-- 
2.14.1

^ permalink raw reply related

* Re: [PATCH] of: mdio: Support fixed links in of_phy_get_and_connect()
From: Linus Walleij @ 2018-08-12 11:54 UTC (permalink / raw)
  To: Andrew Lunn; +Cc: Florian Fainelli, David S. Miller, netdev, Laurent Pinchart
In-Reply-To: <20180711200452.GD21430@lunn.ch>

On Wed, Jul 11, 2018 at 10:04 PM Andrew Lunn <andrew@lunn.ch> wrote:

> What probably make sense as a followup is add a
> of_phy_disconnect_and_put(). When the module is unloaded, you leak a
> fixed link, because of_phy_deregister_fixed_link() is not being
> called.

I looked at this but I get a bit confused. How to handle
cleanup of the fixed link is pretty straight forward, I'm more
concerned with the proper (today non-existing) way to clean
up after of_phy_connect() that is called for all instances.

This calls phy_connect_direct() that then does this:

/* refcount is held by phy_connect_direct() on success */
put_device(&phy->mdio.dev);

Which seems like wrong - it should keep holding that until
we do of_phy_disconnect_and_put() in that case.
The above seems like some hack, i.e. we are using the
MDIO without holding a reference or something, so it
can go away cleanly later.

Or do I have it wrong?

It's confusing, I guess these PHY's don't come and go
very much so the plug/play part isn't really exercised.

> You also hold a reference to np which does not appear to be
> released.

That seems to be covered as there is a of_node_put(phy_np);
at the end of this function already.

Balancing of_node_get()/put() is another area where there
is not (AFAICT) much stringency in the kernel. I loosely
believe this is mostly for dynamic device trees (so you do not
delete a node that is in use e.g.) and people don't use that
very much (or at all). I think most systems shut down with
a bunch of OF nodes held. :/

(Yeah another universe of cleanups the day we need it
to work.)

Yours,
Linus Walleij

^ permalink raw reply

* [PATCH net] r8169: don't use MSI-X on RTL8168g
From: Heiner Kallweit @ 2018-08-12 11:26 UTC (permalink / raw)
  To: David Miller, Realtek linux nic maintainers; +Cc: netdev@vger.kernel.org

There have been two reports that network doesn't come back on resume
from suspend when using MSI-X. Both cases affect the same chip version
(RTL8168g - version 40), on different systems. Falling back to MSI
fixes the issue.
Even though we don't really have a proof yet that the network chip
version is to blame, let's disable MSI-X for this version.

Reported-by: Steve Dodd <steved424@gmail.com>
Reported-by: Lou Reed <gogen@disroot.org>
Tested-by: Steve Dodd <steved424@gmail.com>
Tested-by: Lou Reed <gogen@disroot.org>
Fixes: 6c6aa15fdea5 ("r8169: improve interrupt handling")
Signed-off-by: Heiner Kallweit <hkallweit1@gmail.com>
---
 drivers/net/ethernet/realtek/r8169.c | 5 +++++
 1 file changed, 5 insertions(+)

diff --git a/drivers/net/ethernet/realtek/r8169.c b/drivers/net/ethernet/realtek/r8169.c
index 344d77d9..d103e4dd 100644
--- a/drivers/net/ethernet/realtek/r8169.c
+++ b/drivers/net/ethernet/realtek/r8169.c
@@ -7076,6 +7076,11 @@ static int rtl_alloc_irq(struct rtl8169_private *tp)
 		RTL_W8(tp, Config2, RTL_R8(tp, Config2) & ~MSIEnable);
 		RTL_W8(tp, Cfg9346, Cfg9346_Lock);
 		flags = PCI_IRQ_LEGACY;
+	} else if (tp->mac_version == RTL_GIGA_MAC_VER_40) {
+		/* This version was reported to have issues with resume
+		 * from suspend when using MSI-X
+		 */
+		flags = PCI_IRQ_LEGACY | PCI_IRQ_MSI;
 	} else {
 		flags = PCI_IRQ_ALL_TYPES;
 	}
-- 
2.18.0

^ permalink raw reply related

* want to have a try
From: Joe @ 2018-08-12  9:56 UTC (permalink / raw)
  To: netdev

Are you upset for your current business s a l e s?

We provide email C A M P A I G N service and we can bring you business l e
a d s and up your s a l e s.

Please reply today so we can send options for you.

Kind Regards,
Joe

^ permalink raw reply

* Re: [PATCH net-next] cpumask: make cpumask_next_wrap available without smp
From: Willem de Bruijn @ 2018-08-12 11:15 UTC (permalink / raw)
  To: Network Development
  Cc: David Miller, caleb.raitto, kbuild test robot, Willem de Bruijn
In-Reply-To: <20180812092014.122104-1-willemdebruijn.kernel@gmail.com>

On Sun, Aug 12, 2018 at 11:20 AM Willem de Bruijn
<willemdebruijn.kernel@gmail.com> wrote:
>
> From: Willem de Bruijn <willemb@google.com>
>
> The kbuild robot shows build failure on machines without CONFIG_SMP:
>
>   drivers/net/virtio_net.c:1916:10: error:
>     implicit declaration of function 'cpumask_next_wrap'
>
> cpumask_next_wrap is exported from lib/cpumask.o, which has
>
>     lib-$(CONFIG_SMP) += cpumask.o
>
> same as other functions, also define it as static inline in the
> NR_CPUS==1 branch in include/linux/cpumask.h.
>
> If wrap is false, function wraps across the range of valid cpus,
> here [0]. If it is true, it returns nr_cpumask_bits, here 1.
>
> Fixes: 2ca653d607ce ("virtio_net: Stripe queue affinities across cores.")
> Signed-off-by: Willem de Bruijn <willemb@google.com>

Sent too hastily. If wrap is true and n == -1, it should still return 0.

Will send a v2.

^ permalink raw reply

* REPLY AS SOON AS POSSIBLE
From: Dr Chien Direktor von Hang Seng @ 2018-08-11 22:49 UTC (permalink / raw)
  To: Recipients

I am Vice Chairman of Hang Seng Bank, I have Important Matter to Discuss with you concerning my late client. Died without a NEXT OF KIN. Send me your private email for full details information. email me at E-Mail: draymdm@gmail.com

Regards 
Mr.Fung

^ permalink raw reply

* [PATCH net-next] cpumask: make cpumask_next_wrap available without smp
From: Willem de Bruijn @ 2018-08-12  9:20 UTC (permalink / raw)
  To: netdev; +Cc: davem, caleb.raitto, lkp, Willem de Bruijn

From: Willem de Bruijn <willemb@google.com>

The kbuild robot shows build failure on machines without CONFIG_SMP:

  drivers/net/virtio_net.c:1916:10: error:
    implicit declaration of function 'cpumask_next_wrap'

cpumask_next_wrap is exported from lib/cpumask.o, which has

    lib-$(CONFIG_SMP) += cpumask.o

same as other functions, also define it as static inline in the
NR_CPUS==1 branch in include/linux/cpumask.h.

If wrap is false, function wraps across the range of valid cpus,
here [0]. If it is true, it returns nr_cpumask_bits, here 1.

Fixes: 2ca653d607ce ("virtio_net: Stripe queue affinities across cores.")
Signed-off-by: Willem de Bruijn <willemb@google.com>
---
 include/linux/cpumask.h | 6 ++++++
 1 file changed, 6 insertions(+)

diff --git a/include/linux/cpumask.h b/include/linux/cpumask.h
index 57f20a0a77949..c6d0967102fe3 100644
--- a/include/linux/cpumask.h
+++ b/include/linux/cpumask.h
@@ -159,6 +159,12 @@ static inline unsigned int cpumask_next_and(int n,
 	return n+1;
 }
 
+static inline unsigned int cpumask_next_wrap(int n, const struct cpumask *mask,
+					     int start, bool wrap)
+{
+	return wrap;	/* cpu 0 unless stop on wrap, then nr_cpumask_bits */
+}
+
 /* cpu must be a valid cpu, ie 0, so there's no other choice. */
 static inline unsigned int cpumask_any_but(const struct cpumask *mask,
 					   unsigned int cpu)
-- 
2.18.0.597.ga71716f1ad-goog

^ permalink raw reply related

* Re: [PATCH net] net/xdp: Fix suspicious RCU usage warning
From: Tariq Toukan @ 2018-08-12  8:45 UTC (permalink / raw)
  To: Alexei Starovoitov, Tariq Toukan
  Cc: Daniel Borkmann, David S. Miller, netdev, Eran Ben Elisha,
	Jesper Dangaard Brouer
In-Reply-To: <20180719213628.msccswfqkzwo5vrk@ast-mbp>



On 20/07/2018 12:36 AM, Alexei Starovoitov wrote:
> On Wed, Jul 18, 2018 at 05:13:54PM +0300, Tariq Toukan wrote:
>>
>>
>> On 17/07/2018 10:27 PM, Daniel Borkmann wrote:
>>> On 07/17/2018 06:47 PM, Alexei Starovoitov wrote:
>>>> On Tue, Jul 17, 2018 at 06:10:38PM +0300, Tariq Toukan wrote:
>>>>> Fix the warning below by calling rhashtable_lookup under
>>>>> RCU read lock.
>>>>>
>>
>> ...
>>
>>>>>    	mutex_lock(&mem_id_lock);
>>>>> +	rcu_read_lock();
>>>>>    	xa = rhashtable_lookup(mem_id_ht, &id, mem_id_rht_params);
>>>>> +	rcu_read_unlock();
>>>>>    	if (!xa) {
>>>>
>>>> if it's an actual bug rcu_read_unlock seems to be misplaced.
>>>> It silences the warn, but rcu section looks wrong.
>>>
>>> I think that whole piece in __xdp_rxq_info_unreg_mem_model() should be:
>>>
>>>     mutex_lock(&mem_id_lock);
>>>     xa = rhashtable_lookup_fast(mem_id_ht, &id, mem_id_rht_params);
>>>     if (xa && rhashtable_remove_fast(mem_id_ht, &xa->node, mem_id_rht_params) == 0)
>>>             call_rcu(&xa->rcu, __xdp_mem_allocator_rcu_free);
>>>     mutex_unlock(&mem_id_lock);
>>>
>>> Technically the RCU read side plus rhashtable_lookup() is the same, but lets
>>> use proper api. From the doc (https://lwn.net/Articles/751374/) object removal
>>> is wrapped around the RCU read side additionally, but in our case we're behind
>>> mem_id_lock for insertion/removal serialization.
>>>
>>> Cheers,
>>> Daniel
>>>
>>
>> Just as Daniel stated, I think there's no actual bug here, but we still want
>> to silence the RCU warning.
>>
>> Alexei, did you mean getting the if statement into the RCU lock critical
>> section?
> 
> If what Daniel proposes silences the warn, I'd rather do that.
> Pattern like:
>    rcu_lock;
>    val = lookup();
>    rcu_unlock;
>    if (val)
> will cause people to question the quality of the code and whether
> authors of the code understand rcu.
> There should be a way to silence the warn without adding
> "wrong on the first glance" code.
> 

I'm re-spinning this.
Can it still go to net, or better send it to bpf-next ?

^ permalink raw reply

* Re: [PATCH v2 net-next 0/2] virtio_net: Expand affinity to arbitrary numbers of cpu and vq
From: Michael S. Tsirkin @ 2018-08-12  8:44 UTC (permalink / raw)
  To: Caleb Raitto
  Cc: herbert, davem, arei.gonglei, jasowang, netdev, linux-crypto,
	Caleb Raitto
In-Reply-To: <20180810011828.199888-1-caleb.raitto@gmail.com>

On Thu, Aug 09, 2018 at 06:18:27PM -0700, Caleb Raitto wrote:
> From: Caleb Raitto <caraitto@google.com>
> 
> Virtio-net tries to pin each virtual queue rx and tx interrupt to a cpu if
> there are as many queues as cpus.
> 
> Expand this heuristic to configure a reasonable affinity setting also
> when the number of cpus != the number of virtual queues.
> 
> Patch 1 allows vqs to take an affinity mask with more than 1 cpu.
> Patch 2 generalizes the algorithm in virtnet_set_affinity beyond
> the case where #cpus == #vqs.

Acked-by: Michael S. Tsirkin <mst@redhat.com>

Let's see where does it take us.

> v2 changes:
> Renamed "virtio_net: Make vp_set_vq_affinity() take a mask." to
> "virtio: Make vp_set_vq_affinity() take a mask."
> 
> Tested:
> 
> # 16 vCPU, 16 queue pairs, Debian 9 recent net-next kernel, GCE
> 
> # Disable GCE scripts setting affinities during startup.
> #
> # Add the following to
> # /etc/default/instance_configs.cfg.template and reboot:
> [InstanceSetup]
> set_multiqueue = false
> 
> $ cd /proc/irq
> $ for i in `seq 24 60` ; do sudo grep ".*" $i/smp_affinity_list;  done
> 0-15
> 0
> 0
> 1
> 1
> 2
> 2
> 3
> 3
> 4
> 4
> 5
> 5
> 6
> 6
> 7
> 7
> 8
> 8
> 9
> 9
> 10
> 10
> 11
> 11
> 12
> 12
> 13
> 13
> 14
> 14
> 15
> 15
> 0-15
> 0-15
> 0-15
> 0-15
> 
> $ cd /sys/class/net/eth0/queues/
> $ for i in `seq 0 15` ; do sudo grep ".*" tx-$i/xps_cpus; done
> 0001
> 0002
> 0004
> 0008
> 0010
> 0020
> 0040
> 0080
> 0100
> 0200
> 0400
> 0800
> 1000
> 2000
> 4000
> 8000
> 
> # 16 vCPU, 15 queue pairs
> $ sudo ethtool -L eth0 combined 15
> 
> $ cd /proc/irq
> $ for i in `seq 24 60` ; do sudo grep ".*" $i/smp_affinity_list;  done
> 0-15
> 0-1
> 0-1
> 2
> 2
> 3
> 3
> 4
> 4
> 5
> 5
> 6
> 6
> 7
> 7
> 8
> 8
> 9
> 9
> 10
> 10
> 11
> 11
> 12
> 12
> 13
> 13
> 14
> 14
> 15
> 15
> 15
> 15
> 0-15
> 0-15
> 0-15
> 0-15
> 
> $ cd /sys/class/net/eth0/queues/
> $ for i in `seq 0 14` ; do sudo grep ".*" tx-$i/xps_cpus; done
> 0003
> 0004
> 0008
> 0010
> 0020
> 0040
> 0080
> 0100
> 0200
> 0400
> 0800
> 1000
> 2000
> 4000
> 8000
> 
> # 16 vCPU, 8 queue pairs
> $ sudo ethtool -L eth0 combined 8
> 
> $ cd /proc/irq
> $ for i in `seq 24 60` ; do sudo grep ".*" $i/smp_affinity_list;  done
> 0-15
> 0-1
> 0-1
> 2-3
> 2-3
> 4-5
> 4-5
> 6-7
> 6-7
> 8-9
> 8-9
> 10-11
> 10-11
> 12-13
> 12-13
> 14-15
> 14-15
> 9
> 9
> 10
> 10
> 11
> 11
> 12
> 12
> 13
> 13
> 14
> 14
> 15
> 15
> 15
> 15
> 0-15
> 0-15
> 0-15
> 0-15
> 
> $ cd /sys/class/net/eth0/queues/
> $ for i in `seq 0 7` ; do sudo grep ".*" tx-$i/xps_cpus; done
> 0003
> 000c
> 0030
> 00c0
> 0300
> 0c00
> 3000
> c000
> 
> # 15 vCPU, 16 queue pairs
> $ sudo ethtool -L eth0 combined 16
> $ sudo sh -c "echo 0 > /sys/devices/system/cpu/cpu15/online"
> 
> $ cd /proc/irq
> $ for i in `seq 24 60` ; do sudo grep ".*" $i/smp_affinity_list;  done
> 0-15
> 0
> 0
> 1
> 1
> 2
> 2
> 3
> 3
> 4
> 4
> 5
> 5
> 6
> 6
> 7
> 7
> 8
> 8
> 9
> 9
> 10
> 10
> 11
> 11
> 12
> 12
> 13
> 13
> 14
> 14
> 0
> 0
> 0-15
> 0-15
> 0-15
> 0-15
> 
> $ cd /sys/class/net/eth0/queues/
> $ for i in `seq 0 15` ; do sudo grep ".*" tx-$i/xps_cpus; done
> 0001
> 0002
> 0004
> 0008
> 0010
> 0020
> 0040
> 0080
> 0100
> 0200
> 0400
> 0800
> 1000
> 2000
> 4000
> 0001
> 
> # 8 vCPU, 16 queue pairs
> $ for i in `seq 8 15`; \
> do sudo sh -c "echo 0 > /sys/devices/system/cpu/cpu$i/online"; done
> 
> $ cd /proc/irq
> $ for i in `seq 24 60` ; do sudo grep ".*" $i/smp_affinity_list;  done
> 0-15
> 0
> 0
> 1
> 1
> 2
> 2
> 3
> 3
> 4
> 4
> 5
> 5
> 6
> 6
> 7
> 7
> 0
> 0
> 1
> 1
> 2
> 2
> 3
> 3
> 4
> 4
> 5
> 5
> 6
> 6
> 7
> 7
> 0-15
> 0-15
> 0-15
> 0-15
> 
> $ cd /sys/class/net/eth0/queues/
> $ for i in `seq 0 15` ; do sudo grep ".*" tx-$i/xps_cpus; done
> 0001
> 0002
> 0004
> 0008
> 0010
> 0020
> 0040
> 0080
> 0001
> 0002
> 0004
> 0008
> 0010
> 0020
> 0040
> 0080
> 
> Caleb Raitto (2):
>   virtio: Make vp_set_vq_affinity() take a mask.
>   virtio_net: Stripe queue affinities across cores.
> 
>  drivers/crypto/virtio/virtio_crypto_core.c |  4 +-
>  drivers/net/virtio_net.c                   | 46 ++++++++++++++--------
>  drivers/virtio/virtio_pci_common.c         |  7 ++--
>  drivers/virtio/virtio_pci_common.h         |  2 +-
>  include/linux/virtio_config.h              |  7 ++--
>  5 files changed, 39 insertions(+), 27 deletions(-)
> 
> -- 
> 2.18.0.597.ga71716f1ad-goog

^ permalink raw reply


This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox