Netdev List
 help / color / mirror / Atom feed
* Re: [net-next PATCH 1/6] net: Split netdev_alloc_frag into __alloc_page_frag and add __napi_alloc_frag
From: Eric Dumazet @ 2014-12-10 17:13 UTC (permalink / raw)
  To: Alexander Duyck; +Cc: Alexander Duyck, netdev, ast, davem, brouer
In-Reply-To: <54887DB0.7040903@gmail.com>

On Wed, 2014-12-10 at 09:06 -0800, Alexander Duyck wrote:

> That is an interesting idea.  I wonder if there would be a similar
> benefit for small packets.  If nothing else I might try a few
> experiments with ixgbe to see if I can take advantage of something similar.

I was planning to submit a core infrastructure when net-next reopens, a
simple layer to use instead of alloc_page(), and immediately usable in
Intel drivers.

^ permalink raw reply

* Re: atomic operations bottleneck in the IPv6 stack
From: Hannes Frederic Sowa @ 2014-12-10 17:16 UTC (permalink / raw)
  To: cristian.bercaru@freescale.com
  Cc: netdev@vger.kernel.org, R89243@freescale.com,
	Madalin-Cristian Bucur, Razvan.Ungureanu@freescale.com
In-Reply-To: <SN2PR03MB079DA7799199CD98C52B5389E620@SN2PR03MB079.namprd03.prod.outlook.com>

On Mi, 2014-12-10 at 16:56 +0000, cristian.bercaru@freescale.com wrote:
> 
> It seems to me that the atomic operations on the IPv6 forwarding path
> are a bottleneck and they are not scalable with the number of cores.
> Am I right? What improvements can be brought to the IPv6 kernel code
> to make it less dependent of atomic operations/variables?

For a starter, something like the following commit:

commit d26b3a7c4b3b26319f18bb645de93eba8f4bdcd5
Author: Eric Dumazet <edumazet@google.com>
Date:   Tue Jul 31 05:45:30 2012 +0000

    ipv4: percpu nh_rth_output cache

Bye,
Hannes

^ permalink raw reply

* Re: [net-next PATCH 1/6] net: Split netdev_alloc_frag into __alloc_page_frag and add __napi_alloc_frag
From: Alexander Duyck @ 2014-12-10 17:16 UTC (permalink / raw)
  To: Eric Dumazet; +Cc: Alexander Duyck, netdev, ast, davem, brouer
In-Reply-To: <1418231580.27198.30.camel@edumazet-glaptop2.roam.corp.google.com>

On 12/10/2014 09:13 AM, Eric Dumazet wrote:
> On Wed, 2014-12-10 at 09:06 -0800, Alexander Duyck wrote:
>
>> That is an interesting idea.  I wonder if there would be a similar
>> benefit for small packets.  If nothing else I might try a few
>> experiments with ixgbe to see if I can take advantage of something similar.
> I was planning to submit a core infrastructure when net-next reopens, a
> simple layer to use instead of alloc_page(), and immediately usable in
> Intel drivers.

Sound good.  I look forward to it.

^ permalink raw reply

* Re: am335x: cpsw: interrupt failure
From: Felipe Balbi @ 2014-12-10 17:17 UTC (permalink / raw)
  To: Yegor Yefremov; +Cc: Felipe Balbi, netdev, N, Mugunthan V
In-Reply-To: <CAGm1_ksNuO75QfgaDUpOe525xDkPhby-z8T=MX3DHdB-LVcR8g@mail.gmail.com>

[-- Attachment #1: Type: text/plain, Size: 3078 bytes --]

Hi,

On Fri, Dec 05, 2014 at 11:03:44AM +0100, Yegor Yefremov wrote:
> On Thu, Dec 4, 2014 at 5:56 PM, Felipe Balbi <balbi@ti.com> wrote:
> > Hi,
> >
> > On Thu, Dec 04, 2014 at 05:41:38PM +0100, Yegor Yefremov wrote:
> >> I have following problem. My systems reboots at high network load
> >> after this commit (found via git bissect):
> >>
> >> commit 55601c9f24670ba926ebdd4d712ac3b177232330
> >> Author: Felipe Balbi <balbi@ti.com>
> >> Date:   Mon Sep 8 17:54:58 2014 -0700
> >>
> >>     arm: omap: intc: switch over to linear irq domain
> >>
> >>     now that we don't need to support legacy board-files,
> >>     we can completely switch over to a linear irq domain
> >>     and make use of irq_alloc_domain_generic_chips() to
> >>     allocate all generic irq chips for us.
> >>
> >>     Signed-off-by: Felipe Balbi <balbi@ti.com>
> >>     Signed-off-by: Tony Lindgren <tony@atomide.com>
> >>
> >> and I get following error messages:
> >>
> >> irq 0, desc: cf004000, depth: 1, count: 0, unhandled: 0
> >
> > irq 0 ? Weird, that's not a valid IRQ.
> >
> >> ->handle_irq():  c0087fc0, handle_bad_irq+0x0/0x258
> >> ->irq_data.chip(): c08e7174, no_irq_chip+0x0/0x68
> >> ->action():   (null)
> >>    IRQ_NOPROBE set
> >>  IRQ_NOREQUEST set
> >> irq 0, desc: cf004000, depth: 1, count: 0, unhandled: 0
> >> ->handle_irq():  c0087fc0, handle_bad_irq+0x0/0x258
> >> ->irq_data.chip(): c08e7174, no_irq_chip+0x0/0x68
> >> ->action():   (null)
> >>    IRQ_NOPROBE set
> >>  IRQ_NOREQUEST set
> >> irq 0, desc: cf004000, depth: 1, count: 0, unhandled: 0
> >> ->handle_irq():  c0087fc0, handle_bad_irq+0x0/0x258
> >> ->irq_data.chip(): c08e7174, no_irq_chip+0x0/0x68
> >> ->action():   (null)
> >>    IRQ_NOPROBE set
> >>  IRQ_NOREQUEST set
> >> irq 0, desc: cf004000, depth: 1, count: 0, unhandled: 0
> >> ->handle_irq():  c0087fc0, handle_bad_irq+0x0/0x258
> >> ->irq_data.chip(): c08e7174, no_irq_chip+0x0/0x68
> >> ->action():   (null)
> >>
> >> My system: am335x with fast ethernet on the first slave and gigabit
> >> Ethernet on second CPSW slave. This issue occurs, when I ran nuttcp
> >> with default settings.
> >>
> >> With commit above I can at least see these messages, but 3.18-rc7 for
> >> example reboots without any messages.
> >>
> >> Any idea?
> >
> > if you take v3.18-rc7 and just revert that commit, does the problem go
> > away ?
> 
> git revert failed as the driver has more changes meanwhile or I'm
> missing some params. I've tried to force the driver to use legacy
> routines, but then I don't get pass U-Boot's "Starting kernel ..." See
> attached patch.
> 
> Compiler used:
> 
> Linux version 3.18.0-rc7 (...) (gcc version 4.8.3 20140320
> (prerelease) (Sourcery CodeBench Lite 2014.05-29) ) #309 SMP Fri Dec 5
> 10:59:38 CET 2014
> 
> Btw, what am335x based hardware do you have? I can run tests on both
> BBB and am335x-evmsk.

coming back to this. I have BBB only. Can you provide some extra
information on how I can trigger this problem here ?

cheers

-- 
balbi

[-- Attachment #2: Digital signature --]
[-- Type: application/pgp-signature, Size: 819 bytes --]

^ permalink raw reply

* [3.16.y-ckt stable] Patch "xen-netfront: Fix handling packets on compound pages with skb_linearize" has been added to staging queue
From: Luis Henriques @ 2014-12-10 17:26 UTC (permalink / raw)
  To: Zoltan Kiss
  Cc: Wei Liu, Ian Campbell, Paul Durrant, netdev, linux-kernel,
	xen-devel, David S. Miller, Stefan Bader, Luis Henriques,
	kernel-team

This is a note to let you know that I have just added a patch titled

    xen-netfront: Fix handling packets on compound pages with skb_linearize

to the linux-3.16.y-queue branch of the 3.16.y-ckt extended stable tree 
which can be found at:

 http://kernel.ubuntu.com/git?p=ubuntu/linux.git;a=shortlog;h=refs/heads/linux-3.16.y-queue

This patch is scheduled to be released in version 3.16.7-ckt3.

If you, or anyone else, feels it should not be added to this tree, please 
reply to this email.

For more information about the 3.16.y-ckt tree, see
https://wiki.ubuntu.com/Kernel/Dev/ExtendedStable

Thanks.
-Luis

------

>From 079f869ca5082866d276b686721e89a649e622fe Mon Sep 17 00:00:00 2001
From: Zoltan Kiss <zoltan.kiss@citrix.com>
Date: Mon, 11 Aug 2014 18:32:23 +0100
Subject: xen-netfront: Fix handling packets on compound pages with
 skb_linearize

commit 97a6d1bb2b658ac85ed88205ccd1ab809899884d upstream.

There is a long known problem with the netfront/netback interface: if the guest
tries to send a packet which constitues more than MAX_SKB_FRAGS + 1 ring slots,
it gets dropped. The reason is that netback maps these slots to a frag in the
frags array, which is limited by size. Having so many slots can occur since
compound pages were introduced, as the ring protocol slice them up into
individual (non-compound) page aligned slots. The theoretical worst case
scenario looks like this (note, skbs are limited to 64 Kb here):
linear buffer: at most PAGE_SIZE - 17 * 2 bytes, overlapping page boundary,
using 2 slots
first 15 frags: 1 + PAGE_SIZE + 1 bytes long, first and last bytes are at the
end and the beginning of a page, therefore they use 3 * 15 = 45 slots
last 2 frags: 1 + 1 bytes, overlapping page boundary, 2 * 2 = 4 slots
Although I don't think this 51 slots skb can really happen, we need a solution
which can deal with every scenario. In real life there is only a few slots
overdue, but usually it causes the TCP stream to be blocked, as the retry will
most likely have the same buffer layout.
This patch solves this problem by linearizing the packet. This is not the
fastest way, and it can fail much easier as it tries to allocate a big linear
area for the whole packet, but probably easier by an order of magnitude than
anything else. Probably this code path is not touched very frequently anyway.

Signed-off-by: Zoltan Kiss <zoltan.kiss@citrix.com>
Cc: Wei Liu <wei.liu2@citrix.com>
Cc: Ian Campbell <Ian.Campbell@citrix.com>
Cc: Paul Durrant <paul.durrant@citrix.com>
Cc: netdev@vger.kernel.org
Cc: linux-kernel@vger.kernel.org
Cc: xen-devel@lists.xenproject.org
Signed-off-by: David S. Miller <davem@davemloft.net>
Cc: Stefan Bader <stefan.bader@canonical.com>
Signed-off-by: Luis Henriques <luis.henriques@canonical.com>
---
 drivers/net/xen-netfront.c | 7 ++++---
 1 file changed, 4 insertions(+), 3 deletions(-)

diff --git a/drivers/net/xen-netfront.c b/drivers/net/xen-netfront.c
index 055222bae6e4..23359aeb1ba0 100644
--- a/drivers/net/xen-netfront.c
+++ b/drivers/net/xen-netfront.c
@@ -628,9 +628,10 @@ static int xennet_start_xmit(struct sk_buff *skb, struct net_device *dev)
 	slots = DIV_ROUND_UP(offset + len, PAGE_SIZE) +
 		xennet_count_skb_frag_slots(skb);
 	if (unlikely(slots > MAX_SKB_FRAGS + 1)) {
-		net_alert_ratelimited(
-			"xennet: skb rides the rocket: %d slots\n", slots);
-		goto drop;
+		net_dbg_ratelimited("xennet: skb rides the rocket: %d slots, %d bytes\n",
+				    slots, skb->len);
+		if (skb_linearize(skb))
+			goto drop;
 	}

 	spin_lock_irqsave(&queue->tx_lock, flags);

^ permalink raw reply related

* [PATCH net-next] net: Do not call ndo_dflt_fdb_dump if ndo_fdb_dump is defined.
From: Hubert Sokolowski @ 2014-12-10 17:20 UTC (permalink / raw)
  To: netdev

This change restores the semantic that was present
before 5e6d243587990a588143b9da3974833649595587
on how ndo_dflt_fdb_dump is called.
This semantic is still used for add and del operations
so let's keep it consistent.
Driver can still call ndo_dflt_fdb_dump from inside
its own fdb_dump routine when needed.
---
 net/core/rtnetlink.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/net/core/rtnetlink.c b/net/core/rtnetlink.c
index eaa057f..a9e5c37 100644
--- a/net/core/rtnetlink.c
+++ b/net/core/rtnetlink.c
@@ -2692,10 +2692,11 @@ static int rtnl_fdb_dump(struct sk_buff *skb, struct netlink_callback *cb)
 							 idx);
 		}

-		idx = ndo_dflt_fdb_dump(skb, cb, dev, NULL, idx);
 		if (dev->netdev_ops->ndo_fdb_dump)
 			idx = dev->netdev_ops->ndo_fdb_dump(skb, cb, bdev, dev,
 							    idx);
+		else
+			idx = ndo_dflt_fdb_dump(skb, cb, dev, NULL, idx);

 		cops = NULL;
 	}
-- 
1.9.3

^ permalink raw reply related

* [PATCH 2] llc: Make llc_conn_ev_qfyr_t function pointer arrays const
From: Joe Perches @ 2014-12-10 17:43 UTC (permalink / raw)
  To: Arnaldo Carvalho de Melo; +Cc: David S. Miller, netdev, LKML
In-Reply-To: <1418228330.18092.3.camel@perches.com>

It's better when function pointer arrays aren't modifiable.

Net change from original:

$ size net/llc/built-in.o.*
   text	   data	    bss	    dec	    hex	filename
  61065	  12886	   1344	  75295	  1261f	net/llc/built-in.o.new
  47113	  27030	   1344	  75487	  126df	net/llc/built-in.o.old

Signed-off-by: Joe Perches <joe@perches.com>
---

The first patch should have specified which function pointer array type
was being updated.  Oh well.

 include/net/llc_c_st.h |   2 +-
 net/llc/llc_c_st.c     | 238 ++++++++++++++++++++++++-------------------------
 net/llc/llc_conn.c     |   2 +-
 3 files changed, 121 insertions(+), 121 deletions(-)

diff --git a/include/net/llc_c_st.h b/include/net/llc_c_st.h
index 60e2ebb..48f3f89 100644
--- a/include/net/llc_c_st.h
+++ b/include/net/llc_c_st.h
@@ -35,7 +35,7 @@
 struct llc_conn_state_trans {
 	llc_conn_ev_t	   ev;
 	u8		   next_state;
-	llc_conn_ev_qfyr_t *ev_qualifiers;
+	const llc_conn_ev_qfyr_t *ev_qualifiers;
 	const llc_conn_action_t  *ev_actions;
 };
 
diff --git a/net/llc/llc_c_st.c b/net/llc/llc_c_st.c
index 3ae257d..2467573 100644
--- a/net/llc/llc_c_st.c
+++ b/net/llc/llc_c_st.c
@@ -234,7 +234,7 @@ static struct llc_conn_state_trans llc_common_state_trans_9 = {
 
 /* State transitions for LLC_CONN_EV_RX_XXX_RSP_Fbit_SET_1 event */
 #if 0
-static llc_conn_ev_qfyr_t llc_common_ev_qfyrs_10[] = {
+static const llc_conn_ev_qfyr_t llc_common_ev_qfyrs_10[] = {
 	[0] = llc_conn_ev_qlfy_p_flag_eq_0,
 	[1] = NULL,
 };
@@ -256,7 +256,7 @@ static struct llc_conn_state_trans llc_common_state_trans_10 = {
 #endif
 
 /* State transitions for LLC_CONN_EV_P_TMR_EXP event */
-static llc_conn_ev_qfyr_t llc_common_ev_qfyrs_11a[] = {
+static const llc_conn_ev_qfyr_t llc_common_ev_qfyrs_11a[] = {
 	[0] = llc_conn_ev_qlfy_retry_cnt_gte_n2,
 	[1] = NULL,
 };
@@ -278,7 +278,7 @@ static struct llc_conn_state_trans llc_common_state_trans_11a = {
 };
 
 /* State transitions for LLC_CONN_EV_ACK_TMR_EXP event */
-static llc_conn_ev_qfyr_t llc_common_ev_qfyrs_11b[] = {
+static const llc_conn_ev_qfyr_t llc_common_ev_qfyrs_11b[] = {
 	[0] = llc_conn_ev_qlfy_retry_cnt_gte_n2,
 	[1] = NULL,
 };
@@ -300,7 +300,7 @@ static struct llc_conn_state_trans llc_common_state_trans_11b = {
 };
 
 /* State transitions for LLC_CONN_EV_REJ_TMR_EXP event */
-static llc_conn_ev_qfyr_t llc_common_ev_qfyrs_11c[] = {
+static const llc_conn_ev_qfyr_t llc_common_ev_qfyrs_11c[] = {
 	[0] = llc_conn_ev_qlfy_retry_cnt_gte_n2,
 	[1] = NULL,
 };
@@ -322,7 +322,7 @@ static struct llc_conn_state_trans llc_common_state_trans_11c = {
 };
 
 /* State transitions for LLC_CONN_EV_BUSY_TMR_EXP event */
-static llc_conn_ev_qfyr_t llc_common_ev_qfyrs_11d[] = {
+static const llc_conn_ev_qfyr_t llc_common_ev_qfyrs_11d[] = {
 	[0] = llc_conn_ev_qlfy_retry_cnt_gte_n2,
 	[1] = NULL,
 };
@@ -461,7 +461,7 @@ static struct llc_conn_state_trans llc_setup_state_trans_1 = {
 };
 
 /* State transitions for LLC_CONN_EV_RX_UA_RSP_Fbit_SET_X event */
-static llc_conn_ev_qfyr_t llc_setup_ev_qfyrs_2[] = {
+static const llc_conn_ev_qfyr_t llc_setup_ev_qfyrs_2[] = {
 	[0] = llc_conn_ev_qlfy_p_flag_eq_f,
 	[1] = llc_conn_ev_qlfy_set_status_conn,
 	[2] = NULL,
@@ -485,7 +485,7 @@ static struct llc_conn_state_trans llc_setup_state_trans_2 = {
 };
 
 /* State transitions for LLC_CONN_EV_ACK_TMR_EXP event */
-static llc_conn_ev_qfyr_t llc_setup_ev_qfyrs_3[] = {
+static const llc_conn_ev_qfyr_t llc_setup_ev_qfyrs_3[] = {
 	[0] = llc_conn_ev_qlfy_s_flag_eq_1,
 	[1] = llc_conn_ev_qlfy_set_status_conn,
 	[2] = NULL,
@@ -506,7 +506,7 @@ static struct llc_conn_state_trans llc_setup_state_trans_3 = {
 };
 
 /* State transitions for LLC_CONN_EV_RX_DISC_CMD_Pbit_SET_X event */
-static llc_conn_ev_qfyr_t llc_setup_ev_qfyrs_4[] = {
+static const llc_conn_ev_qfyr_t llc_setup_ev_qfyrs_4[] = {
 	[0] = llc_conn_ev_qlfy_set_status_disc,
 	[1] = NULL,
 };
@@ -527,7 +527,7 @@ static struct llc_conn_state_trans llc_setup_state_trans_4 = {
 };
 
 /* State transitions for LLC_CONN_EV_RX_DM_RSP_Fbit_SET_X event */
-static llc_conn_ev_qfyr_t llc_setup_ev_qfyrs_5[] = {
+static const llc_conn_ev_qfyr_t llc_setup_ev_qfyrs_5[] = {
 	[0] = llc_conn_ev_qlfy_set_status_disc,
 	[1] = NULL,
 };
@@ -547,7 +547,7 @@ static struct llc_conn_state_trans llc_setup_state_trans_5 = {
 };
 
 /* State transitions for LLC_CONN_EV_ACK_TMR_EXP event */
-static llc_conn_ev_qfyr_t llc_setup_ev_qfyrs_7[] = {
+static const llc_conn_ev_qfyr_t llc_setup_ev_qfyrs_7[] = {
 	[0] = llc_conn_ev_qlfy_retry_cnt_lt_n2,
 	[1] = llc_conn_ev_qlfy_s_flag_eq_0,
 	[2] = NULL,
@@ -568,7 +568,7 @@ static struct llc_conn_state_trans llc_setup_state_trans_7 = {
 };
 
 /* State transitions for LLC_CONN_EV_ACK_TMR_EXP event */
-static llc_conn_ev_qfyr_t llc_setup_ev_qfyrs_8[] = {
+static const llc_conn_ev_qfyr_t llc_setup_ev_qfyrs_8[] = {
 	[0] = llc_conn_ev_qlfy_retry_cnt_gte_n2,
 	[1] = llc_conn_ev_qlfy_s_flag_eq_0,
 	[2] = llc_conn_ev_qlfy_set_status_failed,
@@ -609,7 +609,7 @@ static struct llc_conn_state_trans *llc_setup_state_transitions[] = {
 
 /* LLC_CONN_STATE_NORMAL transitions */
 /* State transitions for LLC_CONN_EV_DATA_REQ event */
-static llc_conn_ev_qfyr_t llc_normal_ev_qfyrs_1[] = {
+static const llc_conn_ev_qfyr_t llc_normal_ev_qfyrs_1[] = {
 	[0] = llc_conn_ev_qlfy_remote_busy_eq_0,
 	[1] = llc_conn_ev_qlfy_p_flag_eq_0,
 	[2] = llc_conn_ev_qlfy_last_frame_eq_0,
@@ -630,7 +630,7 @@ static struct llc_conn_state_trans llc_normal_state_trans_1 = {
 };
 
 /* State transitions for LLC_CONN_EV_DATA_REQ event */
-static llc_conn_ev_qfyr_t llc_normal_ev_qfyrs_2[] = {
+static const llc_conn_ev_qfyr_t llc_normal_ev_qfyrs_2[] = {
 	[0] = llc_conn_ev_qlfy_remote_busy_eq_0,
 	[1] = llc_conn_ev_qlfy_p_flag_eq_0,
 	[2] = llc_conn_ev_qlfy_last_frame_eq_1,
@@ -651,7 +651,7 @@ static struct llc_conn_state_trans llc_normal_state_trans_2 = {
 };
 
 /* State transitions for LLC_CONN_EV_DATA_REQ event */
-static llc_conn_ev_qfyr_t llc_normal_ev_qfyrs_2_1[] = {
+static const llc_conn_ev_qfyr_t llc_normal_ev_qfyrs_2_1[] = {
 	[0] = llc_conn_ev_qlfy_remote_busy_eq_1,
 	[1] = llc_conn_ev_qlfy_set_status_remote_busy,
 	[2] = NULL,
@@ -668,7 +668,7 @@ static struct llc_conn_state_trans llc_normal_state_trans_2_1 = {
 };
 
 /* State transitions for LLC_CONN_EV_LOCAL_BUSY_DETECTED event */
-static llc_conn_ev_qfyr_t llc_normal_ev_qfyrs_3[] = {
+static const llc_conn_ev_qfyr_t llc_normal_ev_qfyrs_3[] = {
 	[0] = llc_conn_ev_qlfy_p_flag_eq_0,
 	[1] = NULL,
 };
@@ -688,7 +688,7 @@ static struct llc_conn_state_trans llc_normal_state_trans_3 = {
 };
 
 /* State transitions for LLC_CONN_EV_LOCAL_BUSY_DETECTED event */
-static llc_conn_ev_qfyr_t llc_normal_ev_qfyrs_4[] = {
+static const llc_conn_ev_qfyr_t llc_normal_ev_qfyrs_4[] = {
 	[0] = llc_conn_ev_qlfy_p_flag_eq_1,
 	[1] = NULL,
 };
@@ -708,7 +708,7 @@ static struct llc_conn_state_trans llc_normal_state_trans_4 = {
 };
 
 /* State transitions for LLC_CONN_EV_RX_I_CMD_Pbit_SET_0_UNEXPD_Ns event */
-static llc_conn_ev_qfyr_t llc_normal_ev_qfyrs_5a[] = {
+static const llc_conn_ev_qfyr_t llc_normal_ev_qfyrs_5a[] = {
 	[0] = llc_conn_ev_qlfy_p_flag_eq_0,
 	[1] = NULL,
 };
@@ -731,7 +731,7 @@ static struct llc_conn_state_trans llc_normal_state_trans_5a = {
 };
 
 /* State transitions for LLC_CONN_EV_RX_I_RSP_Fbit_SET_0_UNEXPD_Ns event */
-static llc_conn_ev_qfyr_t llc_normal_ev_qfyrs_5b[] = {
+static const llc_conn_ev_qfyr_t llc_normal_ev_qfyrs_5b[] = {
 	[0] = llc_conn_ev_qlfy_p_flag_eq_0,
 	[1] = NULL,
 };
@@ -754,7 +754,7 @@ static struct llc_conn_state_trans llc_normal_state_trans_5b = {
 };
 
 /* State transitions for LLC_CONN_EV_RX_I_RSP_Fbit_SET_1_UNEXPD_Ns event */
-static llc_conn_ev_qfyr_t llc_normal_ev_qfyrs_5c[] = {
+static const llc_conn_ev_qfyr_t llc_normal_ev_qfyrs_5c[] = {
 	[0] = llc_conn_ev_qlfy_p_flag_eq_1,
 	[1] = NULL,
 };
@@ -777,7 +777,7 @@ static struct llc_conn_state_trans llc_normal_state_trans_5c = {
 };
 
 /* State transitions for LLC_CONN_EV_RX_I_CMD_Pbit_SET_0_UNEXPD_Ns event */
-static llc_conn_ev_qfyr_t llc_normal_ev_qfyrs_6a[] = {
+static const llc_conn_ev_qfyr_t llc_normal_ev_qfyrs_6a[] = {
 	[0] = llc_conn_ev_qlfy_p_flag_eq_1,
 	[1] = NULL,
 };
@@ -798,7 +798,7 @@ static struct llc_conn_state_trans llc_normal_state_trans_6a = {
 };
 
 /* State transitions for LLC_CONN_EV_RX_I_RSP_Fbit_SET_0_UNEXPD_Ns event */
-static llc_conn_ev_qfyr_t llc_normal_ev_qfyrs_6b[] = {
+static const llc_conn_ev_qfyr_t llc_normal_ev_qfyrs_6b[] = {
 	[0] = llc_conn_ev_qlfy_p_flag_eq_1,
 	[1] = NULL,
 };
@@ -835,7 +835,7 @@ static struct llc_conn_state_trans llc_normal_state_trans_7 = {
 };
 
 /* State transitions for LLC_CONN_EV_RX_I_RSP_Fbit_SET_X event */
-static llc_conn_ev_qfyr_t llc_normal_ev_qfyrs_8a[] = {
+static const llc_conn_ev_qfyr_t llc_normal_ev_qfyrs_8a[] = {
 	[0] = llc_conn_ev_qlfy_p_flag_eq_f,
 	[1] = NULL,
 };
@@ -858,7 +858,7 @@ static struct llc_conn_state_trans llc_normal_state_trans_8a = {
 };
 
 /* State transitions for LLC_CONN_EV_RX_I_CMD_Pbit_SET_0 event */
-static llc_conn_ev_qfyr_t llc_normal_ev_qfyrs_8b[] = {
+static const llc_conn_ev_qfyr_t llc_normal_ev_qfyrs_8b[] = {
 	[0] = llc_conn_ev_qlfy_p_flag_eq_0,
 	[1] = NULL,
 };
@@ -871,7 +871,7 @@ static struct llc_conn_state_trans llc_normal_state_trans_8b = {
 };
 
 /* State transitions for LLC_CONN_EV_RX_I_RSP_Fbit_SET_0 event */
-static llc_conn_ev_qfyr_t llc_normal_ev_qfyrs_9a[] = {
+static const llc_conn_ev_qfyr_t llc_normal_ev_qfyrs_9a[] = {
 	[0] = llc_conn_ev_qlfy_p_flag_eq_1,
 	[1] = NULL,
 };
@@ -892,7 +892,7 @@ static struct llc_conn_state_trans llc_normal_state_trans_9a = {
 };
 
 /* State transitions for LLC_CONN_EV_RX_I_CMD_Pbit_SET_0 event */
-static llc_conn_ev_qfyr_t llc_normal_ev_qfyrs_9b[] = {
+static const llc_conn_ev_qfyr_t llc_normal_ev_qfyrs_9b[] = {
 	[0] = llc_conn_ev_qlfy_p_flag_eq_1,
 	[1] = NULL,
 };
@@ -960,7 +960,7 @@ static struct llc_conn_state_trans llc_normal_state_trans_11b = {
 };
 
 /* State transitions for LLC_CONN_EV_RX_RR_RSP_Fbit_SET_1 event */
-static llc_conn_ev_qfyr_t llc_normal_ev_qfyrs_11c[] = {
+static const llc_conn_ev_qfyr_t llc_normal_ev_qfyrs_11c[] = {
 	[0] = llc_conn_ev_qlfy_p_flag_eq_1,
 	[1] = NULL,
 };
@@ -1028,7 +1028,7 @@ static struct llc_conn_state_trans llc_normal_state_trans_13b = {
 };
 
 /* State transitions for LLC_CONN_EV_RX_RNR_RSP_Fbit_SET_1 event */
-static llc_conn_ev_qfyr_t llc_normal_ev_qfyrs_13c[] = {
+static const llc_conn_ev_qfyr_t llc_normal_ev_qfyrs_13c[] = {
 	[0] = llc_conn_ev_qlfy_p_flag_eq_1,
 	[1] = NULL,
 };
@@ -1065,7 +1065,7 @@ static struct llc_conn_state_trans llc_normal_state_trans_14 = {
 };
 
 /* State transitions for LLC_CONN_EV_RX_REJ_CMD_Pbit_SET_0 event */
-static llc_conn_ev_qfyr_t llc_normal_ev_qfyrs_15a[] = {
+static const llc_conn_ev_qfyr_t llc_normal_ev_qfyrs_15a[] = {
 	[0] = llc_conn_ev_qlfy_p_flag_eq_0,
 	[1] = NULL,
 };
@@ -1088,7 +1088,7 @@ static struct llc_conn_state_trans llc_normal_state_trans_15a = {
 };
 
 /* State transitions for LLC_CONN_EV_RX_REJ_RSP_Fbit_SET_X event */
-static llc_conn_ev_qfyr_t llc_normal_ev_qfyrs_15b[] = {
+static const llc_conn_ev_qfyr_t llc_normal_ev_qfyrs_15b[] = {
 	[0] = llc_conn_ev_qlfy_p_flag_eq_f,
 	[1] = NULL,
 };
@@ -1111,7 +1111,7 @@ static struct llc_conn_state_trans llc_normal_state_trans_15b = {
 };
 
 /* State transitions for LLC_CONN_EV_RX_REJ_CMD_Pbit_SET_0 event */
-static llc_conn_ev_qfyr_t llc_normal_ev_qfyrs_16a[] = {
+static const llc_conn_ev_qfyr_t llc_normal_ev_qfyrs_16a[] = {
 	[0] = llc_conn_ev_qlfy_p_flag_eq_1,
 	[1] = NULL,
 };
@@ -1133,7 +1133,7 @@ static struct llc_conn_state_trans llc_normal_state_trans_16a = {
 };
 
 /* State transitions for LLC_CONN_EV_RX_REJ_RSP_Fbit_SET_0 event */
-static llc_conn_ev_qfyr_t llc_normal_ev_qfyrs_16b[] = {
+static const llc_conn_ev_qfyr_t llc_normal_ev_qfyrs_16b[] = {
 	[0] = llc_conn_ev_qlfy_p_flag_eq_1,
 	[1] = NULL,
 };
@@ -1172,7 +1172,7 @@ static struct llc_conn_state_trans llc_normal_state_trans_17 = {
 };
 
 /* State transitions for LLC_CONN_EV_INIT_P_F_CYCLE event */
-static llc_conn_ev_qfyr_t llc_normal_ev_qfyrs_18[] = {
+static const llc_conn_ev_qfyr_t llc_normal_ev_qfyrs_18[] = {
 	[0] = llc_conn_ev_qlfy_p_flag_eq_0,
 	[1] = NULL,
 };
@@ -1191,7 +1191,7 @@ static struct llc_conn_state_trans llc_normal_state_trans_18 = {
 };
 
 /* State transitions for LLC_CONN_EV_P_TMR_EXP event */
-static llc_conn_ev_qfyr_t llc_normal_ev_qfyrs_19[] = {
+static const llc_conn_ev_qfyr_t llc_normal_ev_qfyrs_19[] = {
 	[0] = llc_conn_ev_qlfy_retry_cnt_lt_n2,
 	[1] = NULL,
 };
@@ -1213,7 +1213,7 @@ static struct llc_conn_state_trans llc_normal_state_trans_19 = {
 };
 
 /* State transitions for LLC_CONN_EV_ACK_TMR_EXP event */
-static llc_conn_ev_qfyr_t llc_normal_ev_qfyrs_20a[] = {
+static const llc_conn_ev_qfyr_t llc_normal_ev_qfyrs_20a[] = {
 	[0] = llc_conn_ev_qlfy_p_flag_eq_0,
 	[1] = llc_conn_ev_qlfy_retry_cnt_lt_n2,
 	[2] = NULL,
@@ -1236,7 +1236,7 @@ static struct llc_conn_state_trans llc_normal_state_trans_20a = {
 };
 
 /* State transitions for LLC_CONN_EV_BUSY_TMR_EXP event */
-static llc_conn_ev_qfyr_t llc_normal_ev_qfyrs_20b[] = {
+static const llc_conn_ev_qfyr_t llc_normal_ev_qfyrs_20b[] = {
 	[0] = llc_conn_ev_qlfy_p_flag_eq_0,
 	[1] = llc_conn_ev_qlfy_retry_cnt_lt_n2,
 	[2] = NULL,
@@ -1259,7 +1259,7 @@ static struct llc_conn_state_trans llc_normal_state_trans_20b = {
 };
 
 /* State transitions for LLC_CONN_EV_TX_BUFF_FULL event */
-static llc_conn_ev_qfyr_t llc_normal_ev_qfyrs_21[] = {
+static const llc_conn_ev_qfyr_t llc_normal_ev_qfyrs_21[] = {
 	[0] = llc_conn_ev_qlfy_p_flag_eq_0,
 	[1] = NULL,
 };
@@ -1342,7 +1342,7 @@ static struct llc_conn_state_trans *llc_normal_state_transitions[] = {
 
 /* LLC_CONN_STATE_BUSY transitions */
 /* State transitions for LLC_CONN_EV_DATA_REQ event */
-static llc_conn_ev_qfyr_t llc_busy_ev_qfyrs_1[] = {
+static const llc_conn_ev_qfyr_t llc_busy_ev_qfyrs_1[] = {
 	[0] = llc_conn_ev_qlfy_remote_busy_eq_0,
 	[1] = llc_conn_ev_qlfy_p_flag_eq_0,
 	[2] = NULL,
@@ -1362,7 +1362,7 @@ static struct llc_conn_state_trans llc_busy_state_trans_1 = {
 };
 
 /* State transitions for LLC_CONN_EV_DATA_REQ event */
-static llc_conn_ev_qfyr_t llc_busy_ev_qfyrs_2[] = {
+static const llc_conn_ev_qfyr_t llc_busy_ev_qfyrs_2[] = {
 	[0] = llc_conn_ev_qlfy_remote_busy_eq_0,
 	[1] = llc_conn_ev_qlfy_p_flag_eq_1,
 	[2] = NULL,
@@ -1382,7 +1382,7 @@ static struct llc_conn_state_trans llc_busy_state_trans_2 = {
 };
 
 /* State transitions for LLC_CONN_EV_DATA_REQ event */
-static llc_conn_ev_qfyr_t llc_busy_ev_qfyrs_2_1[] = {
+static const llc_conn_ev_qfyr_t llc_busy_ev_qfyrs_2_1[] = {
 	[0] = llc_conn_ev_qlfy_remote_busy_eq_1,
 	[1] = llc_conn_ev_qlfy_set_status_remote_busy,
 	[2] = NULL,
@@ -1399,7 +1399,7 @@ static struct llc_conn_state_trans llc_busy_state_trans_2_1 = {
 };
 
 /* State transitions for LLC_CONN_EV_LOCAL_BUSY_CLEARED event */
-static llc_conn_ev_qfyr_t llc_busy_ev_qfyrs_3[] = {
+static const llc_conn_ev_qfyr_t llc_busy_ev_qfyrs_3[] = {
 	[0] = llc_conn_ev_qlfy_data_flag_eq_1,
 	[1] = llc_conn_ev_qlfy_p_flag_eq_0,
 	[2] = NULL,
@@ -1419,7 +1419,7 @@ static struct llc_conn_state_trans llc_busy_state_trans_3 = {
 };
 
 /* State transitions for LLC_CONN_EV_LOCAL_BUSY_CLEARED event */
-static llc_conn_ev_qfyr_t llc_busy_ev_qfyrs_4[] = {
+static const llc_conn_ev_qfyr_t llc_busy_ev_qfyrs_4[] = {
 	[0] = llc_conn_ev_qlfy_data_flag_eq_1,
 	[1] = llc_conn_ev_qlfy_p_flag_eq_1,
 	[2] = NULL,
@@ -1439,7 +1439,7 @@ static struct llc_conn_state_trans llc_busy_state_trans_4 = {
 };
 
 /* State transitions for LLC_CONN_EV_LOCAL_BUSY_CLEARED event */
-static llc_conn_ev_qfyr_t llc_busy_ev_qfyrs_5[] = {
+static const llc_conn_ev_qfyr_t llc_busy_ev_qfyrs_5[] = {
 	[0] = llc_conn_ev_qlfy_data_flag_eq_0,
 	[1] = llc_conn_ev_qlfy_p_flag_eq_0,
 	[2] = NULL,
@@ -1458,7 +1458,7 @@ static struct llc_conn_state_trans llc_busy_state_trans_5 = {
 };
 
 /* State transitions for LLC_CONN_EV_LOCAL_BUSY_CLEARED event */
-static llc_conn_ev_qfyr_t llc_busy_ev_qfyrs_6[] = {
+static const llc_conn_ev_qfyr_t llc_busy_ev_qfyrs_6[] = {
 	[0] = llc_conn_ev_qlfy_data_flag_eq_0,
 	[1] = llc_conn_ev_qlfy_p_flag_eq_1,
 	[2] = NULL,
@@ -1477,7 +1477,7 @@ static struct llc_conn_state_trans llc_busy_state_trans_6 = {
 };
 
 /* State transitions for LLC_CONN_EV_LOCAL_BUSY_CLEARED event */
-static llc_conn_ev_qfyr_t llc_busy_ev_qfyrs_7[] = {
+static const llc_conn_ev_qfyr_t llc_busy_ev_qfyrs_7[] = {
 	[0] = llc_conn_ev_qlfy_data_flag_eq_2,
 	[1] = llc_conn_ev_qlfy_p_flag_eq_0,
 	[2] = NULL,
@@ -1496,7 +1496,7 @@ static struct llc_conn_state_trans llc_busy_state_trans_7 = {
 };
 
 /* State transitions for LLC_CONN_EV_LOCAL_BUSY_CLEARED event */
-static llc_conn_ev_qfyr_t llc_busy_ev_qfyrs_8[] = {
+static const llc_conn_ev_qfyr_t llc_busy_ev_qfyrs_8[] = {
 	[0] = llc_conn_ev_qlfy_data_flag_eq_2,
 	[1] = llc_conn_ev_qlfy_p_flag_eq_1,
 	[2] = NULL,
@@ -1515,7 +1515,7 @@ static struct llc_conn_state_trans llc_busy_state_trans_8 = {
 };
 
 /* State transitions for LLC_CONN_EV_RX_I_RSP_Fbit_SET_X_UNEXPD_Ns event */
-static llc_conn_ev_qfyr_t llc_busy_ev_qfyrs_9a[] = {
+static const llc_conn_ev_qfyr_t llc_busy_ev_qfyrs_9a[] = {
 	[0] = llc_conn_ev_qlfy_p_flag_eq_f,
 	[1] = NULL,
 };
@@ -1537,7 +1537,7 @@ static struct llc_conn_state_trans llc_busy_state_trans_9a = {
 };
 
 /* State transitions for LLC_CONN_EV_RX_I_CMD_Pbit_SET_0_UNEXPD_Ns event */
-static llc_conn_ev_qfyr_t llc_busy_ev_qfyrs_9b[] = {
+static const llc_conn_ev_qfyr_t llc_busy_ev_qfyrs_9b[] = {
 	[0] = llc_conn_ev_qlfy_p_flag_eq_0,
 	[1] = NULL,
 };
@@ -1559,7 +1559,7 @@ static struct llc_conn_state_trans llc_busy_state_trans_9b = {
 };
 
 /* State transitions for LLC_CONN_EV_RX_I_RSP_Fbit_SET_0_UNEXPD_Ns event */
-static llc_conn_ev_qfyr_t llc_busy_ev_qfyrs_10a[] = {
+static const llc_conn_ev_qfyr_t llc_busy_ev_qfyrs_10a[] = {
 	[0] = llc_conn_ev_qlfy_p_flag_eq_1,
 	[1] = NULL,
 };
@@ -1579,7 +1579,7 @@ static struct llc_conn_state_trans llc_busy_state_trans_10a = {
 };
 
 /* State transitions for LLC_CONN_EV_RX_I_CMD_Pbit_SET_0_UNEXPD_Ns event */
-static llc_conn_ev_qfyr_t llc_busy_ev_qfyrs_10b[] = {
+static const llc_conn_ev_qfyr_t llc_busy_ev_qfyrs_10b[] = {
 	[0] = llc_conn_ev_qlfy_p_flag_eq_1,
 	[1] = NULL,
 };
@@ -1632,7 +1632,7 @@ static struct llc_conn_state_trans llc_busy_state_trans_12 = {
 };
 
 /* State transitions for LLC_CONN_EV_RX_I_RSP_Fbit_SET_X event */
-static llc_conn_ev_qfyr_t llc_busy_ev_qfyrs_13a[] = {
+static const llc_conn_ev_qfyr_t llc_busy_ev_qfyrs_13a[] = {
 	[0] = llc_conn_ev_qlfy_p_flag_eq_f,
 	[1] = NULL,
 };
@@ -1657,7 +1657,7 @@ static struct llc_conn_state_trans llc_busy_state_trans_13a = {
 };
 
 /* State transitions for LLC_CONN_EV_RX_I_CMD_Pbit_SET_0 event */
-static llc_conn_ev_qfyr_t llc_busy_ev_qfyrs_13b[] = {
+static const llc_conn_ev_qfyr_t llc_busy_ev_qfyrs_13b[] = {
 	[0] = llc_conn_ev_qlfy_p_flag_eq_0,
 	[1] = NULL,
 };
@@ -1682,7 +1682,7 @@ static struct llc_conn_state_trans llc_busy_state_trans_13b = {
 };
 
 /* State transitions for LLC_CONN_EV_RX_I_RSP_Fbit_SET_0 event */
-static llc_conn_ev_qfyr_t llc_busy_ev_qfyrs_14a[] = {
+static const llc_conn_ev_qfyr_t llc_busy_ev_qfyrs_14a[] = {
 	[0] = llc_conn_ev_qlfy_p_flag_eq_1,
 	[1] = NULL,
 };
@@ -1705,7 +1705,7 @@ static struct llc_conn_state_trans llc_busy_state_trans_14a = {
 };
 
 /* State transitions for LLC_CONN_EV_RX_I_CMD_Pbit_SET_0 event */
-static llc_conn_ev_qfyr_t llc_busy_ev_qfyrs_14b[] = {
+static const llc_conn_ev_qfyr_t llc_busy_ev_qfyrs_14b[] = {
 	[0] = llc_conn_ev_qlfy_p_flag_eq_1,
 	[1] = NULL,
 };
@@ -1758,7 +1758,7 @@ static struct llc_conn_state_trans llc_busy_state_trans_15b = {
 };
 
 /* State transitions for LLC_CONN_EV_RX_RR_RSP_Fbit_SET_1 event */
-static llc_conn_ev_qfyr_t llc_busy_ev_qfyrs_15c[] = {
+static const llc_conn_ev_qfyr_t llc_busy_ev_qfyrs_15c[] = {
 	[0] = llc_conn_ev_qlfy_p_flag_eq_1,
 	[1] = NULL,
 };
@@ -1823,7 +1823,7 @@ static struct llc_conn_state_trans llc_busy_state_trans_17b = {
 };
 
 /* State transitions for LLC_CONN_EV_RX_RNR_RSP_Fbit_SET_1 event */
-static llc_conn_ev_qfyr_t llc_busy_ev_qfyrs_17c[] = {
+static const llc_conn_ev_qfyr_t llc_busy_ev_qfyrs_17c[] = {
 	[0] = llc_conn_ev_qlfy_p_flag_eq_1,
 	[1] = NULL,
 };
@@ -1858,7 +1858,7 @@ static struct llc_conn_state_trans llc_busy_state_trans_18 = {
 };
 
 /* State transitions for LLC_CONN_EV_RX_REJ_CMD_Pbit_SET_0 event */
-static llc_conn_ev_qfyr_t llc_busy_ev_qfyrs_19a[] = {
+static const llc_conn_ev_qfyr_t llc_busy_ev_qfyrs_19a[] = {
 	[0] = llc_conn_ev_qlfy_p_flag_eq_0,
 	[1] = NULL,
 };
@@ -1880,7 +1880,7 @@ static struct llc_conn_state_trans llc_busy_state_trans_19a = {
 };
 
 /* State transitions for LLC_CONN_EV_RX_REJ_RSP_Fbit_SET_X event */
-static llc_conn_ev_qfyr_t llc_busy_ev_qfyrs_19b[] = {
+static const llc_conn_ev_qfyr_t llc_busy_ev_qfyrs_19b[] = {
 	[0] = llc_conn_ev_qlfy_p_flag_eq_f,
 	[1] = NULL,
 };
@@ -1902,7 +1902,7 @@ static struct llc_conn_state_trans llc_busy_state_trans_19b = {
 };
 
 /* State transitions for LLC_CONN_EV_RX_REJ_CMD_Pbit_SET_0 event */
-static llc_conn_ev_qfyr_t llc_busy_ev_qfyrs_20a[] = {
+static const llc_conn_ev_qfyr_t llc_busy_ev_qfyrs_20a[] = {
 	[0] = llc_conn_ev_qlfy_p_flag_eq_1,
 	[1] = NULL,
 };
@@ -1923,7 +1923,7 @@ static struct llc_conn_state_trans llc_busy_state_trans_20a = {
 };
 
 /* State transitions for LLC_CONN_EV_RX_REJ_RSP_Fbit_SET_0 event */
-static llc_conn_ev_qfyr_t llc_busy_ev_qfyrs_20b[] = {
+static const llc_conn_ev_qfyr_t llc_busy_ev_qfyrs_20b[] = {
 	[0] = llc_conn_ev_qlfy_p_flag_eq_1,
 	[1] = NULL,
 };
@@ -1961,7 +1961,7 @@ static struct llc_conn_state_trans llc_busy_state_trans_21 = {
 };
 
 /* State transitions for LLC_CONN_EV_INIT_P_F_CYCLE event */
-static llc_conn_ev_qfyr_t llc_busy_ev_qfyrs_22[] = {
+static const llc_conn_ev_qfyr_t llc_busy_ev_qfyrs_22[] = {
 	[0] = llc_conn_ev_qlfy_p_flag_eq_0,
 	[1] = NULL,
 };
@@ -1980,7 +1980,7 @@ static struct llc_conn_state_trans llc_busy_state_trans_22 = {
 };
 
 /* State transitions for LLC_CONN_EV_P_TMR_EXP event */
-static llc_conn_ev_qfyr_t llc_busy_ev_qfyrs_23[] = {
+static const llc_conn_ev_qfyr_t llc_busy_ev_qfyrs_23[] = {
 	[0] = llc_conn_ev_qlfy_retry_cnt_lt_n2,
 	[1] = NULL,
 };
@@ -2001,7 +2001,7 @@ static struct llc_conn_state_trans llc_busy_state_trans_23 = {
 };
 
 /* State transitions for LLC_CONN_EV_ACK_TMR_EXP event */
-static llc_conn_ev_qfyr_t llc_busy_ev_qfyrs_24a[] = {
+static const llc_conn_ev_qfyr_t llc_busy_ev_qfyrs_24a[] = {
 	[0] = llc_conn_ev_qlfy_p_flag_eq_0,
 	[1] = llc_conn_ev_qlfy_retry_cnt_lt_n2,
 	[2] = NULL,
@@ -2023,7 +2023,7 @@ static struct llc_conn_state_trans llc_busy_state_trans_24a = {
 };
 
 /* State transitions for LLC_CONN_EV_BUSY_TMR_EXP event */
-static llc_conn_ev_qfyr_t llc_busy_ev_qfyrs_24b[] = {
+static const llc_conn_ev_qfyr_t llc_busy_ev_qfyrs_24b[] = {
 	[0] = llc_conn_ev_qlfy_p_flag_eq_0,
 	[1] = llc_conn_ev_qlfy_retry_cnt_lt_n2,
 	[2] = NULL,
@@ -2045,7 +2045,7 @@ static struct llc_conn_state_trans llc_busy_state_trans_24b = {
 };
 
 /* State transitions for LLC_CONN_EV_REJ_TMR_EXP event */
-static llc_conn_ev_qfyr_t llc_busy_ev_qfyrs_25[] = {
+static const llc_conn_ev_qfyr_t llc_busy_ev_qfyrs_25[] = {
 	[0] = llc_conn_ev_qlfy_p_flag_eq_0,
 	[1] = llc_conn_ev_qlfy_retry_cnt_lt_n2,
 	[2] = NULL,
@@ -2068,7 +2068,7 @@ static struct llc_conn_state_trans llc_busy_state_trans_25 = {
 };
 
 /* State transitions for LLC_CONN_EV_REJ_TMR_EXP event */
-static llc_conn_ev_qfyr_t llc_busy_ev_qfyrs_26[] = {
+static const llc_conn_ev_qfyr_t llc_busy_ev_qfyrs_26[] = {
 	[0] = llc_conn_ev_qlfy_p_flag_eq_1,
 	[1] = llc_conn_ev_qlfy_retry_cnt_lt_n2,
 	[2] = NULL,
@@ -2155,7 +2155,7 @@ static struct llc_conn_state_trans *llc_busy_state_transitions[] = {
 
 /* LLC_CONN_STATE_REJ transitions */
 /* State transitions for LLC_CONN_EV_DATA_REQ event */
-static llc_conn_ev_qfyr_t llc_reject_ev_qfyrs_1[] = {
+static const llc_conn_ev_qfyr_t llc_reject_ev_qfyrs_1[] = {
 	[0] = llc_conn_ev_qlfy_remote_busy_eq_0,
 	[1] = llc_conn_ev_qlfy_p_flag_eq_0,
 	[2] = NULL,
@@ -2174,7 +2174,7 @@ static struct llc_conn_state_trans llc_reject_state_trans_1 = {
 };
 
 /* State transitions for LLC_CONN_EV_DATA_REQ event */
-static llc_conn_ev_qfyr_t llc_reject_ev_qfyrs_2[] = {
+static const llc_conn_ev_qfyr_t llc_reject_ev_qfyrs_2[] = {
 	[0] = llc_conn_ev_qlfy_remote_busy_eq_0,
 	[1] = llc_conn_ev_qlfy_p_flag_eq_1,
 	[2] = NULL,
@@ -2193,7 +2193,7 @@ static struct llc_conn_state_trans llc_reject_state_trans_2 = {
 };
 
 /* State transitions for LLC_CONN_EV_DATA_REQ event */
-static llc_conn_ev_qfyr_t llc_reject_ev_qfyrs_2_1[] = {
+static const llc_conn_ev_qfyr_t llc_reject_ev_qfyrs_2_1[] = {
 	[0] = llc_conn_ev_qlfy_remote_busy_eq_1,
 	[1] = llc_conn_ev_qlfy_set_status_remote_busy,
 	[2] = NULL,
@@ -2211,7 +2211,7 @@ static struct llc_conn_state_trans llc_reject_state_trans_2_1 = {
 
 
 /* State transitions for LLC_CONN_EV_LOCAL_BUSY_DETECTED event */
-static llc_conn_ev_qfyr_t llc_reject_ev_qfyrs_3[] = {
+static const llc_conn_ev_qfyr_t llc_reject_ev_qfyrs_3[] = {
 	[0] = llc_conn_ev_qlfy_p_flag_eq_0,
 	[1] = NULL,
 };
@@ -2230,7 +2230,7 @@ static struct llc_conn_state_trans llc_reject_state_trans_3 = {
 };
 
 /* State transitions for LLC_CONN_EV_LOCAL_BUSY_DETECTED event */
-static llc_conn_ev_qfyr_t llc_reject_ev_qfyrs_4[] = {
+static const llc_conn_ev_qfyr_t llc_reject_ev_qfyrs_4[] = {
 	[0] = llc_conn_ev_qlfy_p_flag_eq_1,
 	[1] = NULL,
 };
@@ -2279,7 +2279,7 @@ static struct llc_conn_state_trans llc_reject_state_trans_5b = {
 };
 
 /* State transitions for LLC_CONN_EV_RX_I_RSP_Fbit_SET_1_UNEXPD_Ns event */
-static llc_conn_ev_qfyr_t llc_reject_ev_qfyrs_5c[] = {
+static const llc_conn_ev_qfyr_t llc_reject_ev_qfyrs_5c[] = {
 	[0] = llc_conn_ev_qlfy_p_flag_eq_1,
 	[1] = NULL,
 };
@@ -2313,7 +2313,7 @@ static struct llc_conn_state_trans llc_reject_state_trans_6 = {
 };
 
 /* State transitions for LLC_CONN_EV_RX_I_RSP_Fbit_SET_X event */
-static llc_conn_ev_qfyr_t llc_reject_ev_qfyrs_7a[] = {
+static const llc_conn_ev_qfyr_t llc_reject_ev_qfyrs_7a[] = {
 	[0] = llc_conn_ev_qlfy_p_flag_eq_f,
 	[1] = NULL,
 };
@@ -2338,7 +2338,7 @@ static struct llc_conn_state_trans llc_reject_state_trans_7a = {
 };
 
 /* State transitions for LLC_CONN_EV_RX_I_CMD_Pbit_SET_0 event */
-static llc_conn_ev_qfyr_t llc_reject_ev_qfyrs_7b[] = {
+static const llc_conn_ev_qfyr_t llc_reject_ev_qfyrs_7b[] = {
 	[0] = llc_conn_ev_qlfy_p_flag_eq_0,
 	[1] = NULL,
 };
@@ -2362,7 +2362,7 @@ static struct llc_conn_state_trans llc_reject_state_trans_7b = {
 };
 
 /* State transitions for LLC_CONN_EV_RX_I_RSP_Fbit_SET_0 event */
-static llc_conn_ev_qfyr_t llc_reject_ev_qfyrs_8a[] = {
+static const llc_conn_ev_qfyr_t llc_reject_ev_qfyrs_8a[] = {
 	[0] = llc_conn_ev_qlfy_p_flag_eq_1,
 	[1] = NULL,
 };
@@ -2384,7 +2384,7 @@ static struct llc_conn_state_trans llc_reject_state_trans_8a = {
 };
 
 /* State transitions for LLC_CONN_EV_RX_I_CMD_Pbit_SET_0 event */
-static llc_conn_ev_qfyr_t llc_reject_ev_qfyrs_8b[] = {
+static const llc_conn_ev_qfyr_t llc_reject_ev_qfyrs_8b[] = {
 	[0] = llc_conn_ev_qlfy_p_flag_eq_1,
 	[1] = NULL,
 };
@@ -2453,7 +2453,7 @@ static struct llc_conn_state_trans llc_reject_state_trans_10b = {
 };
 
 /* State transitions for LLC_CONN_EV_RX_RR_RSP_Fbit_SET_1 event */
-static llc_conn_ev_qfyr_t llc_reject_ev_qfyrs_10c[] = {
+static const llc_conn_ev_qfyr_t llc_reject_ev_qfyrs_10c[] = {
 	[0] = llc_conn_ev_qlfy_p_flag_eq_1,
 	[1] = NULL,
 };
@@ -2518,7 +2518,7 @@ static struct llc_conn_state_trans llc_reject_state_trans_12b = {
 };
 
 /* State transitions for LLC_CONN_EV_RX_RNR_RSP_Fbit_SET_1 event */
-static llc_conn_ev_qfyr_t llc_reject_ev_qfyrs_12c[] = {
+static const llc_conn_ev_qfyr_t llc_reject_ev_qfyrs_12c[] = {
 	[0] = llc_conn_ev_qlfy_p_flag_eq_1,
 	[1] = NULL,
 };
@@ -2553,7 +2553,7 @@ static struct llc_conn_state_trans llc_reject_state_trans_13 = {
 };
 
 /* State transitions for LLC_CONN_EV_RX_REJ_CMD_Pbit_SET_0 event */
-static llc_conn_ev_qfyr_t llc_reject_ev_qfyrs_14a[] = {
+static const llc_conn_ev_qfyr_t llc_reject_ev_qfyrs_14a[] = {
 	[0] = llc_conn_ev_qlfy_p_flag_eq_0,
 	[1] = NULL,
 };
@@ -2575,7 +2575,7 @@ static struct llc_conn_state_trans llc_reject_state_trans_14a = {
 };
 
 /* State transitions for LLC_CONN_EV_RX_REJ_RSP_Fbit_SET_X event */
-static llc_conn_ev_qfyr_t llc_reject_ev_qfyrs_14b[] = {
+static const llc_conn_ev_qfyr_t llc_reject_ev_qfyrs_14b[] = {
 	[0] = llc_conn_ev_qlfy_p_flag_eq_f,
 	[1] = NULL,
 };
@@ -2597,7 +2597,7 @@ static struct llc_conn_state_trans llc_reject_state_trans_14b = {
 };
 
 /* State transitions for LLC_CONN_EV_RX_REJ_CMD_Pbit_SET_0 event */
-static llc_conn_ev_qfyr_t llc_reject_ev_qfyrs_15a[] = {
+static const llc_conn_ev_qfyr_t llc_reject_ev_qfyrs_15a[] = {
 	[0] = llc_conn_ev_qlfy_p_flag_eq_1,
 	[1] = NULL,
 };
@@ -2618,7 +2618,7 @@ static struct llc_conn_state_trans llc_reject_state_trans_15a = {
 };
 
 /* State transitions for LLC_CONN_EV_RX_REJ_RSP_Fbit_SET_0 event */
-static llc_conn_ev_qfyr_t llc_reject_ev_qfyrs_15b[] = {
+static const llc_conn_ev_qfyr_t llc_reject_ev_qfyrs_15b[] = {
 	[0] = llc_conn_ev_qlfy_p_flag_eq_1,
 	[1] = NULL,
 };
@@ -2655,7 +2655,7 @@ static struct llc_conn_state_trans llc_reject_state_trans_16 = {
 };
 
 /* State transitions for LLC_CONN_EV_INIT_P_F_CYCLE event */
-static llc_conn_ev_qfyr_t llc_reject_ev_qfyrs_17[] = {
+static const llc_conn_ev_qfyr_t llc_reject_ev_qfyrs_17[] = {
 	[0] = llc_conn_ev_qlfy_p_flag_eq_0,
 	[1] = NULL,
 };
@@ -2674,7 +2674,7 @@ static struct llc_conn_state_trans llc_reject_state_trans_17 = {
 };
 
 /* State transitions for LLC_CONN_EV_REJ_TMR_EXP event */
-static llc_conn_ev_qfyr_t llc_reject_ev_qfyrs_18[] = {
+static const llc_conn_ev_qfyr_t llc_reject_ev_qfyrs_18[] = {
 	[0] = llc_conn_ev_qlfy_p_flag_eq_0,
 	[1] = llc_conn_ev_qlfy_retry_cnt_lt_n2,
 	[2] = NULL,
@@ -2696,7 +2696,7 @@ static struct llc_conn_state_trans llc_reject_state_trans_18 = {
 };
 
 /* State transitions for LLC_CONN_EV_P_TMR_EXP event */
-static llc_conn_ev_qfyr_t llc_reject_ev_qfyrs_19[] = {
+static const llc_conn_ev_qfyr_t llc_reject_ev_qfyrs_19[] = {
 	[0] = llc_conn_ev_qlfy_retry_cnt_lt_n2,
 	[1] = NULL,
 };
@@ -2718,7 +2718,7 @@ static struct llc_conn_state_trans llc_reject_state_trans_19 = {
 };
 
 /* State transitions for LLC_CONN_EV_ACK_TMR_EXP event */
-static llc_conn_ev_qfyr_t llc_reject_ev_qfyrs_20a[] = {
+static const llc_conn_ev_qfyr_t llc_reject_ev_qfyrs_20a[] = {
 	[0] = llc_conn_ev_qlfy_p_flag_eq_0,
 	[1] = llc_conn_ev_qlfy_retry_cnt_lt_n2,
 	[2] = NULL,
@@ -2741,7 +2741,7 @@ static struct llc_conn_state_trans llc_reject_state_trans_20a = {
 };
 
 /* State transitions for LLC_CONN_EV_BUSY_TMR_EXP event */
-static llc_conn_ev_qfyr_t llc_reject_ev_qfyrs_20b[] = {
+static const llc_conn_ev_qfyr_t llc_reject_ev_qfyrs_20b[] = {
 	[0] = llc_conn_ev_qlfy_p_flag_eq_0,
 	[1] = llc_conn_ev_qlfy_retry_cnt_lt_n2,
 	[2] = NULL,
@@ -2826,7 +2826,7 @@ static struct llc_conn_state_trans *llc_reject_state_transitions[] = {
 
 /* LLC_CONN_STATE_AWAIT transitions */
 /* State transitions for LLC_CONN_EV_DATA_REQ event */
-static llc_conn_ev_qfyr_t llc_await_ev_qfyrs_1_0[] = {
+static const llc_conn_ev_qfyr_t llc_await_ev_qfyrs_1_0[] = {
 	[0] = llc_conn_ev_qlfy_set_status_refuse,
 	[1] = NULL,
 };
@@ -3182,7 +3182,7 @@ static struct llc_conn_state_trans llc_await_state_trans_13 = {
 };
 
 /* State transitions for LLC_CONN_EV_P_TMR_EXP event */
-static llc_conn_ev_qfyr_t llc_await_ev_qfyrs_14[] = {
+static const llc_conn_ev_qfyr_t llc_await_ev_qfyrs_14[] = {
 	[0] = llc_conn_ev_qlfy_retry_cnt_lt_n2,
 	[1] = NULL,
 };
@@ -3255,7 +3255,7 @@ static struct llc_conn_state_trans *llc_await_state_transitions[] = {
 
 /* LLC_CONN_STATE_AWAIT_BUSY transitions */
 /* State transitions for LLC_CONN_EV_DATA_CONN_REQ event */
-static llc_conn_ev_qfyr_t llc_await_busy_ev_qfyrs_1_0[] = {
+static const llc_conn_ev_qfyr_t llc_await_busy_ev_qfyrs_1_0[] = {
 	[0] = llc_conn_ev_qlfy_set_status_refuse,
 	[1] = NULL,
 };
@@ -3271,7 +3271,7 @@ static struct llc_conn_state_trans llc_await_busy_state_trans_1_0 = {
 };
 
 /* State transitions for LLC_CONN_EV_LOCAL_BUSY_CLEARED event */
-static llc_conn_ev_qfyr_t llc_await_busy_ev_qfyrs_1[] = {
+static const llc_conn_ev_qfyr_t llc_await_busy_ev_qfyrs_1[] = {
 	[0] = llc_conn_ev_qlfy_data_flag_eq_1,
 	[1] = NULL,
 };
@@ -3290,7 +3290,7 @@ static struct llc_conn_state_trans llc_await_busy_state_trans_1 = {
 };
 
 /* State transitions for LLC_CONN_EV_LOCAL_BUSY_CLEARED event */
-static llc_conn_ev_qfyr_t llc_await_busy_ev_qfyrs_2[] = {
+static const llc_conn_ev_qfyr_t llc_await_busy_ev_qfyrs_2[] = {
 	[0] = llc_conn_ev_qlfy_data_flag_eq_0,
 	[1] = NULL,
 };
@@ -3308,7 +3308,7 @@ static struct llc_conn_state_trans llc_await_busy_state_trans_2 = {
 };
 
 /* State transitions for LLC_CONN_EV_LOCAL_BUSY_CLEARED event */
-static llc_conn_ev_qfyr_t llc_await_busy_ev_qfyrs_3[] = {
+static const llc_conn_ev_qfyr_t llc_await_busy_ev_qfyrs_3[] = {
 	[0] = llc_conn_ev_qlfy_data_flag_eq_2,
 	[1] = NULL,
 };
@@ -3656,7 +3656,7 @@ static struct llc_conn_state_trans llc_await_busy_state_trans_15 = {
 };
 
 /* State transitions for LLC_CONN_EV_P_TMR_EXP event */
-static llc_conn_ev_qfyr_t llc_await_busy_ev_qfyrs_16[] = {
+static const llc_conn_ev_qfyr_t llc_await_busy_ev_qfyrs_16[] = {
 	[0] = llc_conn_ev_qlfy_retry_cnt_lt_n2,
 	[1] = NULL,
 };
@@ -3731,7 +3731,7 @@ static struct llc_conn_state_trans *llc_await_busy_state_transitions[] = {
 
 /* ----------------- LLC_CONN_STATE_AWAIT_REJ transitions --------------- */
 /* State transitions for LLC_CONN_EV_DATA_CONN_REQ event */
-static llc_conn_ev_qfyr_t llc_await_reject_ev_qfyrs_1_0[] = {
+static const llc_conn_ev_qfyr_t llc_await_reject_ev_qfyrs_1_0[] = {
 	[0] = llc_conn_ev_qlfy_set_status_refuse,
 	[1] = NULL,
 };
@@ -4083,7 +4083,7 @@ static struct llc_conn_state_trans llc_await_rejct_state_trans_12 = {
 };
 
 /* State transitions for LLC_CONN_EV_P_TMR_EXP event */
-static llc_conn_ev_qfyr_t llc_await_rejct_ev_qfyrs_13[] = {
+static const llc_conn_ev_qfyr_t llc_await_rejct_ev_qfyrs_13[] = {
 	[0] = llc_conn_ev_qlfy_retry_cnt_lt_n2,
 	[1] = NULL,
 };
@@ -4157,7 +4157,7 @@ static struct llc_conn_state_trans *llc_await_rejct_state_transitions[] = {
 /* LLC_CONN_STATE_D_CONN transitions */
 /* State transitions for LLC_CONN_EV_RX_SABME_CMD_Pbit_SET_X event,
  * cause_flag = 1 */
-static llc_conn_ev_qfyr_t llc_d_conn_ev_qfyrs_1[] = {
+static const llc_conn_ev_qfyr_t llc_d_conn_ev_qfyrs_1[] = {
 	[0] = llc_conn_ev_qlfy_cause_flag_eq_1,
 	[1] = llc_conn_ev_qlfy_set_status_conflict,
 	[2] = NULL,
@@ -4181,7 +4181,7 @@ static struct llc_conn_state_trans llc_d_conn_state_trans_1 = {
 /* State transitions for LLC_CONN_EV_RX_SABME_CMD_Pbit_SET_X event,
  * cause_flag = 0
  */
-static llc_conn_ev_qfyr_t llc_d_conn_ev_qfyrs_1_1[] = {
+static const llc_conn_ev_qfyr_t llc_d_conn_ev_qfyrs_1_1[] = {
 	[0] = llc_conn_ev_qlfy_cause_flag_eq_0,
 	[1] = llc_conn_ev_qlfy_set_status_conflict,
 	[2] = NULL,
@@ -4204,7 +4204,7 @@ static struct llc_conn_state_trans llc_d_conn_state_trans_1_1 = {
 /* State transitions for LLC_CONN_EV_RX_UA_RSP_Fbit_SET_X event,
  * cause_flag = 1
  */
-static llc_conn_ev_qfyr_t llc_d_conn_ev_qfyrs_2[] = {
+static const llc_conn_ev_qfyr_t llc_d_conn_ev_qfyrs_2[] = {
 	[0] = llc_conn_ev_qlfy_p_flag_eq_f,
 	[1] = llc_conn_ev_qlfy_cause_flag_eq_1,
 	[2] = llc_conn_ev_qlfy_set_status_disc,
@@ -4228,7 +4228,7 @@ static struct llc_conn_state_trans llc_d_conn_state_trans_2 = {
 /* State transitions for LLC_CONN_EV_RX_UA_RSP_Fbit_SET_X event,
  * cause_flag = 0
  */
-static llc_conn_ev_qfyr_t llc_d_conn_ev_qfyrs_2_1[] = {
+static const llc_conn_ev_qfyr_t llc_d_conn_ev_qfyrs_2_1[] = {
 	[0] = llc_conn_ev_qlfy_p_flag_eq_f,
 	[1] = llc_conn_ev_qlfy_cause_flag_eq_0,
 	[2] = llc_conn_ev_qlfy_set_status_disc,
@@ -4264,7 +4264,7 @@ static struct llc_conn_state_trans llc_d_conn_state_trans_3 = {
 /* State transitions for LLC_CONN_EV_RX_DM_RSP_Fbit_SET_X event,
  * cause_flag = 1
  */
-static llc_conn_ev_qfyr_t llc_d_conn_ev_qfyrs_4[] = {
+static const llc_conn_ev_qfyr_t llc_d_conn_ev_qfyrs_4[] = {
 	[0] = llc_conn_ev_qlfy_cause_flag_eq_1,
 	[1] = llc_conn_ev_qlfy_set_status_disc,
 	[2] = NULL,
@@ -4287,7 +4287,7 @@ static struct llc_conn_state_trans llc_d_conn_state_trans_4 = {
 /* State transitions for LLC_CONN_EV_RX_DM_RSP_Fbit_SET_X event,
  * cause_flag = 0
  */
-static llc_conn_ev_qfyr_t llc_d_conn_ev_qfyrs_4_1[] = {
+static const llc_conn_ev_qfyr_t llc_d_conn_ev_qfyrs_4_1[] = {
 	[0] = llc_conn_ev_qlfy_cause_flag_eq_0,
 	[1] = llc_conn_ev_qlfy_set_status_disc,
 	[2] = NULL,
@@ -4310,7 +4310,7 @@ static struct llc_conn_state_trans llc_d_conn_state_trans_4_1 = {
  * State transition for
  * LLC_CONN_EV_DATA_CONN_REQ event
  */
-static llc_conn_ev_qfyr_t llc_d_conn_ev_qfyrs_5[] = {
+static const llc_conn_ev_qfyr_t llc_d_conn_ev_qfyrs_5[] = {
 	[0] = llc_conn_ev_qlfy_set_status_refuse,
 	[1] = NULL,
 };
@@ -4326,7 +4326,7 @@ static struct llc_conn_state_trans llc_d_conn_state_trans_5 = {
 };
 
 /* State transitions for LLC_CONN_EV_ACK_TMR_EXP event */
-static llc_conn_ev_qfyr_t llc_d_conn_ev_qfyrs_6[] = {
+static const llc_conn_ev_qfyr_t llc_d_conn_ev_qfyrs_6[] = {
 	[0] = llc_conn_ev_qlfy_retry_cnt_lt_n2,
 	[1] = NULL,
 };
@@ -4346,7 +4346,7 @@ static struct llc_conn_state_trans llc_d_conn_state_trans_6 = {
 };
 
 /* State transitions for LLC_CONN_EV_ACK_TMR_EXP event, cause_flag = 1 */
-static llc_conn_ev_qfyr_t llc_d_conn_ev_qfyrs_7[] = {
+static const llc_conn_ev_qfyr_t llc_d_conn_ev_qfyrs_7[] = {
 	[0] = llc_conn_ev_qlfy_retry_cnt_gte_n2,
 	[1] = llc_conn_ev_qlfy_cause_flag_eq_1,
 	[2] = llc_conn_ev_qlfy_set_status_failed,
@@ -4367,7 +4367,7 @@ static struct llc_conn_state_trans llc_d_conn_state_trans_7 = {
 };
 
 /* State transitions for LLC_CONN_EV_ACK_TMR_EXP event, cause_flag = 0 */
-static llc_conn_ev_qfyr_t llc_d_conn_ev_qfyrs_8[] = {
+static const llc_conn_ev_qfyr_t llc_d_conn_ev_qfyrs_8[] = {
 	[0] = llc_conn_ev_qlfy_retry_cnt_gte_n2,
 	[1] = llc_conn_ev_qlfy_cause_flag_eq_0,
 	[2] = llc_conn_ev_qlfy_set_status_failed,
@@ -4429,7 +4429,7 @@ static struct llc_conn_state_trans llc_rst_state_trans_1 = {
 /* State transitions for LLC_CONN_EV_RX_UA_RSP_Fbit_SET_X event,
  * cause_flag = 1
  */
-static llc_conn_ev_qfyr_t llc_rst_ev_qfyrs_2[] = {
+static const llc_conn_ev_qfyr_t llc_rst_ev_qfyrs_2[] = {
 	[0] = llc_conn_ev_qlfy_p_flag_eq_f,
 	[1] = llc_conn_ev_qlfy_cause_flag_eq_1,
 	[2] = llc_conn_ev_qlfy_set_status_conn,
@@ -4457,7 +4457,7 @@ static struct llc_conn_state_trans llc_rst_state_trans_2 = {
 /* State transitions for LLC_CONN_EV_RX_UA_RSP_Fbit_SET_X event,
  * cause_flag = 0
  */
-static llc_conn_ev_qfyr_t llc_rst_ev_qfyrs_2_1[] = {
+static const llc_conn_ev_qfyr_t llc_rst_ev_qfyrs_2_1[] = {
 	[0] = llc_conn_ev_qlfy_p_flag_eq_f,
 	[1] = llc_conn_ev_qlfy_cause_flag_eq_0,
 	[2] = llc_conn_ev_qlfy_set_status_rst_done,
@@ -4483,7 +4483,7 @@ static struct llc_conn_state_trans llc_rst_state_trans_2_1 = {
 };
 
 /* State transitions for LLC_CONN_EV_ACK_TMR_EXP event */
-static llc_conn_ev_qfyr_t llc_rst_ev_qfyrs_3[] = {
+static const llc_conn_ev_qfyr_t llc_rst_ev_qfyrs_3[] = {
 	[0] = llc_conn_ev_qlfy_s_flag_eq_1,
 	[1] = llc_conn_ev_qlfy_set_status_rst_done,
 	[2] = NULL,
@@ -4505,7 +4505,7 @@ static struct llc_conn_state_trans llc_rst_state_trans_3 = {
 /* State transitions for LLC_CONN_EV_RX_DISC_CMD_Pbit_SET_X event,
  * cause_flag = 1
  */
-static llc_conn_ev_qfyr_t llc_rst_ev_qfyrs_4[] = {
+static const llc_conn_ev_qfyr_t llc_rst_ev_qfyrs_4[] = {
 	[0] = llc_conn_ev_qlfy_cause_flag_eq_1,
 	[1] = llc_conn_ev_qlfy_set_status_disc,
 	[2] = NULL,
@@ -4528,7 +4528,7 @@ static struct llc_conn_state_trans llc_rst_state_trans_4 = {
 /* State transitions for LLC_CONN_EV_RX_DISC_CMD_Pbit_SET_X event,
  * cause_flag = 0
  */
-static llc_conn_ev_qfyr_t llc_rst_ev_qfyrs_4_1[] = {
+static const llc_conn_ev_qfyr_t llc_rst_ev_qfyrs_4_1[] = {
 	[0] = llc_conn_ev_qlfy_cause_flag_eq_0,
 	[1] = llc_conn_ev_qlfy_set_status_refuse,
 	[2] = NULL,
@@ -4551,7 +4551,7 @@ static struct llc_conn_state_trans llc_rst_state_trans_4_1 = {
 /* State transitions for LLC_CONN_EV_RX_DM_RSP_Fbit_SET_X event,
  * cause_flag = 1
  */
-static llc_conn_ev_qfyr_t llc_rst_ev_qfyrs_5[] = {
+static const llc_conn_ev_qfyr_t llc_rst_ev_qfyrs_5[] = {
 	[0] = llc_conn_ev_qlfy_cause_flag_eq_1,
 	[1] = llc_conn_ev_qlfy_set_status_disc,
 	[2] = NULL,
@@ -4574,7 +4574,7 @@ static struct llc_conn_state_trans llc_rst_state_trans_5 = {
 /* State transitions for LLC_CONN_EV_RX_DM_RSP_Fbit_SET_X event,
  * cause_flag = 0
  */
-static llc_conn_ev_qfyr_t llc_rst_ev_qfyrs_5_1[] = {
+static const llc_conn_ev_qfyr_t llc_rst_ev_qfyrs_5_1[] = {
 	[0] = llc_conn_ev_qlfy_cause_flag_eq_0,
 	[1] = llc_conn_ev_qlfy_set_status_refuse,
 	[2] = NULL,
@@ -4594,7 +4594,7 @@ static struct llc_conn_state_trans llc_rst_state_trans_5_1 = {
 };
 
 /* State transitions for DATA_CONN_REQ event */
-static llc_conn_ev_qfyr_t llc_rst_ev_qfyrs_6[] = {
+static const llc_conn_ev_qfyr_t llc_rst_ev_qfyrs_6[] = {
 	[0] = llc_conn_ev_qlfy_set_status_refuse,
 	[1] = NULL,
 };
@@ -4610,7 +4610,7 @@ static struct llc_conn_state_trans llc_rst_state_trans_6 = {
 };
 
 /* State transitions for LLC_CONN_EV_ACK_TMR_EXP event */
-static llc_conn_ev_qfyr_t llc_rst_ev_qfyrs_7[] = {
+static const llc_conn_ev_qfyr_t llc_rst_ev_qfyrs_7[] = {
 	[0] = llc_conn_ev_qlfy_retry_cnt_lt_n2,
 	[1] = llc_conn_ev_qlfy_s_flag_eq_0,
 	[2] = NULL,
@@ -4631,7 +4631,7 @@ static struct llc_conn_state_trans llc_rst_state_trans_7 = {
 };
 
 /* State transitions for LLC_CONN_EV_ACK_TMR_EXP event */
-static llc_conn_ev_qfyr_t llc_rst_ev_qfyrs_8[] = {
+static const llc_conn_ev_qfyr_t llc_rst_ev_qfyrs_8[] = {
 	[0] = llc_conn_ev_qlfy_retry_cnt_gte_n2,
 	[1] = llc_conn_ev_qlfy_s_flag_eq_0,
 	[2] = llc_conn_ev_qlfy_cause_flag_eq_1,
@@ -4652,7 +4652,7 @@ static struct llc_conn_state_trans llc_rst_state_trans_8 = {
 };
 
 /* State transitions for LLC_CONN_EV_ACK_TMR_EXP event */
-static llc_conn_ev_qfyr_t llc_rst_ev_qfyrs_8_1[] = {
+static const llc_conn_ev_qfyr_t llc_rst_ev_qfyrs_8_1[] = {
 	[0] = llc_conn_ev_qlfy_retry_cnt_gte_n2,
 	[1] = llc_conn_ev_qlfy_s_flag_eq_0,
 	[2] = llc_conn_ev_qlfy_cause_flag_eq_0,
@@ -4786,7 +4786,7 @@ static struct llc_conn_state_trans llc_error_state_trans_6 = {
 };
 
 /* State transitions for LLC_CONN_EV_ACK_TMR_EXP event */
-static llc_conn_ev_qfyr_t llc_error_ev_qfyrs_7[] = {
+static const llc_conn_ev_qfyr_t llc_error_ev_qfyrs_7[] = {
 	[0] = llc_conn_ev_qlfy_retry_cnt_lt_n2,
 	[1] = NULL,
 };
@@ -4806,7 +4806,7 @@ static struct llc_conn_state_trans llc_error_state_trans_7 = {
 };
 
 /* State transitions for LLC_CONN_EV_ACK_TMR_EXP event */
-static llc_conn_ev_qfyr_t llc_error_ev_qfyrs_8[] = {
+static const llc_conn_ev_qfyr_t llc_error_ev_qfyrs_8[] = {
 	[0] = llc_conn_ev_qlfy_retry_cnt_gte_n2,
 	[1] = NULL,
 };
@@ -4828,7 +4828,7 @@ static struct llc_conn_state_trans llc_error_state_trans_8 = {
 };
 
 /* State transitions for LLC_CONN_EV_DATA_CONN_REQ event */
-static llc_conn_ev_qfyr_t llc_error_ev_qfyrs_9[] = {
+static const llc_conn_ev_qfyr_t llc_error_ev_qfyrs_9[] = {
 	[0] = llc_conn_ev_qlfy_set_status_refuse,
 	[1] = NULL,
 };
diff --git a/net/llc/llc_conn.c b/net/llc/llc_conn.c
index 75baa2b..81a61fc 100644
--- a/net/llc/llc_conn.c
+++ b/net/llc/llc_conn.c
@@ -406,7 +406,7 @@ static struct llc_conn_state_trans *llc_qualify_conn_ev(struct sock *sk,
 							struct sk_buff *skb)
 {
 	struct llc_conn_state_trans **next_trans;
-	llc_conn_ev_qfyr_t *next_qualifier;
+	const llc_conn_ev_qfyr_t *next_qualifier;
 	struct llc_conn_state_ev *ev = llc_conn_ev(skb);
 	struct llc_sock *llc = llc_sk(sk);
 	struct llc_conn_state *curr_state =

^ permalink raw reply related

* Re: [3.16.y-ckt stable] Patch "xen-netfront: Fix handling packets on compound pages with skb_linearize" has been added to staging queue
From: Luis Henriques @ 2014-12-10 17:54 UTC (permalink / raw)
  To: Zoltan Kiss
  Cc: Wei Liu, Ian Campbell, Paul Durrant, netdev, linux-kernel,
	xen-devel, David S. Miller, Stefan Bader, kernel-team
In-Reply-To: <1418232388-16853-1-git-send-email-luis.henriques@canonical.com>

On Wed, Dec 10, 2014 at 05:26:28PM +0000, Luis Henriques wrote:
> This is a note to let you know that I have just added a patch titled
> 
>     xen-netfront: Fix handling packets on compound pages with skb_linearize
> 
> to the linux-3.16.y-queue branch of the 3.16.y-ckt extended stable tree 
> which can be found at:
> 
>  http://kernel.ubuntu.com/git?p=ubuntu/linux.git;a=shortlog;h=refs/heads/linux-3.16.y-queue
> 
> This patch is scheduled to be released in version 3.16.7-ckt3.
> 
> If you, or anyone else, feels it should not be added to this tree, please 
> reply to this email.
> 

Ups, sorry!  I thought I had this one dropped after David Vrabel
comment.  Now dropped for sure.

Cheers,
--
Luís


> For more information about the 3.16.y-ckt tree, see
> https://wiki.ubuntu.com/Kernel/Dev/ExtendedStable
> 
> Thanks.
> -Luis
> 
> ------
> 
> From 079f869ca5082866d276b686721e89a649e622fe Mon Sep 17 00:00:00 2001
> From: Zoltan Kiss <zoltan.kiss@citrix.com>
> Date: Mon, 11 Aug 2014 18:32:23 +0100
> Subject: xen-netfront: Fix handling packets on compound pages with
>  skb_linearize
> 
> commit 97a6d1bb2b658ac85ed88205ccd1ab809899884d upstream.
> 
> There is a long known problem with the netfront/netback interface: if the guest
> tries to send a packet which constitues more than MAX_SKB_FRAGS + 1 ring slots,
> it gets dropped. The reason is that netback maps these slots to a frag in the
> frags array, which is limited by size. Having so many slots can occur since
> compound pages were introduced, as the ring protocol slice them up into
> individual (non-compound) page aligned slots. The theoretical worst case
> scenario looks like this (note, skbs are limited to 64 Kb here):
> linear buffer: at most PAGE_SIZE - 17 * 2 bytes, overlapping page boundary,
> using 2 slots
> first 15 frags: 1 + PAGE_SIZE + 1 bytes long, first and last bytes are at the
> end and the beginning of a page, therefore they use 3 * 15 = 45 slots
> last 2 frags: 1 + 1 bytes, overlapping page boundary, 2 * 2 = 4 slots
> Although I don't think this 51 slots skb can really happen, we need a solution
> which can deal with every scenario. In real life there is only a few slots
> overdue, but usually it causes the TCP stream to be blocked, as the retry will
> most likely have the same buffer layout.
> This patch solves this problem by linearizing the packet. This is not the
> fastest way, and it can fail much easier as it tries to allocate a big linear
> area for the whole packet, but probably easier by an order of magnitude than
> anything else. Probably this code path is not touched very frequently anyway.
> 
> Signed-off-by: Zoltan Kiss <zoltan.kiss@citrix.com>
> Cc: Wei Liu <wei.liu2@citrix.com>
> Cc: Ian Campbell <Ian.Campbell@citrix.com>
> Cc: Paul Durrant <paul.durrant@citrix.com>
> Cc: netdev@vger.kernel.org
> Cc: linux-kernel@vger.kernel.org
> Cc: xen-devel@lists.xenproject.org
> Signed-off-by: David S. Miller <davem@davemloft.net>
> Cc: Stefan Bader <stefan.bader@canonical.com>
> Signed-off-by: Luis Henriques <luis.henriques@canonical.com>
> ---
>  drivers/net/xen-netfront.c | 7 ++++---
>  1 file changed, 4 insertions(+), 3 deletions(-)
> 
> diff --git a/drivers/net/xen-netfront.c b/drivers/net/xen-netfront.c
> index 055222bae6e4..23359aeb1ba0 100644
> --- a/drivers/net/xen-netfront.c
> +++ b/drivers/net/xen-netfront.c
> @@ -628,9 +628,10 @@ static int xennet_start_xmit(struct sk_buff *skb, struct net_device *dev)
>  	slots = DIV_ROUND_UP(offset + len, PAGE_SIZE) +
>  		xennet_count_skb_frag_slots(skb);
>  	if (unlikely(slots > MAX_SKB_FRAGS + 1)) {
> -		net_alert_ratelimited(
> -			"xennet: skb rides the rocket: %d slots\n", slots);
> -		goto drop;
> +		net_dbg_ratelimited("xennet: skb rides the rocket: %d slots, %d bytes\n",
> +				    slots, skb->len);
> +		if (skb_linearize(skb))
> +			goto drop;
>  	}
> 
>  	spin_lock_irqsave(&queue->tx_lock, flags);

^ permalink raw reply

* [PATCH 3] llc: Make llc_sap_action_t function pointer arrays const
From: Joe Perches @ 2014-12-10 17:55 UTC (permalink / raw)
  To: Arnaldo Carvalho de Melo; +Cc: David S. Miller, netdev, LKML
In-Reply-To: <1418233437.18092.7.camel@perches.com>

It's better when function pointer arrays aren't modifiable.

Net change:

$ size net/llc/built-in.o.*
   text	   data	    bss	    dec	    hex	filename
  61193	  12758	   1344	  75295	  1261f	net/llc/built-in.o.new
  47113	  27030	   1344	  75487	  126df	net/llc/built-in.o.old

Signed-off-by: Joe Perches <joe@perches.com>
---

No more of these in llc.  Let me know if you need a
clean resubmission of all 3 of this llc series.

 include/net/llc_s_st.h |  2 +-
 net/llc/llc_s_st.c     | 20 ++++++++++----------
 net/llc/llc_sap.c      |  2 +-
 3 files changed, 12 insertions(+), 12 deletions(-)

diff --git a/include/net/llc_s_st.h b/include/net/llc_s_st.h
index 567c681..c4359e2 100644
--- a/include/net/llc_s_st.h
+++ b/include/net/llc_s_st.h
@@ -19,7 +19,7 @@
 struct llc_sap_state_trans {
 	llc_sap_ev_t	  ev;
 	u8		  next_state;
-	llc_sap_action_t *ev_actions;
+	const llc_sap_action_t *ev_actions;
 };
 
 struct llc_sap_state {
diff --git a/net/llc/llc_s_st.c b/net/llc/llc_s_st.c
index 135f7d8..308c616 100644
--- a/net/llc/llc_s_st.c
+++ b/net/llc/llc_s_st.c
@@ -29,7 +29,7 @@ static struct llc_sap_state_trans llc_sap_state_trans_end;
 /* state LLC_SAP_STATE_INACTIVE transition for
  * LLC_SAP_EV_ACTIVATION_REQ event
  */
-static llc_sap_action_t llc_sap_inactive_state_actions_1[] = {
+static const llc_sap_action_t llc_sap_inactive_state_actions_1[] = {
 	[0] = llc_sap_action_report_status,
 	[1] = NULL,
 };
@@ -47,7 +47,7 @@ static struct llc_sap_state_trans *llc_sap_inactive_state_transitions[] = {
 };
 
 /* state LLC_SAP_STATE_ACTIVE transition for LLC_SAP_EV_RX_UI event */
-static llc_sap_action_t llc_sap_active_state_actions_1[] = {
+static const llc_sap_action_t llc_sap_active_state_actions_1[] = {
 	[0] = llc_sap_action_unitdata_ind,
 	[1] = NULL,
 };
@@ -59,7 +59,7 @@ static struct llc_sap_state_trans llc_sap_active_state_trans_1 = {
 };
 
 /* state LLC_SAP_STATE_ACTIVE transition for LLC_SAP_EV_UNITDATA_REQ event */
-static llc_sap_action_t llc_sap_active_state_actions_2[] = {
+static const llc_sap_action_t llc_sap_active_state_actions_2[] = {
 	[0] = llc_sap_action_send_ui,
 	[1] = NULL,
 };
@@ -71,7 +71,7 @@ static struct llc_sap_state_trans llc_sap_active_state_trans_2 = {
 };
 
 /* state LLC_SAP_STATE_ACTIVE transition for LLC_SAP_EV_XID_REQ event */
-static llc_sap_action_t llc_sap_active_state_actions_3[] = {
+static const llc_sap_action_t llc_sap_active_state_actions_3[] = {
 	[0] = llc_sap_action_send_xid_c,
 	[1] = NULL,
 };
@@ -83,7 +83,7 @@ static struct llc_sap_state_trans llc_sap_active_state_trans_3 = {
 };
 
 /* state LLC_SAP_STATE_ACTIVE transition for LLC_SAP_EV_RX_XID_C event */
-static llc_sap_action_t llc_sap_active_state_actions_4[] = {
+static const llc_sap_action_t llc_sap_active_state_actions_4[] = {
 	[0] = llc_sap_action_send_xid_r,
 	[1] = NULL,
 };
@@ -95,7 +95,7 @@ static struct llc_sap_state_trans llc_sap_active_state_trans_4 = {
 };
 
 /* state LLC_SAP_STATE_ACTIVE transition for LLC_SAP_EV_RX_XID_R event */
-static llc_sap_action_t llc_sap_active_state_actions_5[] = {
+static const llc_sap_action_t llc_sap_active_state_actions_5[] = {
 	[0] = llc_sap_action_xid_ind,
 	[1] = NULL,
 };
@@ -107,7 +107,7 @@ static struct llc_sap_state_trans llc_sap_active_state_trans_5 = {
 };
 
 /* state LLC_SAP_STATE_ACTIVE transition for LLC_SAP_EV_TEST_REQ event */
-static llc_sap_action_t llc_sap_active_state_actions_6[] = {
+static const llc_sap_action_t llc_sap_active_state_actions_6[] = {
 	[0] = llc_sap_action_send_test_c,
 	[1] = NULL,
 };
@@ -119,7 +119,7 @@ static struct llc_sap_state_trans llc_sap_active_state_trans_6 = {
 };
 
 /* state LLC_SAP_STATE_ACTIVE transition for LLC_SAP_EV_RX_TEST_C event */
-static llc_sap_action_t llc_sap_active_state_actions_7[] = {
+static const llc_sap_action_t llc_sap_active_state_actions_7[] = {
 	[0] = llc_sap_action_send_test_r,
 	[1] = NULL,
 };
@@ -131,7 +131,7 @@ static struct llc_sap_state_trans llc_sap_active_state_trans_7 = {
 };
 
 /* state LLC_SAP_STATE_ACTIVE transition for LLC_SAP_EV_RX_TEST_R event */
-static llc_sap_action_t llc_sap_active_state_actions_8[] = {
+static const llc_sap_action_t llc_sap_active_state_actions_8[] = {
 	[0] = llc_sap_action_test_ind,
 	[1] = NULL,
 };
@@ -145,7 +145,7 @@ static struct llc_sap_state_trans llc_sap_active_state_trans_8 = {
 /* state LLC_SAP_STATE_ACTIVE transition for
  * LLC_SAP_EV_DEACTIVATION_REQ event
  */
-static llc_sap_action_t llc_sap_active_state_actions_9[] = {
+static const llc_sap_action_t llc_sap_active_state_actions_9[] = {
 	[0] = llc_sap_action_report_status,
 	[1] = NULL,
 };
diff --git a/net/llc/llc_sap.c b/net/llc/llc_sap.c
index 06033f6..d0e1e80 100644
--- a/net/llc/llc_sap.c
+++ b/net/llc/llc_sap.c
@@ -146,7 +146,7 @@ static int llc_exec_sap_trans_actions(struct llc_sap *sap,
 				      struct sk_buff *skb)
 {
 	int rc = 0;
-	llc_sap_action_t *next_action = trans->ev_actions;
+	const llc_sap_action_t *next_action = trans->ev_actions;
 
 	for (; next_action && *next_action; next_action++)
 		if ((*next_action)(sap, skb))

^ permalink raw reply related

* Re: [PATCH net] Fix race condition between vxlan_sock_add and vxlan_sock_release
From: David Miller @ 2014-12-10 18:11 UTC (permalink / raw)
  To: mleitner; +Cc: netdev
In-Reply-To: <e76bb0b4377c56583148323ada9b479e4628e35e.1418135271.git.mleitner@redhat.com>

From: Marcelo Ricardo Leitner <mleitner@redhat.com>
Date: Tue,  9 Dec 2014 12:28:28 -0200

> Currently, when trying to reuse a socket, vxlan_sock_add will grab
> vn->sock_lock, locate a reusable socket, inc refcount and release
> vn->sock_lock.
> 
> But vxlan_sock_release() will first decrement refcount, and then grab
> that lock. refcnt operations are atomic but as currently we have
> deferred works which hold vs->refcnt each, this might happen, leading to
> a use after free (specially after vxlan_igmp_leave):
> 
>   CPU 1                            CPU 2
> 
> deferred work                    vxlan_sock_add

Just make vxlan_sock_add() do atomic_add_unless(x, 1, 0), that way
if vxlan_sock_add() sees the count at zero it can just act as if
no such reusable socket exists.

^ permalink raw reply

* Re: [PATCH net] gianfar: Fix dma check map error when DMA_API_DEBUG is enabled
From: David Miller @ 2014-12-10 18:13 UTC (permalink / raw)
  To: claudiu.manoil; +Cc: netdev, haokexin
In-Reply-To: <1418135075-17349-1-git-send-email-claudiu.manoil@freescale.com>

From: Claudiu Manoil <claudiu.manoil@freescale.com>
Date: Tue, 9 Dec 2014 16:24:35 +0200

> From: Kevin Hao <haokexin@gmail.com>
> 
> We need to use dma_mapping_error() to check the dma address returned
> by dma_map_single/page(). Otherwise we would get warning like this:
 ...
> For TX, we need to unmap the pages which has already been mapped and
> free the skb before return. For RX, just let the rxbdp as unempty.
> We can retry to initialize it to empty in next round.
> 
> Signed-off-by: Kevin Hao <haokexin@gmail.com>
> Signed-off-by: Claudiu Manoil <claudiu.manoil@freescale.com>

The RX behavior needs to be adjusted.

You should never leave holes in the RX ring, ever.

Instead, try allocating the new RX skb first, and only if
you are successful should you pass up the original SKB.  If
it fails, then reuse the original SKB in the RX ring.

^ permalink raw reply

* Re: [ovs-dev] [PATCHv11 net-next 2/2] openvswitch: Add support for unique flow IDs.
From: Joe Stringer @ 2014-12-10 18:15 UTC (permalink / raw)
  To: Pravin Shelar; +Cc: Joe Stringer, dev@openvswitch.org, netdev, LKML
In-Reply-To: <CALnjE+pnJqHFaKZAGgN2Q_q-sAfuGYOb6fX0utkb-J1-JFv7dg@mail.gmail.com>

On 9 December 2014 at 22:11, Pravin Shelar <pshelar@nicira.com> wrote:
> On Tue, Dec 9, 2014 at 4:25 PM, Joe Stringer <joestringer@nicira.com> wrote:
>> On 9 December 2014 at 10:32, Pravin Shelar <pshelar@nicira.com> wrote:
>>> On Tue, Dec 2, 2014 at 6:56 PM, Joe Stringer <joestringer@nicira.com> wrote:
>>>> @@ -424,10 +475,9 @@ static struct sw_flow *masked_flow_lookup(struct table_instance *ti,
>>>>         ovs_flow_mask_key(&masked_key, unmasked, mask);
>>>>         hash = flow_hash(&masked_key, key_start, key_end);
>>>>         head = find_bucket(ti, hash);
>>>> -       hlist_for_each_entry_rcu(flow, head, hash_node[ti->node_ver]) {
>>>> -               if (flow->mask == mask && flow->hash == hash &&
>>>> -                   flow_cmp_masked_key(flow, &masked_key,
>>>> -                                         key_start, key_end))
>>>> +       hlist_for_each_entry_rcu(flow, head, flow_hash.node[ti->node_ver]) {
>>>> +               if (flow->mask == mask && flow->flow_hash.hash == hash &&
>>>> +                   flow_cmp_masked_key(flow, &masked_key, key_start, key_end))
>>>>                         return flow;
>>>>         }
>>>>         return NULL;
>>>> @@ -469,7 +519,40 @@ struct sw_flow *ovs_flow_tbl_lookup_exact(struct flow_table *tbl,
>>>>         /* Always called under ovs-mutex. */
>>>>         list_for_each_entry(mask, &tbl->mask_list, list) {
>>>>                 flow = masked_flow_lookup(ti, match->key, mask);
>>>> -               if (flow && ovs_flow_cmp_unmasked_key(flow, match))  /* Found */
>>>> +               if (flow && !flow->ufid &&
>>> why not NULL check for flow->unmasked_key here rather than ufid?
>>
>> In this version, I tried to consistently use flow->ufid as the switch
>> for whether UFID exists or not. In the next version, this statement
>> would refer to flow->id->ufid_len.
>>
>> The current approach means that ovs_flow_tbl_lookup_exact() is really
>> ovs_flow_tbl_lookup_unmasked_key(). Do you think this should remain
>> specific to unmasked key or should it be made to check that the
>> identifier (ufid OR unmasked key) is the same?
>
> It is easier to read code if we check for flow->unmasked_key here.
> ovs_flow_cmp_unmasked_key() has assert on ufid anyways.

With the change to put UFID/unmasked key in the same struct, there
will be no such pointer to check, only ufid_len.

However, we could shift this check at the start of the function instead.

^ permalink raw reply

* Re: PROBLEM: bonding status file in /proc not removed when using bond-device as a slave
From: Andy Gospodarek @ 2014-12-10 18:22 UTC (permalink / raw)
  To: Peter Schmitt; +Cc: netdev
In-Reply-To: <trinity-2ae31da3-b293-4f08-8f3e-45e129b72217-1418212148011@3capp-gmx-bs44>

On Wed, Dec 10, 2014 at 12:49:08PM +0100, Peter Schmitt wrote:
> Hi Andy and everyone else!
> 
> > > Hi everyone,
> > > 
> > > I want to create a master-backup bond that has two LACP bonds as slaves. Both
> > 
> > There is no reason to do this.  The bonding code you are running
> > supports the ability to connect a single 802.3ad bond to different
> > switches and should do exactly what you need.
> > 
> > When you put all ports in the same bond you will notice that ports that
> > go to one switch will be listed with a particular aggregator ID and all
> > ports going to another switch will have a different aggregator ID.  You
> > will also see that the bond will list only one active aggregator.  This
> > should give you the behaviour you desire.
> > 
> > Additionally look at 'ad_select' option in the bonding documentation to
> > help tune when you switch from one link to another.
> 
> Thank you very much for your answer. I did not know about this behaviour. 
> The ad_select feature is nice, but you can't explicitly control which switch
> (which aggregator id) should be used. So I need some links between those two
> switches to handle situations where one machine uses the first switch and the
> other uses the second. The Active-Backup mode let's me configure exactly this:
> Which bond should be active. With uplinks between the switches, the LACP feature
> is indeed very handy.
> 
> I wonder what the purpose of the Active-Backup mode is then? Is this the low-budget
> solution to the failover problem? Is the setup with Active-Backup and LACP bonds
> as slaves supported? This seems to work quite well in my testsetup.
> 
> However, the described problem remains. One can create a setup where such a file is left
> in the proc-fs and a cat on this file crashes the machine.

That is definitely a problem.  Thanks for reporting it.

> 
> Thank you very much for your help.
> 
> Best regards,
> Peter
> 
> > > LACP slaves should be connected to different switches so that I have
> > > connectivity even if one switch fails.
> > > While experimenting with this setup on the recent LTS kernel 3.14.26 I have found the following behaviour:
> > > When I add a bond device (by default an LACP bond, mode 4) to a master-backup
> > > bond (mode 1) and then remove it, the corresponding status file for the bond remains in
> > > /proc/net/bonding/ and when I do a cat on this file, the machine crashes or I get a
> > > general protection fault.
> > > 
> > > The following snippet creates such a scenario:
> > > 
> > > #!/bin/bash
> > > echo +bond1 > /sys/class/net/bonding_masters
> > > echo 1 > /sys/class/net/bond1/bonding/mode
> > > echo +bond2 > /sys/class/net/bonding_masters
> > > echo +bond2 > /sys/class/net/bond1/bonding/slaves
> > > echo -bond2 > /sys/class/net/bond1/bonding/slaves
> > > echo -bond2 > /sys/class/net/bonding_masters
> > > 
> > > After this is executed, the file /proc/net/bonding/bond2 still exists
> > > while /sys/class/net/bonding_masters only shows bond1:
> > > 
> > > > ls -lah /proc/net/bonding/bond*
> > > r--r--r-- 1 root root 0 Dec  8 16:53 /proc/net/bonding/bond1
> > > r--r--r-- 1 root root 0 Dec  8 16:53 /proc/net/bonding/bond2
> > > 
> > > > cat /sys/class/net/bonding_masters
> > > bond1
> > > 
> > > When I now make a "cat" on the file in /proc, I get a general protection fault
> > > or even worse, the machine just crashes and is unresponsive and it can only be
> > > fixed with a power-cycle.
> > > 
> > > > uname -a
> > > Linux bondingtest 3.14.26-x86 #1 SMP Sun Dec 7 11:29:36 CET 2014 i686 GNU/Linux
> > > 
> > > The bonding module is loaded with the following options:
> > > modprobe bonding miimon=100 max_bonds=0 mode=4 lacp_rate=1 xmit_hash_policy=layer2+3
> > > 
> > > 
> > > > cat /proc/net/bonding/bond2
> > > general protection fault: 0000 [#1] SMP·
> > > Modules linked in: w83627hf hwmon_vid coretemp hwmon ip_set iptable_nat nf_nat_ipv4 ipt_REJECT nf_nat_irc nf_conntrack_irc nf_nat_ftp nf_nat nf_conntrack_ftp msr ipmi_devintf ipmi_msghandler ip_gre gre bonding pcspkr i3200_edac edac_core uhci_hcd ehci_pci ehci_hcd lpc_ich mfd_core pata_acpi ata_generic shpchp e1000e ptp pps_core [last unloaded: cpuid]
> > > CPU: 0 PID: 31747 Comm: cat Not tainted 3.14.26-x86_64 #1
> > > Hardware name: To Be Filled By O.E.M. To Be Filled By O.E.M./To be filled by O.E.M., BIOS 080015  06/29/2009
> > > task: ffff8800d61d77b0 ti: ffff8800d6068000 task.ti: ffff8800d6068000
> > > RIP: 0010:[<ffffffffc00f7ef0>]  [<ffffffffc00f7ef0>] bond_info_seq_show+0x2d0/0x5e0 [bonding]
> > > RSP: 0018:ffff8800d6069e08  EFLAGS: 00010212
> > > RAX: 5f7367705f656c62 RBX: ffff880198570380 RCX: 0000000000000001
> > > RDX: ffffffffc00f9547 RSI: ffffffffc00f954f RDI: ffff880198570380
> > > RBP: ffff8800d6069e48 R08: ffffffff9413ed60 R09: ffff8800dba15cd4
> > > R10: 0000000000000001 R11: 0000000000000000 R12: ffff8800d60917c0
> > > R13: 656b636f6c6e756d R14: ffff880197d469c0 R15: ffff8800d6069e90
> > > FS:  0000000000000000(0000) GS:ffff88019fc00000(0063) knlGS:00000000f761c8d0
> > > CS:  0010 DS: 002b ES: 002b CR0: 000000008005003b
> > > CR2: 000000000804ce10 CR3: 00000000db8cd000 CR4: 00000000000407f0
> > > Stack:
> > > ffff8800d6069e48 ffffffffc00f8318 ffff8801986ba9f0 ffff880197d469c0
> > > ffff880198570380 0000000000000001 ffff880197d469c0 ffff8800d6069e90
> > > ffff8800d6069ec8 ffffffff9413eed1 ffff880198289a58 0000000008213000
> > > Call Trace:
> > > [<ffffffffc00f8318>] ? bond_info_seq_start+0x28/0xa8 [bonding]
> > > [<ffffffff9413eed1>] seq_read+0x171/0x3f0
> > > [<ffffffff94175a7e>] proc_reg_read+0x3e/0x70
> > > [<ffffffff9411e0e1>] vfs_read+0xa1/0x160
> > > [<ffffffff9411e281>] SyS_read+0x51/0xc0
> > > [<ffffffff94039c9c>] ? do_page_fault+0xc/0x10
> > > [<ffffffff94516cdf>] sysenter_dispatch+0x7/0x1e
> > > Code: 04 49 8b 55 00 48 c7 c6 2a 95 0f c0 48 89 df 31 c0 e8 d5 6c 04 d4 49 8b 04 24 48 c7 c2 47 95 0f c0 48 c7 c6 4f 95 0f c0 48 89 df <48> 8b 40 48 a8 04 48 c7 c0 4c 95 0f c0 48 0f 44 d0 31 c0 e8 a8·
> > > RIP  [<ffffffffc00f7ef0>] bond_info_seq_show+0x2d0/0x5e0 [bonding]
> > > RSP <ffff8800d6069e08>
> > > ---[ end trace 96fae3d9de6068c7 ]---
> > > Segmentation fault
> > > 
> > > ver_linux:
> > > Linux bondingtest 3.14.26-x86 #1 SMP Sun Dec 7 11:29:36 CET 2014 i686 GNU/Linux
> > > 
> > > Gnu C                  4.4.3
> > > Gnu make              3.81
> > > binutils              2.20.1
> > > util-linux            2.17.2
> > > mount                  support
> > > module-init-tools      found
> > > e2fsprogs              1.42.11
> > > PPP                    2.4.5
> > > Linux C Library        2.11.1
> > > Dynamic linker (ldd)  2.11.1
> > > Procps                3.2.8
> > > Net-tools              1.60
> > > Kbd                    1.15
> > > Sh-utils              found
> > > Modules Loaded        xt_TPROXY xt_set xt_socket nf_defrag_ipv6 xt_REDIRECT ip_set_hash_ip hwmon_vid hwmon bridge ip_set iptable_nat nf_nat_ipv4 ipt_REJECT nf_nat_irc nf_conntrack_irc nf_nat_ftp nf_nat nf_conntrack_ftp msr ipmi_devintf ipmi_msghandler ip_gre gre bonding pcspkr shpchp uhci_hcd ehci_pci ehci_hcd lpc_ich mfd_core pata_acpi ata_generic
> > > 
> > > If you have any questions or need more information or tests, I will gladly help you with that.
> > > 
> > > Thank you in advance.
> > > 
> > > Best regards,
> > > Peter Schmitt
> > > --
> > > To unsubscribe from this list: send the line "unsubscribe netdev" in
> > > the body of a message to majordomo@vger.kernel.org
> > > More majordomo info at  http://vger.kernel.org/majordomo-info.html
> >

^ permalink raw reply

* Re: the next chunk of iov_iter-net stuff for review
From: David Miller @ 2014-12-10 18:25 UTC (permalink / raw)
  To: viro; +Cc: netdev, linux-kernel
In-Reply-To: <20141209224928.GL22149@ZenIV.linux.org.uk>

From: Al Viro <viro@ZenIV.linux.org.uk>
Date: Tue, 9 Dec 2014 22:49:28 +0000

> OK, rebase is in
> git://git.kernel.org/pub/scm/linux/kernel/git/viro/vfs.git for-davem-2,
> individual patches - in followups (first 13 - iov_iter, then 12 net-related)

All looks good to me, pulled, thanks Al!

^ permalink raw reply

* [PATCH] irda: Convert function pointer arrays and uses to const
From: Joe Perches @ 2014-12-10 18:28 UTC (permalink / raw)
  To: Samuel Ortiz; +Cc: David S. Miller, netdev, LKML

Making things const is a good thing.

(x86-64 defconfig with all irda)
$ size net/irda/built-in.o*
   text	   data	    bss	    dec	    hex	filename
 109276	   1868	    244	 111388	  1b31c	net/irda/built-in.o.new
 108828	   2316	    244	 111388	  1b31c	net/irda/built-in.o.old

Signed-off-by: Joe Perches <joe@perches.com>
---
 include/net/irda/parameters.h  | 6 +++---
 net/irda/ircomm/ircomm_param.c | 8 ++++----
 net/irda/irttp.c               | 6 ++++--
 net/irda/parameters.c          | 8 ++++----
 net/irda/qos.c                 | 6 +++---
 5 files changed, 18 insertions(+), 16 deletions(-)

diff --git a/include/net/irda/parameters.h b/include/net/irda/parameters.h
index 42713c9..2d9cd00 100644
--- a/include/net/irda/parameters.h
+++ b/include/net/irda/parameters.h
@@ -71,17 +71,17 @@ typedef int (*PV_HANDLER)(void *self, __u8 *buf, int len, __u8 pi,
 			  PV_TYPE type, PI_HANDLER func);
 
 typedef struct {
-	PI_HANDLER func;  /* Handler for this parameter identifier */
+	const PI_HANDLER func;  /* Handler for this parameter identifier */
 	PV_TYPE    type;  /* Data type for this parameter */
 } pi_minor_info_t;
 
 typedef struct {
-	pi_minor_info_t *pi_minor_call_table;
+	const pi_minor_info_t *pi_minor_call_table;
 	int len;
 } pi_major_info_t;
 
 typedef struct {
-	pi_major_info_t *tables;
+	const pi_major_info_t *tables;
 	int              len;
 	__u8             pi_mask;
 	int              pi_major_offset;
diff --git a/net/irda/ircomm/ircomm_param.c b/net/irda/ircomm/ircomm_param.c
index 27be782..3c4caa6 100644
--- a/net/irda/ircomm/ircomm_param.c
+++ b/net/irda/ircomm/ircomm_param.c
@@ -61,12 +61,12 @@ static int ircomm_param_dte(void *instance, irda_param_t *param, int get);
 static int ircomm_param_dce(void *instance, irda_param_t *param, int get);
 static int ircomm_param_poll(void *instance, irda_param_t *param, int get);
 
-static pi_minor_info_t pi_minor_call_table_common[] = {
+static const pi_minor_info_t pi_minor_call_table_common[] = {
 	{ ircomm_param_service_type, PV_INT_8_BITS },
 	{ ircomm_param_port_type,    PV_INT_8_BITS },
 	{ ircomm_param_port_name,    PV_STRING }
 };
-static pi_minor_info_t pi_minor_call_table_non_raw[] = {
+static const pi_minor_info_t pi_minor_call_table_non_raw[] = {
 	{ ircomm_param_data_rate,    PV_INT_32_BITS | PV_BIG_ENDIAN },
 	{ ircomm_param_data_format,  PV_INT_8_BITS },
 	{ ircomm_param_flow_control, PV_INT_8_BITS },
@@ -74,13 +74,13 @@ static pi_minor_info_t pi_minor_call_table_non_raw[] = {
 	{ ircomm_param_enq_ack,      PV_INT_16_BITS },
 	{ ircomm_param_line_status,  PV_INT_8_BITS }
 };
-static pi_minor_info_t pi_minor_call_table_9_wire[] = {
+static const pi_minor_info_t pi_minor_call_table_9_wire[] = {
 	{ ircomm_param_dte,          PV_INT_8_BITS },
 	{ ircomm_param_dce,          PV_INT_8_BITS },
 	{ ircomm_param_poll,         PV_NO_VALUE },
 };
 
-static pi_major_info_t pi_major_call_table[] = {
+static const pi_major_info_t pi_major_call_table[] = {
 	{ pi_minor_call_table_common,  3 },
 	{ pi_minor_call_table_non_raw, 6 },
 	{ pi_minor_call_table_9_wire,  3 }
diff --git a/net/irda/irttp.c b/net/irda/irttp.c
index 3ef0b08..b6ab41d 100644
--- a/net/irda/irttp.c
+++ b/net/irda/irttp.c
@@ -71,11 +71,13 @@ static void irttp_status_indication(void *instance,
 				    LINK_STATUS link, LOCK_STATUS lock);
 
 /* Information for parsing parameters in IrTTP */
-static pi_minor_info_t pi_minor_call_table[] = {
+static const pi_minor_info_t pi_minor_call_table[] = {
 	{ NULL, 0 },                                             /* 0x00 */
 	{ irttp_param_max_sdu_size, PV_INTEGER | PV_BIG_ENDIAN } /* 0x01 */
 };
-static pi_major_info_t pi_major_call_table[] = { { pi_minor_call_table, 2 } };
+static const pi_major_info_t pi_major_call_table[] = {
+	{ pi_minor_call_table, 2 }
+};
 static pi_param_info_t param_info = { pi_major_call_table, 1, 0x0f, 4 };
 
 /************************ GLOBAL PROCEDURES ************************/
diff --git a/net/irda/parameters.c b/net/irda/parameters.c
index 006786b..16ce32f 100644
--- a/net/irda/parameters.c
+++ b/net/irda/parameters.c
@@ -52,7 +52,7 @@ static int irda_insert_no_value(void *self, __u8 *buf, int len, __u8 pi,
 static int irda_param_unpack(__u8 *buf, char *fmt, ...);
 
 /* Parameter value call table. Must match PV_TYPE */
-static PV_HANDLER pv_extract_table[] = {
+static const PV_HANDLER pv_extract_table[] = {
 	irda_extract_integer, /* Handler for any length integers */
 	irda_extract_integer, /* Handler for 8  bits integers */
 	irda_extract_integer, /* Handler for 16 bits integers */
@@ -62,7 +62,7 @@ static PV_HANDLER pv_extract_table[] = {
 	irda_extract_no_value /* Handler for no value parameters */
 };
 
-static PV_HANDLER pv_insert_table[] = {
+static const PV_HANDLER pv_insert_table[] = {
 	irda_insert_integer, /* Handler for any length integers */
 	irda_insert_integer, /* Handler for 8  bits integers */
 	irda_insert_integer, /* Handler for 16 bits integers */
@@ -449,7 +449,7 @@ static int irda_param_unpack(__u8 *buf, char *fmt, ...)
 int irda_param_insert(void *self, __u8 pi, __u8 *buf, int len,
 		      pi_param_info_t *info)
 {
-	pi_minor_info_t *pi_minor_info;
+	const pi_minor_info_t *pi_minor_info;
 	__u8 pi_minor;
 	__u8 pi_major;
 	int type;
@@ -504,7 +504,7 @@ EXPORT_SYMBOL(irda_param_insert);
 static int irda_param_extract(void *self, __u8 *buf, int len,
 			      pi_param_info_t *info)
 {
-	pi_minor_info_t *pi_minor_info;
+	const pi_minor_info_t *pi_minor_info;
 	__u8 pi_minor;
 	__u8 pi_major;
 	int type;
diff --git a/net/irda/qos.c b/net/irda/qos.c
index 5ed6c9a..25ba850 100644
--- a/net/irda/qos.c
+++ b/net/irda/qos.c
@@ -122,7 +122,7 @@ static __u32 max_line_capacities[10][4] = {
 	{ 800000, 400000, 160000, 80000 }, /* 16000000 bps */
 };
 
-static pi_minor_info_t pi_minor_call_table_type_0[] = {
+static const pi_minor_info_t pi_minor_call_table_type_0[] = {
 	{ NULL, 0 },
 /* 01 */{ irlap_param_baud_rate,       PV_INTEGER | PV_LITTLE_ENDIAN },
 	{ NULL, 0 },
@@ -134,7 +134,7 @@ static pi_minor_info_t pi_minor_call_table_type_0[] = {
 /* 08 */{ irlap_param_link_disconnect, PV_INT_8_BITS }
 };
 
-static pi_minor_info_t pi_minor_call_table_type_1[] = {
+static const pi_minor_info_t pi_minor_call_table_type_1[] = {
 	{ NULL, 0 },
 	{ NULL, 0 },
 /* 82 */{ irlap_param_max_turn_time,   PV_INT_8_BITS },
@@ -144,7 +144,7 @@ static pi_minor_info_t pi_minor_call_table_type_1[] = {
 /* 86 */{ irlap_param_min_turn_time,   PV_INT_8_BITS },
 };
 
-static pi_major_info_t pi_major_call_table[] = {
+static const pi_major_info_t pi_major_call_table[] = {
 	{ pi_minor_call_table_type_0, 9 },
 	{ pi_minor_call_table_type_1, 7 },
 };

^ permalink raw reply related

* Re: [ovs-dev] [PATCHv11 net-next 2/2] openvswitch: Add support for unique flow IDs.
From: Pravin Shelar @ 2014-12-10 18:29 UTC (permalink / raw)
  To: Joe Stringer; +Cc: dev@openvswitch.org, netdev, LKML
In-Reply-To: <CAOftzPjp3++6X50m27fhnAqVPsNRRfrhtmWGoeVi_8v3KCHWhA@mail.gmail.com>

On Wed, Dec 10, 2014 at 10:15 AM, Joe Stringer <joestringer@nicira.com> wrote:
> On 9 December 2014 at 22:11, Pravin Shelar <pshelar@nicira.com> wrote:
>> On Tue, Dec 9, 2014 at 4:25 PM, Joe Stringer <joestringer@nicira.com> wrote:
>>> On 9 December 2014 at 10:32, Pravin Shelar <pshelar@nicira.com> wrote:
>>>> On Tue, Dec 2, 2014 at 6:56 PM, Joe Stringer <joestringer@nicira.com> wrote:
>>>>> @@ -424,10 +475,9 @@ static struct sw_flow *masked_flow_lookup(struct table_instance *ti,
>>>>>         ovs_flow_mask_key(&masked_key, unmasked, mask);
>>>>>         hash = flow_hash(&masked_key, key_start, key_end);
>>>>>         head = find_bucket(ti, hash);
>>>>> -       hlist_for_each_entry_rcu(flow, head, hash_node[ti->node_ver]) {
>>>>> -               if (flow->mask == mask && flow->hash == hash &&
>>>>> -                   flow_cmp_masked_key(flow, &masked_key,
>>>>> -                                         key_start, key_end))
>>>>> +       hlist_for_each_entry_rcu(flow, head, flow_hash.node[ti->node_ver]) {
>>>>> +               if (flow->mask == mask && flow->flow_hash.hash == hash &&
>>>>> +                   flow_cmp_masked_key(flow, &masked_key, key_start, key_end))
>>>>>                         return flow;
>>>>>         }
>>>>>         return NULL;
>>>>> @@ -469,7 +519,40 @@ struct sw_flow *ovs_flow_tbl_lookup_exact(struct flow_table *tbl,
>>>>>         /* Always called under ovs-mutex. */
>>>>>         list_for_each_entry(mask, &tbl->mask_list, list) {
>>>>>                 flow = masked_flow_lookup(ti, match->key, mask);
>>>>> -               if (flow && ovs_flow_cmp_unmasked_key(flow, match))  /* Found */
>>>>> +               if (flow && !flow->ufid &&
>>>> why not NULL check for flow->unmasked_key here rather than ufid?
>>>
>>> In this version, I tried to consistently use flow->ufid as the switch
>>> for whether UFID exists or not. In the next version, this statement
>>> would refer to flow->id->ufid_len.
>>>
>>> The current approach means that ovs_flow_tbl_lookup_exact() is really
>>> ovs_flow_tbl_lookup_unmasked_key(). Do you think this should remain
>>> specific to unmasked key or should it be made to check that the
>>> identifier (ufid OR unmasked key) is the same?
>>
>> It is easier to read code if we check for flow->unmasked_key here.
>> ovs_flow_cmp_unmasked_key() has assert on ufid anyways.
>
> With the change to put UFID/unmasked key in the same struct, there
> will be no such pointer to check, only ufid_len.
>
right, Lets keep the check for ufid_len.

> However, we could shift this check at the start of the function instead.

^ permalink raw reply

* Re: atomic operations bottleneck in the IPv6 stack
From: Hannes Frederic Sowa @ 2014-12-10 17:58 UTC (permalink / raw)
  To: cristian.bercaru@freescale.com
  Cc: netdev@vger.kernel.org, R89243@freescale.com,
	Madalin-Cristian Bucur, Razvan.Ungureanu@freescale.com
In-Reply-To: <1418231763.24395.2.camel@redhat.com>

On Mi, 2014-12-10 at 18:16 +0100, Hannes Frederic Sowa wrote:
> On Mi, 2014-12-10 at 16:56 +0000, cristian.bercaru@freescale.com wrote:
> > 
> > It seems to me that the atomic operations on the IPv6 forwarding path
> > are a bottleneck and they are not scalable with the number of cores.
> > Am I right? What improvements can be brought to the IPv6 kernel code
> > to make it less dependent of atomic operations/variables?
> 
> For a starter, something like the following commit:
> 
> commit d26b3a7c4b3b26319f18bb645de93eba8f4bdcd5
> Author: Eric Dumazet <edumazet@google.com>
> Date:   Tue Jul 31 05:45:30 2012 +0000
> 
>     ipv4: percpu nh_rth_output cache

Actually, we should be able to remove the atomics in input and
forwarding path by just relying on RCU. I'll have a look.

Bye,
Hannes

^ permalink raw reply

* Re: [net-next PATCH 0/6] net: Alloc NAPI page frags from their own pool
From: David Miller @ 2014-12-10 18:32 UTC (permalink / raw)
  To: alexander.h.duyck; +Cc: netdev, ast, eric.dumazet, brouer
In-Reply-To: <20141210033902.2114.68658.stgit@ahduyck-vm-fedora20>

From: Alexander Duyck <alexander.h.duyck@redhat.com>
Date: Tue, 09 Dec 2014 19:40:35 -0800

> This patch series implements a means of allocating page fragments without
> the need for the local_irq_save/restore in __netdev_alloc_frag.  By doing
> this I am able to decrease packet processing time by 11ns per packet in my
> test environment.

Looks great, series applied, thanks Alex.

^ permalink raw reply

* Re: [PATCH v2] if_bridge: fix conflict with glibc
From: David Miller @ 2014-12-10 18:34 UTC (permalink / raw)
  To: stephen; +Cc: gregory.0xf0, f.fainelli, xiyou.wangcong, netdev
In-Reply-To: <20141209214122.76b15851@urahara>

From: Stephen Hemminger <stephen@networkplumber.org>
Date: Tue, 9 Dec 2014 21:41:22 -0800

> Even though kernel and glibc headers have same effective values
> Gcc complains about redefinitions. Since this is a header expected
> to be used by userspace, use glibc header.
> 
> This supersedes change in commit 66f1c44887ba4f47d617f8ae21cf8e04e1892bd7
> and fixes build of iproute2 with Glibc-2.19. This follows similar usage
> in include/uapi/linux for l2tp.h
> 
> Signed-off-by: Stephen Hemminger <stephen@networkplumber.org>
> 
> --- a/include/uapi/linux/if_bridge.h	2014-12-09 20:25:21.656016605 -0800
> +++ b/include/uapi/linux/if_bridge.h	2014-12-09 21:32:01.391034756 -0800
> @@ -15,7 +15,9 @@
>  
>  #include <linux/types.h>
>  #include <linux/if_ether.h>
> -#include <linux/in6.h>
> +#ifndef __KERNEL__
> +#include <netinet/in.h>
> +#endif

No, we really want to incluse the linux/in6.h header, as that's where all
the special GLIBC CPP checks are, such as:

#if __UAPI_DEF_IN6_ADDR_ALT

Please research how we have resolved the conflict between GLIBC and the
kernel's exported headers.  We really need to use linux/in6.h for all of
this to work.

I understand that it is upsetting that iproute2 stopped building for you,
but I'd like to kindly ask that you look more deeply into this and think
more longer term, rather than having a knee jerk reaction and looking for
quick fixes.

Thanks.

^ permalink raw reply

* Re: [bisected] xfrm: TCP connection initiating PMTU discovery stalls on v3.
From: Wolfgang Walter @ 2014-12-10 18:34 UTC (permalink / raw)
  To: Eric Dumazet
  Cc: Thomas Jarosch, netdev, Eric Dumazet, Herbert Xu,
	Steffen Klassert
In-Reply-To: <1418161219.27198.10.camel@edumazet-glaptop2.roam.corp.google.com>

Am Dienstag, 9. Dezember 2014, 13:40:19 schrieb Eric Dumazet:
> On Tue, 2014-12-09 at 21:36 +0100, Wolfgang Walter wrote:
> > How would that be done? I found no way to disable it especially for xfrm.
> > I
> > disabled gso for the interface which serves the ipsec traffic but this
> > does
> > not help. tcp still uses gso for the esp tunnel.
> > 
> > I put a view printk's in net/xfrm/xfrm_output.c and net/ipv4/tcp_output.c.
> > (I try to understand where in the xfrm transformation gso is handeled).
> > 
> > What I can say yet is:
> > 
> > xfrm_output() is used with ipsec (esp) tunnel mode but at I never see gso
> > packets here. xfrm_output_gso() is never called.
> > 
> > Everytime tcp_set_skb_tso_segs() is called for a tcp connection over the
> > esp- tunnel and it is a gso case then the tcp connection hangs. Those
> > packets always have skb->len 1398 and mss_now is 1374. I see a call of
> > xfrm_output() afterwards but for a packet of skb->len 52 (maybe ACK from
> > other direction?).
> > 
> > As long as the tcp-connection over the ipsec-tunnel works and if I send
> > bulk traffic xfrm_output() is called 3 times with packet skb->len 1426
> > and then one time with 78 (maybe other direction?), don't know if that is
> > of any interest.
> > 
> > 
> > With non-ipsec-traffic gso works fine: in this case the skb->len() varies
> > a
> > lot and mss_now is always 1288.
> 
> Presumably something happens so that sk_can_gso() returns false.
> 
> But apparently, this happens _after_ tcp_sendmsg(), ie a bit too late.
> 
> Note that after https://patchwork.ozlabs.org/patch/418506/ is applied,
> fix would simply be :
> 
> diff --git a/net/core/sock.c b/net/core/sock.c
> index
> 9a56b2000c3f374fb95aedada3327447816a9512..678ef8393680dc781445c5f121719ea8e
> a7bb7c1 100644 --- a/net/core/sock.c
> +++ b/net/core/sock.c
> @@ -1585,6 +1585,8 @@ void sk_setup_caps(struct sock *sk, struct dst_entry
> *dst) sk->sk_gso_max_size = dst->dev->gso_max_size;
>  			sk->sk_gso_max_segs = dst->dev->gso_max_segs;
>  		}
> +	} else {
> +		sk->sk_gso_max_segs = 1;
>  	}
>  }
>  EXPORT_SYMBOL_GPL(sk_setup_caps);

Ok. I tried that. I backported https://patchwork.ozlabs.org/patch/418506/ to 
3.14.26 and then applied this patch. Still hangs. At that stage sk_can_gso(sk) 
is true. The reason is that the interface of *dst in sk_setup_caps() is the 
interface which serves the ipsec traffic.

There is a difference, though. If I disable gso for the interface which serves 
the ipsec traffic then the hang disappears now. This seems to be because of 
the patch above: sk_can_gso(sk) in sk_setup_caps then returns false and the ne 
else branch is taken. So there may be a hidden bug in the non-gso case.

Back to xfrm case with hang:

I see: a call of sk_setup_caps() which takes the path
		sk->sk_route_caps |= NETIF_F_SG | NETIF_F_HW_CSUM;
		...

So gso is on. When the hang happens sk_setup_caps is called from		
inet_sk_rebuild_header(). Now the path

		sk->sk_route_caps &= ~NETIF_F_GSO_MASK;

is taken as dst->header_len is now non zero.

This is the reason why later calls of sk_can_gso() return false.

I'll try to change the above patch to

@@ -1585,6 +1585,8 @@ void sk_setup_caps(struct sock *sk, struct dst_entry
*dst) sk->sk_gso_max_size = dst->dev->gso_max_size;
 			sk->sk_gso_max_segs = dst->dev->gso_max_segs;
 		}
	}
+   if (sk_can_gso(sk)) {
+		sk->sk_gso_max_segs = 1;
 	}
 }
 EXPORT_SYMBOL_GPL(sk_setup_caps);

so that the case that GSO is disabled because of dst->header_len != 0 sets 
sk_gso_max_segs, too.



Regards,
-- 
Wolfgang Walter
Studentenwerk München
Anstalt des öffentlichen Rechts

^ permalink raw reply

* Re: [PATCH net] Fix race condition between vxlan_sock_add and vxlan_sock_release
From: Marcelo Ricardo Leitner @ 2014-12-10 18:34 UTC (permalink / raw)
  To: David Miller; +Cc: netdev
In-Reply-To: <20141210.131133.729833991671277249.davem@davemloft.net>

On 10-12-2014 16:11, David Miller wrote:
> From: Marcelo Ricardo Leitner <mleitner@redhat.com>
> Date: Tue,  9 Dec 2014 12:28:28 -0200
>
>> Currently, when trying to reuse a socket, vxlan_sock_add will grab
>> vn->sock_lock, locate a reusable socket, inc refcount and release
>> vn->sock_lock.
>>
>> But vxlan_sock_release() will first decrement refcount, and then grab
>> that lock. refcnt operations are atomic but as currently we have
>> deferred works which hold vs->refcnt each, this might happen, leading to
>> a use after free (specially after vxlan_igmp_leave):
>>
>>    CPU 1                            CPU 2
>>
>> deferred work                    vxlan_sock_add
>
> Just make vxlan_sock_add() do atomic_add_unless(x, 1, 0), that way
> if vxlan_sock_add() sees the count at zero it can just act as if
> no such reusable socket exists.

Interesting, I had thought of this, but it seemed a bit messy.
But okay, I see the pros on it, will go that way. Thanks!

   Marcelo

^ permalink raw reply

* Re: xen-netback: make feature-rx-notify mandatory -- Breaks stubdoms
From: David Vrabel @ 2014-12-10 18:39 UTC (permalink / raw)
  To: Ian Campbell
  Cc: John, Xen-devel@lists.xen.org, Wei Liu, netdev@vger.kernel.org
In-Reply-To: <1418228446.3505.81.camel@citrix.com>

On 10/12/14 16:20, Ian Campbell wrote:
> On Wed, 2014-12-10 at 15:29 +0000, David Vrabel wrote:
>> On 10/12/14 15:07, Ian Campbell wrote:
>>> On Wed, 2014-12-10 at 14:12 +0000, David Vrabel wrote:
>>>> On 10/12/14 13:42, John wrote:
>>>>> David,
>>>>>
>>>>> This patch you put into 3.18.0 appears to break the latest version of
>>>>> stubdomains. I found this out today when I tried to update a machine to
>>>>> 3.18.0 and all of the domUs crashed on start with the dmesg output like
>>>>> this:
>>>>
>>>> Cc'ing the lists and relevant netback maintainers.
>>>>
>>>> I guess the stubdoms are using minios's netfront?  This is something I
>>>> forgot about when deciding if it was ok to make this feature mandatory.
>>>
>>> Oh bum, me too :/
>>>
>>>> The patch cannot be reverted as it's a prerequisite for a critical
>>>> (security) bug fix.  I am also unconvinced that the no-feature-rx-notify
>>>> support worked correctly anyway.
>>>>
>>>> This can be resolved by:
>>>>
>>>> - Fixing minios's netfront to support feature-rx-notify. This should be
>>>> easy but wouldn't help existing Xen deployments.
>>>
>>> I think this is worth doing in its own right, but as you say it doesn't
>>> help existing users.
>>>
>>>> - Reimplement feature-rx-notify support.  I think the easiest way is to
>>>> queue packets on the guest Rx internal queue with a short expiry time.
>>>
>>> Right, I don't think we especially need to make this case good (so long
>>> as it doesn't reintroduce a security hole!).
>>>
>>> In principal we aren't really obliged to queue at all, but since all the
>>> infrastructure for queuing and timing out all exists I suppose it would
>>> be simple enough to implement and a bit less harsh.
>>>
>>> Given we now have XENVIF_RX_QUEUE_BYTES and rx_drain_timeout_jiffies we
>>> don't have the infinite queue any more. So does the expiry in this case
>>> actually need to be shorter than the norm? Does it cause any extra
>>> issues to keep them around for tx_drain_timeout_jiffies rather than some
>>> shorter time?
>>
>> If the internal guest rx queue fills and the (host) tx queue is stopped,
>> it will take tx_drain_timeout for the thread to wake up and notice if
>> the frontend placed any rx requests on the ring.  This could potentially
>> end up where you shovel 512k through stall for 10 s, put another 512k
>> through, stall for 10 s again and so on.
> 
> Ah, true, that's not so great.
> 
> What about if we don't queue at all(*) if rx-notify isn't supported, i.e
> just drop the packet on the floor in start_xmit if the ring is full?
> Would that be so bad? It would surely be simple...

There needs to be a queue between start_xmit and the rx thread so
checking for ring state in start_xmit doesn't help here since the
internal queue can fill before the thread wakes and begins to drain it.

netback could complete the request directly in start_xmit, avoiding the
internal queue but not allowing for any batching but I don't think it is
a good idea to add a different data path for this mode.

> (*) Not counting the "queue" which is the ring itself.
> 
>> The rx stall detection will also need to be disabled since there would
>> be no way for the frontend to signal rx ready.
> 
> Agreed.
> 
> Could be trivially argued to be safe if we were just dropping packets on
> ring overflow...

David

^ permalink raw reply

* Re: [PATCH v2] net: introduce helper macro for_each_cmsghdr
From: David Miller @ 2014-12-10 18:48 UTC (permalink / raw)
  To: guz.fnst; +Cc: netdev, linux-kernel, joe
In-Reply-To: <5487DBD9.1010908@cn.fujitsu.com>

From: Gu Zheng <guz.fnst@cn.fujitsu.com>
Date: Wed, 10 Dec 2014 13:36:25 +0800

> Introduce helper macro for_each_cmsghdr as a wrapper of the enumerating
> cmsghdr from msghdr, just cleanup. 
> 
> Signed-off-by: Gu Zheng <guz.fnst@cn.fujitsu.com>

Applied, thanks.

^ permalink raw reply

* Re: [PATCH net-next v2] enic: add support for set/get rss hash key
From: David Miller @ 2014-12-10 18:49 UTC (permalink / raw)
  To: _govind; +Cc: netdev, ssujith, benve
In-Reply-To: <1418199023-12451-1-git-send-email-_govind@gmx.com>

From: Govindarajulu Varadarajan <_govind@gmx.com>
Date: Wed, 10 Dec 2014 13:40:23 +0530

> This patch adds support for setting/getting rss hash key using ethtool.
> 
> v2:
> respin patch to support RSS hash function changes.
> 
> Signed-off-by: Govindarajulu Varadarajan <_govind@gmx.com>

Applied, thanks.

^ permalink raw reply

* Re: [PATCH net-next RESEND 0/2] fix rculist sparse errors
From: David Miller @ 2014-12-10 18:49 UTC (permalink / raw)
  To: ying.xue
  Cc: paulmck, eric.dumazet, jon.maloy, erik.hugne, netdev, kbuild-all,
	linux-kernel
In-Reply-To: <1418201167-9591-1-git-send-email-ying.xue@windriver.com>

From: Ying Xue <ying.xue@windriver.com>
Date: Wed, 10 Dec 2014 16:46:05 +0800

> When hlist_for_each_entry_continue_rcu_bh() gets "next" pointer of
> hlist_node structure through rcu_dereference_bh(), sparse warning
> appears as the "next" pointer is not annotated as __rcu. So if
> the "next" pointer is accessed with hlist_next_rcu() macro, the
> __rcu annotation will be added to the pointer. As a consequence,
> sparse warning is eliminated too.
> 
> The similar errors also appear in hlist_for_each_entry_continue_rcu()
> and hlist_for_each_entry_from_rcu().
> 
> In this version, CC more people like Paul E. McKenney and lkml mail
> list.

The rculist.h changes should go via Paul's tree, not mine.

^ 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