Netdev List
 help / color / mirror / Atom feed
* Re: [RFC] iproute: Add support for extended ack to rtnl_talk
From: David Miller @ 2017-05-04 14:41 UTC (permalink / raw)
  To: dsahern; +Cc: daniel, stephen, netdev
In-Reply-To: <7315b681-9c78-4bc1-ab74-64509ab5887d@gmail.com>

From: David Ahern <dsahern@gmail.com>
Date: Thu, 4 May 2017 08:27:35 -0600

> On 5/4/17 3:36 AM, Daniel Borkmann wrote:
>> What is the clear benefit/rationale of outsourcing this to
>> libmnl? I always was the impression we should strive for as little
>> dependencies as possible?
> 
> +1

Agreed, all else being equal iproute2 should be as self contained
as possible since it is such a fundamental tool.

^ permalink raw reply

* Re: [PATCH] net:ethernet:aquantia:atlantic: Switch to use napi_gro_receive
From: David Miller @ 2017-05-04 14:42 UTC (permalink / raw)
  To: Pavel.Belous; +Cc: netdev, darcari
In-Reply-To: <16bc94e6bb9cc977a9a9e0cac48ae91ff7198f05.1493829200.git.pavel.belous@aquantia.com>

From: Pavel Belous <Pavel.Belous@aquantia.com>
Date: Wed,  3 May 2017 19:57:10 +0300

> From: Pavel Belous <pavel.belous@aquantia.com>
> 
> Add support for GRO (generic receive offload) for aQuantia Atlantic driver.
> This results in a perfomance improvement when GRO is enabled.
> 
> Signed-off-by: Pavel Belous <pavel.belous@aquantia.com>

Please format your Subject line properly.

You have _way_ too many subsystem prefixes, and when there are more
than one they should be separated by spaces like "a: b: c:"

In this case an appropriate Subject line would be:

[PATCH net-next] aquantia: Switch to use napi_gro_receive().

But since this is a new feature, and the net-next tree is currently
closed, you will have to resubmit this when the net-next tree
opens.

Thank you.

^ permalink raw reply

* [PATCH net] rtnetlink: NUL-terminate IFLA_PHYS_PORT_NAME string
From: Michal Schmidt @ 2017-05-04 14:48 UTC (permalink / raw)
  To: netdev; +Cc: Thomas Haller, David Ahern

IFLA_PHYS_PORT_NAME is a string attribute, so terminate it with \0.
Otherwise libnl3 fails to validate netlink messages with this attribute.
"ip -detail a" assumes too that the attribute is NUL-terminated when
printing it. It often was, due to padding.

I noticed this as libvirtd failing to start on a system with sfc driver
after upgrading it to Linux 4.11, i.e. when sfc added support for
phys_port_name.

Signed-off-by: Michal Schmidt <mschmidt@redhat.com>
---
 net/core/rtnetlink.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/net/core/rtnetlink.c b/net/core/rtnetlink.c
index c4e84c5582..69daf393cb 100644
--- a/net/core/rtnetlink.c
+++ b/net/core/rtnetlink.c
@@ -1056,7 +1056,7 @@ static int rtnl_phys_port_name_fill(struct sk_buff *skb, struct net_device *dev)
 		return err;
 	}
 
-	if (nla_put(skb, IFLA_PHYS_PORT_NAME, strlen(name), name))
+	if (nla_put_string(skb, IFLA_PHYS_PORT_NAME, name))
 		return -EMSGSIZE;
 
 	return 0;
-- 
2.12.2

^ permalink raw reply related

* [PATCH] x86/asm: Don't use rbp as temp register in csum_partial_copy_generic()
From: Josh Poimboeuf @ 2017-05-04 14:51 UTC (permalink / raw)
  To: x86
  Cc: Andrey Konovalov, linux-kernel, Vlad Yasevich, Neil Horman,
	David S . Miller, linux-sctp, netdev, Marcelo Ricardo Leitner,
	Dmitry Vyukov, Kostya Serebryany, syzkaller, Eric Dumazet,
	Cong Wang

Andrey Konovalov reported the following warning while fuzzing the kernel
with syzkaller:

  WARNING: kernel stack regs at ffff8800686869f8 in a.out:4933 has bad 'bp' value c3fc855a10167ec0

The unwinder dump revealed that rbp had a bad value when an interrupt
occurred in csum_partial_copy_generic().

That function saves rbp on the stack and then overwrites it, using it as
a scratch register.  That's problematic because it breaks stack traces
if an interrupt occurs in the middle of the function.

Replace the usage of rbp with another callee-saved register (r15) so
stack traces are no longer be affected.

Reported-by: Andrey Konovalov <andreyknvl@google.com>
Tested-by: Andrey Konovalov <andreyknvl@google.com>
Signed-off-by: Josh Poimboeuf <jpoimboe@redhat.com>
---
 arch/x86/lib/csum-copy_64.S | 12 ++++++------
 1 file changed, 6 insertions(+), 6 deletions(-)

diff --git a/arch/x86/lib/csum-copy_64.S b/arch/x86/lib/csum-copy_64.S
index 7e48807..45a53df 100644
--- a/arch/x86/lib/csum-copy_64.S
+++ b/arch/x86/lib/csum-copy_64.S
@@ -55,7 +55,7 @@ ENTRY(csum_partial_copy_generic)
 	movq  %r12, 3*8(%rsp)
 	movq  %r14, 4*8(%rsp)
 	movq  %r13, 5*8(%rsp)
-	movq  %rbp, 6*8(%rsp)
+	movq  %r15, 6*8(%rsp)
 
 	movq  %r8, (%rsp)
 	movq  %r9, 1*8(%rsp)
@@ -74,7 +74,7 @@ ENTRY(csum_partial_copy_generic)
 	/* main loop. clear in 64 byte blocks */
 	/* r9: zero, r8: temp2, rbx: temp1, rax: sum, rcx: saved length */
 	/* r11:	temp3, rdx: temp4, r12 loopcnt */
-	/* r10:	temp5, rbp: temp6, r14 temp7, r13 temp8 */
+	/* r10:	temp5, r15: temp6, r14 temp7, r13 temp8 */
 	.p2align 4
 .Lloop:
 	source
@@ -89,7 +89,7 @@ ENTRY(csum_partial_copy_generic)
 	source
 	movq  32(%rdi), %r10
 	source
-	movq  40(%rdi), %rbp
+	movq  40(%rdi), %r15
 	source
 	movq  48(%rdi), %r14
 	source
@@ -103,7 +103,7 @@ ENTRY(csum_partial_copy_generic)
 	adcq  %r11, %rax
 	adcq  %rdx, %rax
 	adcq  %r10, %rax
-	adcq  %rbp, %rax
+	adcq  %r15, %rax
 	adcq  %r14, %rax
 	adcq  %r13, %rax
 
@@ -121,7 +121,7 @@ ENTRY(csum_partial_copy_generic)
 	dest
 	movq %r10, 32(%rsi)
 	dest
-	movq %rbp, 40(%rsi)
+	movq %r15, 40(%rsi)
 	dest
 	movq %r14, 48(%rsi)
 	dest
@@ -203,7 +203,7 @@ ENTRY(csum_partial_copy_generic)
 	movq 3*8(%rsp), %r12
 	movq 4*8(%rsp), %r14
 	movq 5*8(%rsp), %r13
-	movq 6*8(%rsp), %rbp
+	movq 6*8(%rsp), %r15
 	addq $7*8, %rsp
 	ret
 
-- 
2.7.4

^ permalink raw reply related

* Re: [PATCH] net:ethernet:aquantia:atlantic: Switch to use napi_gro_receive
From: Pavel Belous @ 2017-05-04 14:53 UTC (permalink / raw)
  To: David Miller; +Cc: netdev, darcari
In-Reply-To: <20170504.104257.1536182180703411206.davem@davemloft.net>



On 04.05.2017 17:42, David Miller wrote:
> From: Pavel Belous <Pavel.Belous@aquantia.com>
> Date: Wed,  3 May 2017 19:57:10 +0300
>
>> From: Pavel Belous <pavel.belous@aquantia.com>
>>
>> Add support for GRO (generic receive offload) for aQuantia Atlantic driver.
>> This results in a perfomance improvement when GRO is enabled.
>>
>> Signed-off-by: Pavel Belous <pavel.belous@aquantia.com>
>
> Please format your Subject line properly.
>
> You have _way_ too many subsystem prefixes, and when there are more
> than one they should be separated by spaces like "a: b: c:"
>
> In this case an appropriate Subject line would be:
>
> [PATCH net-next] aquantia: Switch to use napi_gro_receive().
>
> But since this is a new feature, and the net-next tree is currently
> closed, you will have to resubmit this when the net-next tree
> opens.
>
> Thank you.
>

Ok. I will re-submit the patch when net-next tree opens.

Thank you,
Pavel

^ permalink raw reply

* Re: [PATCH 1/1] forcedeth: remove unnecessary carrier status check
From: David Miller @ 2017-05-04 14:58 UTC (permalink / raw)
  To: yanjun.zhu; +Cc: netdev
In-Reply-To: <1493786622-16654-1-git-send-email-yanjun.zhu@oracle.com>

From: Zhu Yanjun <yanjun.zhu@oracle.com>
Date: Wed,  3 May 2017 00:43:42 -0400

> Since netif_carrier_on() will do nothing if device's
> carrier is already on, so it's unnecessary to do
> carrier status check.
> 
> It's the same for netif_carrier_off().
> 
> Signed-off-by: Zhu Yanjun <yanjun.zhu@oracle.com>

Applied, thanks.

^ permalink raw reply

* Re: [PATCH v2 net] tcp: do not inherit fastopen_req from parent
From: David Miller @ 2017-05-04 15:00 UTC (permalink / raw)
  To: eric.dumazet; +Cc: netdev, weiwan, andreyknvl
In-Reply-To: <1493818771.7796.13.camel@edumazet-glaptop3.roam.corp.google.com>

From: Eric Dumazet <eric.dumazet@gmail.com>
Date: Wed, 03 May 2017 06:39:31 -0700

> From: Eric Dumazet <edumazet@google.com>
> 
> Under fuzzer stress, it is possible that a child gets a non NULL
> fastopen_req pointer from its parent at accept() time, when/if parent
> morphs from listener to active session.
> 
> We need to make sure this can not happen, by clearing the field after
> socket cloning.
 ...
> Fixes: e994b2f0fb92 ("tcp: do not lock listener to process SYN packets")
> Fixes: 7db92362d2fe ("tcp: fix potential double free issue for fastopen_req")
> Signed-off-by: Eric Dumazet <edumazet@google.com>
> Reported-by: Andrey Konovalov <andreyknvl@google.com>

Applied and queued up for -stable, thanks Eric.

^ permalink raw reply

* Re: [PATCH] net/sched: remove redundant null check on head
From: David Miller @ 2017-05-04 15:01 UTC (permalink / raw)
  To: colin.king
  Cc: jhs, xiyou.wangcong, jiri, netdev, kernel-janitors, linux-kernel
In-Reply-To: <20170503135040.32023-1-colin.king@canonical.com>

From: Colin King <colin.king@canonical.com>
Date: Wed,  3 May 2017 14:50:40 +0100

> From: Colin Ian King <colin.king@canonical.com>
> 
> head is previously null checked and so the 2nd null check on head
> is redundant and therefore can be removed.
> 
> Detected by CoverityScan, CID#1399505 ("Logically dead code")
> 
> Signed-off-by: Colin Ian King <colin.king@canonical.com>

Applied.

^ permalink raw reply

* Re: [PATCH] ipv4, ipv6: ensure raw socket message is big enough to hold an IP header
From: David Miller @ 2017-05-04 15:07 UTC (permalink / raw)
  To: glider; +Cc: dvyukov, kcc, edumazet, kuznet, linux-kernel, netdev
In-Reply-To: <20170503150658.44421-1-glider@google.com>

From: Alexander Potapenko <glider@google.com>
Date: Wed,  3 May 2017 17:06:58 +0200

> raw_send_hdrinc() and rawv6_send_hdrinc() expect that the buffer copied
> from the userspace contains the IPv4/IPv6 header, so if too few bytes are
> copied, parts of the header may remain uninitialized.
> 
> This bug has been detected with KMSAN.
> 
> Signed-off-by: Alexander Potapenko <glider@google.com>

Applied and queued up for -stable, thanks.

^ permalink raw reply

* Re: [PATCH v2] aquantia: Fix driver name reported by ethtool
From: David Miller @ 2017-05-04 15:07 UTC (permalink / raw)
  To: Pavel.Belous; +Cc: netdev, darcari
In-Reply-To: <2082aed4d8196250542cf9a73f3d9a49eb96af21.1493835234.git.pavel.belous@aquantia.com>

From: Pavel Belous <Pavel.Belous@aquantia.com>
Date: Wed,  3 May 2017 21:17:44 +0300

> From: Pavel Belous <pavel.belous@aquantia.com>
> 
> V2: using "aquantia" subsystem tag.
> 
> The command "ethtool -i ethX" should display driver name (driver: atlantic)
> instead vendor name (driver: aquantia).
> 
> Signed-off-by: Pavel Belous <pavel.belous@aquantia.com>

Applied, thanks.

^ permalink raw reply

* Re: [PATCH net] netvsc: make sure napi enabled before vmbus_open
From: David Miller @ 2017-05-04 15:08 UTC (permalink / raw)
  To: stephen; +Cc: netdev, sthemmin
In-Reply-To: <20170503235921.31407-1-sthemmin@microsoft.com>

From: Stephen Hemminger <stephen@networkplumber.org>
Date: Wed,  3 May 2017 16:59:21 -0700

> This fixes a race where vmbus callback for new packet arriving
> could occur before NAPI is initialized.
> 
> Signed-off-by: Stephen Hemminger <sthemmin@microsoft.com>

Applied, thanks Stephen.

^ permalink raw reply

* Re: [net-next] net: remove duplicate add_device_randomness() call
From: David Miller @ 2017-05-04 15:13 UTC (permalink / raw)
  To: zhangshengju; +Cc: netdev, edumazet
In-Reply-To: <1493869242-65468-1-git-send-email-zhangshengju@cmss.chinamobile.com>

From: Zhang Shengju <zhangshengju@cmss.chinamobile.com>
Date: Thu,  4 May 2017 11:40:42 +0800

> Since register_netdevice() already call add_device_randomness() and
> dev_set_mac_address() will call it after mac address change.
> It's not necessary to call at device UP.
> 
> Signed-off-by: Zhang Shengju <zhangshengju@cmss.chinamobile.com>

The net-next tree is closed, please resubmit this when the net-next
tree opens back up.

^ permalink raw reply

* Re: [PATCH] cfg80211: make RATE_INFO_BW_20 the default
From: David Miller @ 2017-05-04 15:13 UTC (permalink / raw)
  To: johannes; +Cc: linux-wireless, torvalds, netdev, johannes.berg
In-Reply-To: <20170504064230.22058-1-johannes@sipsolutions.net>

From: Johannes Berg <johannes@sipsolutions.net>
Date: Thu,  4 May 2017 08:42:30 +0200

> From: Johannes Berg <johannes.berg@intel.com>
> 
> Due to the way I did the RX bitrate conversions in mac80211 with
> spatch, going setting flags to setting the value, many drivers now
> don't set the bandwidth value for 20 MHz, since with the flags it
> wasn't necessary to (there was no 20 MHz flag, only the others.)
> 
> Rather than go through and try to fix up all the drivers, instead
> renumber the enum so that 20 MHz, which is the typical bandwidth,
> actually has the value 0, making those drivers all work again.
> 
> If VHT was hit used with a driver not reporting it, e.g. iwlmvm,
> this manifested in hitting the bandwidth warning in
> cfg80211_calculate_bitrate_vht().
> 
> Reported-by: Linus Torvalds <torvalds@linux-foundation.org>
> Signed-off-by: Johannes Berg <johannes.berg@intel.com>

Johannes, would you like me to merge this in via my tree directly?

Thanks.

^ permalink raw reply

* Re: [PATCH] iproute2: hide devices starting with period by default
From: Nicolas Dichtel @ 2017-05-04 15:15 UTC (permalink / raw)
  To: David Ahern; +Cc: David Miller, stephen, netdev
In-Reply-To: <0a8e1cf0-9f30-2356-5168-a97abb86d5c2@cumulusnetworks.com>

Le 24/02/2017 à 16:52, David Ahern a écrit :
> On 2/23/17 8:12 PM, David Miller wrote:
>> This really need to be a fundamental facility, so that it transparently
>> works for NetworkManager, router daemons, everything.  Not just iproute2
>> and "ls".
> 
> I'll rebase my patch and send out as RFC.
> 
David, did you finally send those patches?


Thank you,
Nicolas

^ permalink raw reply

* [PATCH net v2 0/3] qed*: Bug fix series.
From: Sudarsana Reddy Kalluru @ 2017-05-04 15:15 UTC (permalink / raw)
  To: davem; +Cc: netdev, Yuval.Mintz, Sudarsana Reddy Kalluru

From: Sudarsana Reddy Kalluru <Sudarsana.Kalluru@cavium.com>

The series contains minor bug fixes for qed/qede drivers.

Please consider applying it to 'net' branch.

Changes from previous versions:
-------------------------------
v2: Removed the incorrect comment message.

Sudarsana Reddy Kalluru (3):
  qed*: Fix possible overflow for status block id field.
  qed: Fix overriding of supported autoneg value.
  qede: Fix possible misconfiguration of advertised autoneg value.

 drivers/net/ethernet/qlogic/qed/qed_dev.c       | 11 +++++++----
 drivers/net/ethernet/qlogic/qed/qed_dev_api.h   |  4 ++--
 drivers/net/ethernet/qlogic/qed/qed_main.c      |  8 ++++++--
 drivers/net/ethernet/qlogic/qed/qed_mcp.h       |  1 +
 drivers/net/ethernet/qlogic/qede/qede_ethtool.c | 10 +++++++---
 include/linux/qed/qed_if.h                      |  2 +-
 6 files changed, 24 insertions(+), 12 deletions(-)

-- 
1.8.3.1

^ permalink raw reply

* [PATCH net v2 1/3] qed*: Fix possible overflow for status block id field.
From: Sudarsana Reddy Kalluru @ 2017-05-04 15:15 UTC (permalink / raw)
  To: davem; +Cc: netdev, Yuval.Mintz
In-Reply-To: <20170504151505.4407-1-sudarsana.kalluru@cavium.com>

Value for status block id could be more than 256 in 100G mode, need to
update its data type from u8 to u16.

Signed-off-by: Sudarsana Reddy Kalluru <Sudarsana.Kalluru@cavium.com>
Signed-off-by: Yuval Mintz <Yuval.Mintz@cavium.com>
---
 drivers/net/ethernet/qlogic/qed/qed_dev.c       | 8 ++++----
 drivers/net/ethernet/qlogic/qed/qed_dev_api.h   | 4 ++--
 drivers/net/ethernet/qlogic/qed/qed_main.c      | 2 +-
 drivers/net/ethernet/qlogic/qede/qede_ethtool.c | 5 ++---
 include/linux/qed/qed_if.h                      | 2 +-
 5 files changed, 10 insertions(+), 11 deletions(-)

diff --git a/drivers/net/ethernet/qlogic/qed/qed_dev.c b/drivers/net/ethernet/qlogic/qed/qed_dev.c
index 5f31140..5c6874a 100644
--- a/drivers/net/ethernet/qlogic/qed/qed_dev.c
+++ b/drivers/net/ethernet/qlogic/qed/qed_dev.c
@@ -3586,7 +3586,7 @@ static int qed_set_coalesce(struct qed_hwfn *p_hwfn, struct qed_ptt *p_ptt,
 }
 
 int qed_set_rxq_coalesce(struct qed_hwfn *p_hwfn, struct qed_ptt *p_ptt,
-			 u16 coalesce, u8 qid, u16 sb_id)
+			 u16 coalesce, u16 qid, u16 sb_id)
 {
 	struct ustorm_eth_queue_zone eth_qzone;
 	u8 timeset, timer_res;
@@ -3607,7 +3607,7 @@ int qed_set_rxq_coalesce(struct qed_hwfn *p_hwfn, struct qed_ptt *p_ptt,
 	}
 	timeset = (u8)(coalesce >> timer_res);
 
-	rc = qed_fw_l2_queue(p_hwfn, (u16)qid, &fw_qid);
+	rc = qed_fw_l2_queue(p_hwfn, qid, &fw_qid);
 	if (rc)
 		return rc;
 
@@ -3628,7 +3628,7 @@ int qed_set_rxq_coalesce(struct qed_hwfn *p_hwfn, struct qed_ptt *p_ptt,
 }
 
 int qed_set_txq_coalesce(struct qed_hwfn *p_hwfn, struct qed_ptt *p_ptt,
-			 u16 coalesce, u8 qid, u16 sb_id)
+			 u16 coalesce, u16 qid, u16 sb_id)
 {
 	struct xstorm_eth_queue_zone eth_qzone;
 	u8 timeset, timer_res;
@@ -3649,7 +3649,7 @@ int qed_set_txq_coalesce(struct qed_hwfn *p_hwfn, struct qed_ptt *p_ptt,
 	}
 	timeset = (u8)(coalesce >> timer_res);
 
-	rc = qed_fw_l2_queue(p_hwfn, (u16)qid, &fw_qid);
+	rc = qed_fw_l2_queue(p_hwfn, qid, &fw_qid);
 	if (rc)
 		return rc;
 
diff --git a/drivers/net/ethernet/qlogic/qed/qed_dev_api.h b/drivers/net/ethernet/qlogic/qed/qed_dev_api.h
index cefe3ee..12d16c0 100644
--- a/drivers/net/ethernet/qlogic/qed/qed_dev_api.h
+++ b/drivers/net/ethernet/qlogic/qed/qed_dev_api.h
@@ -454,7 +454,7 @@ int qed_final_cleanup(struct qed_hwfn *p_hwfn,
  * @return int
  */
 int qed_set_rxq_coalesce(struct qed_hwfn *p_hwfn, struct qed_ptt *p_ptt,
-			 u16 coalesce, u8 qid, u16 sb_id);
+			 u16 coalesce, u16 qid, u16 sb_id);
 
 /**
  * @brief qed_set_txq_coalesce - Configure coalesce parameters for a Tx queue
@@ -471,7 +471,7 @@ int qed_set_rxq_coalesce(struct qed_hwfn *p_hwfn, struct qed_ptt *p_ptt,
  * @return int
  */
 int qed_set_txq_coalesce(struct qed_hwfn *p_hwfn, struct qed_ptt *p_ptt,
-			 u16 coalesce, u8 qid, u16 sb_id);
+			 u16 coalesce, u16 qid, u16 sb_id);
 
 const char *qed_hw_get_resc_name(enum qed_resources res_id);
 #endif
diff --git a/drivers/net/ethernet/qlogic/qed/qed_main.c b/drivers/net/ethernet/qlogic/qed/qed_main.c
index 59992cf..a5eef1a 100644
--- a/drivers/net/ethernet/qlogic/qed/qed_main.c
+++ b/drivers/net/ethernet/qlogic/qed/qed_main.c
@@ -1521,7 +1521,7 @@ static void qed_get_coalesce(struct qed_dev *cdev, u16 *rx_coal, u16 *tx_coal)
 }
 
 static int qed_set_coalesce(struct qed_dev *cdev, u16 rx_coal, u16 tx_coal,
-			    u8 qid, u16 sb_id)
+			    u16 qid, u16 sb_id)
 {
 	struct qed_hwfn *hwfn;
 	struct qed_ptt *ptt;
diff --git a/drivers/net/ethernet/qlogic/qede/qede_ethtool.c b/drivers/net/ethernet/qlogic/qede/qede_ethtool.c
index 4dcfe96..b22753c 100644
--- a/drivers/net/ethernet/qlogic/qede/qede_ethtool.c
+++ b/drivers/net/ethernet/qlogic/qede/qede_ethtool.c
@@ -706,8 +706,7 @@ static int qede_set_coalesce(struct net_device *dev,
 {
 	struct qede_dev *edev = netdev_priv(dev);
 	int i, rc = 0;
-	u16 rxc, txc;
-	u8 sb_id;
+	u16 rxc, txc, sb_id;
 
 	if (!netif_running(dev)) {
 		DP_INFO(edev, "Interface is down\n");
@@ -729,7 +728,7 @@ static int qede_set_coalesce(struct net_device *dev,
 	for_each_queue(i) {
 		sb_id = edev->fp_array[i].sb_info->igu_sb_id;
 		rc = edev->ops->common->set_coalesce(edev->cdev, rxc, txc,
-						     (u8)i, sb_id);
+						     (u16)i, sb_id);
 		if (rc) {
 			DP_INFO(edev, "Set coalesce error, rc = %d\n", rc);
 			return rc;
diff --git a/include/linux/qed/qed_if.h b/include/linux/qed/qed_if.h
index 5544d7b..c70ac13 100644
--- a/include/linux/qed/qed_if.h
+++ b/include/linux/qed/qed_if.h
@@ -635,7 +635,7 @@ struct qed_common_ops {
  * @return 0 on success, error otherwise.
  */
 	int (*set_coalesce)(struct qed_dev *cdev, u16 rx_coal, u16 tx_coal,
-			    u8 qid, u16 sb_id);
+			    u16 qid, u16 sb_id);
 
 /**
  * @brief set_led - Configure LED mode
-- 
1.8.3.1

^ permalink raw reply related

* [PATCH net v2 3/3] qede: Fix possible misconfiguration of advertised autoneg value.
From: Sudarsana Reddy Kalluru @ 2017-05-04 15:15 UTC (permalink / raw)
  To: davem; +Cc: netdev, Yuval.Mintz
In-Reply-To: <20170504151505.4407-1-sudarsana.kalluru@cavium.com>

Fail the configuration of advertised speed-autoneg value if the config
update is not supported.

Signed-off-by: Sudarsana Reddy Kalluru <Sudarsana.Kalluru@cavium.com>
Signed-off-by: Yuval Mintz <Yuval.Mintz@cavium.com>
---
 drivers/net/ethernet/qlogic/qede/qede_ethtool.c | 5 +++++
 1 file changed, 5 insertions(+)

diff --git a/drivers/net/ethernet/qlogic/qede/qede_ethtool.c b/drivers/net/ethernet/qlogic/qede/qede_ethtool.c
index b22753c..172b292 100644
--- a/drivers/net/ethernet/qlogic/qede/qede_ethtool.c
+++ b/drivers/net/ethernet/qlogic/qede/qede_ethtool.c
@@ -493,6 +493,11 @@ static int qede_set_link_ksettings(struct net_device *dev,
 	params.override_flags |= QED_LINK_OVERRIDE_SPEED_ADV_SPEEDS;
 	params.override_flags |= QED_LINK_OVERRIDE_SPEED_AUTONEG;
 	if (base->autoneg == AUTONEG_ENABLE) {
+		if (!(current_link.supported_caps & QED_LM_Autoneg_BIT)) {
+			DP_INFO(edev, "Auto negotiation is not supported\n");
+			return -EOPNOTSUPP;
+		}
+
 		params.autoneg = true;
 		params.forced_speed = 0;
 		QEDE_ETHTOOL_TO_DRV_CAPS(params.adv_speeds, cmd, advertising)
-- 
1.8.3.1

^ permalink raw reply related

* [PATCH net v2 2/3] qed: Fix overriding of supported autoneg value.
From: Sudarsana Reddy Kalluru @ 2017-05-04 15:15 UTC (permalink / raw)
  To: davem; +Cc: netdev, Yuval.Mintz
In-Reply-To: <20170504151505.4407-1-sudarsana.kalluru@cavium.com>

Driver currently uses advertised-autoneg value to populate the
supported-autoneg field. When advertised field is updated, user gets
the same value for supported field. Supported-autoneg value need to be
populated from the link capabilities value returned by the MFW.

Signed-off-by: Sudarsana Reddy Kalluru <Sudarsana.Kalluru@cavium.com>
Signed-off-by: Yuval Mintz <Yuval.Mintz@cavium.com>
---
 drivers/net/ethernet/qlogic/qed/qed_dev.c  | 3 +++
 drivers/net/ethernet/qlogic/qed/qed_main.c | 6 +++++-
 drivers/net/ethernet/qlogic/qed/qed_mcp.h  | 1 +
 3 files changed, 9 insertions(+), 1 deletion(-)

diff --git a/drivers/net/ethernet/qlogic/qed/qed_dev.c b/drivers/net/ethernet/qlogic/qed/qed_dev.c
index 5c6874a..bb70522 100644
--- a/drivers/net/ethernet/qlogic/qed/qed_dev.c
+++ b/drivers/net/ethernet/qlogic/qed/qed_dev.c
@@ -2536,6 +2536,9 @@ static int qed_hw_get_nvm_info(struct qed_hwfn *p_hwfn, struct qed_ptt *p_ptt)
 		DP_NOTICE(p_hwfn, "Unknown Speed in 0x%08x\n", link_temp);
 	}
 
+	p_hwfn->mcp_info->link_capabilities.default_speed_autoneg =
+		link->speed.autoneg;
+
 	link_temp &= NVM_CFG1_PORT_DRV_FLOW_CONTROL_MASK;
 	link_temp >>= NVM_CFG1_PORT_DRV_FLOW_CONTROL_OFFSET;
 	link->pause.autoneg = !!(link_temp &
diff --git a/drivers/net/ethernet/qlogic/qed/qed_main.c b/drivers/net/ethernet/qlogic/qed/qed_main.c
index a5eef1a..b7ad36b 100644
--- a/drivers/net/ethernet/qlogic/qed/qed_main.c
+++ b/drivers/net/ethernet/qlogic/qed/qed_main.c
@@ -1372,7 +1372,7 @@ static void qed_fill_link(struct qed_hwfn *hwfn,
 
 	/* TODO - at the moment assume supported and advertised speed equal */
 	if_link->supported_caps = QED_LM_FIBRE_BIT;
-	if (params.speed.autoneg)
+	if (link_caps.default_speed_autoneg)
 		if_link->supported_caps |= QED_LM_Autoneg_BIT;
 	if (params.pause.autoneg ||
 	    (params.pause.forced_rx && params.pause.forced_tx))
@@ -1382,6 +1382,10 @@ static void qed_fill_link(struct qed_hwfn *hwfn,
 		if_link->supported_caps |= QED_LM_Pause_BIT;
 
 	if_link->advertised_caps = if_link->supported_caps;
+	if (params.speed.autoneg)
+		if_link->advertised_caps |= QED_LM_Autoneg_BIT;
+	else
+		if_link->advertised_caps &= ~QED_LM_Autoneg_BIT;
 	if (params.speed.advertised_speeds &
 	    NVM_CFG1_PORT_DRV_SPEED_CAPABILITY_MASK_1G)
 		if_link->advertised_caps |= QED_LM_1000baseT_Half_BIT |
diff --git a/drivers/net/ethernet/qlogic/qed/qed_mcp.h b/drivers/net/ethernet/qlogic/qed/qed_mcp.h
index 5ae35d6..2b09b85 100644
--- a/drivers/net/ethernet/qlogic/qed/qed_mcp.h
+++ b/drivers/net/ethernet/qlogic/qed/qed_mcp.h
@@ -61,6 +61,7 @@ struct qed_mcp_link_params {
 
 struct qed_mcp_link_capabilities {
 	u32 speed_capabilities;
+	bool default_speed_autoneg;
 };
 
 struct qed_mcp_link_state {
-- 
1.8.3.1

^ permalink raw reply related

* Re: [PATCH] cfg80211: make RATE_INFO_BW_20 the default
From: Johannes Berg @ 2017-05-04 15:16 UTC (permalink / raw)
  To: David Miller; +Cc: linux-wireless, torvalds, netdev
In-Reply-To: <20170504.111333.814726752020791317.davem@davemloft.net>

On Thu, 2017-05-04 at 11:13 -0400, David Miller wrote:
> 
> Johannes, would you like me to merge this in via my tree directly?

I figured I'd give Linus to a chance to try or even apply it, but I
have no objection to you applying it either. I don't have anything else
  yet right now, and sending a pull request for just a single patch
would be quite pointless.

johannes

^ permalink raw reply

* Re: [PATCH iproute] tc: Reflect HW offload status
From: Simon Horman @ 2017-05-04 15:17 UTC (permalink / raw)
  To: Or Gerlitz; +Cc: Stephen Hemminger, netdev, Roi Dayan, Paul Blakey
In-Reply-To: <1493903715-29664-1-git-send-email-ogerlitz@mellanox.com>

On Thu, May 04, 2017 at 04:15:15PM +0300, Or Gerlitz wrote:
> Currently there is no way of querying whether a filter is
> offloaded to HW or not when using "both" policy (where none
> of skip_sw or skip_hw flags are set by user-space).
> 
> Add two new flags, "in hw" and "not in hw" such that user
> space can determine if a filter is actually offloaded to
> hw or not. The "in hw" UAPI semantics was chosen so it's
> similar to the "skip hw" flag logic.
> 
> If none of these two flags are set, this signals running
> over older kernel.
> 
> Signed-off-by: Or Gerlitz <ogerlitz@mellanox.com>
> Reviewed-by: Jiri Pirko <jiri@mellanox.com>

Reviewed-by: Simon Horman <simon.horman@netronome.com>

^ permalink raw reply

* [RFC net-next] ipv6: ext_header: add function to handle RPL extension header option 0x63
From: Andreas Bardoutsos @ 2017-05-04 15:17 UTC (permalink / raw)
  To: netdev
  Cc: linux-wpan, Michael Richardson, Unstrung Hackers, netdev-owner,
	linux-bluetooth

Signed-off-by: Andreas Bardoutsos <bardoutsos@ceid.upatras.gr>
---
Hi all!

I have added a dump function(always return true) to recognise RPL 
extension header(RFC6553)
Otherwise packet was dropped by kernel resulting in failing 
communication in RPL DAG's between
linux running border routers and devices in the graph.For example 
communication
with contiki OS running devices was previously impossible.

  include/uapi/linux/in6.h |  1 +
  net/ipv6/exthdrs.c       | 13 +++++++++++++
  2 files changed, 14 insertions(+)

diff --git a/include/uapi/linux/in6.h b/include/uapi/linux/in6.h
index 46444f8fbee4..5cc12d309dfe 100644
--- a/include/uapi/linux/in6.h
+++ b/include/uapi/linux/in6.h
@@ -146,6 +146,7 @@ struct in6_flowlabel_req {
  #define IPV6_TLV_CALIPSO	7	/* RFC 5570 */
  #define IPV6_TLV_JUMBO		194
  #define IPV6_TLV_HAO		201	/* home address option */
+#define IPV6_TLV_RPL	99	/* RFC 6553 */

  /*
   *	IPV6 socket options
diff --git a/net/ipv6/exthdrs.c b/net/ipv6/exthdrs.c
index b636f1da9aec..82ed60d3180e 100644
--- a/net/ipv6/exthdrs.c
+++ b/net/ipv6/exthdrs.c
@@ -785,6 +785,15 @@ static bool ipv6_hop_calipso(struct sk_buff *skb, 
int optoff)
  	return false;
  }

+/* RPL RFC 6553 */
+
+static bool ipv6_hop_rpl(struct sk_buff *skb, int optoff)
+{
+	/*Dump function which always return true
+	*when rpl option is detected*/
+	return true;
+}
+
  static const struct tlvtype_proc tlvprochopopt_lst[] = {
  	{
  		.type	= IPV6_TLV_ROUTERALERT,
@@ -798,6 +807,10 @@ static const struct tlvtype_proc 
tlvprochopopt_lst[] = {
  		.type	= IPV6_TLV_CALIPSO,
  		.func	= ipv6_hop_calipso,
  	},
+	{
+		.type	= IPV6_TLV_RPL,
+		.func	= ipv6_hop_rpl,
+	},
  	{ -1, }
  };

^ permalink raw reply related

* Re: [PATCH] xen-netfront: avoid crashing on resume after a failure in talk_to_netback()
From: David Miller @ 2017-05-04 15:21 UTC (permalink / raw)
  To: vkuznets; +Cc: xen-devel, netdev, linux-kernel, boris.ostrovsky, jgross
In-Reply-To: <20170504122304.11735-1-vkuznets@redhat.com>

From: Vitaly Kuznetsov <vkuznets@redhat.com>
Date: Thu,  4 May 2017 14:23:04 +0200

> Unavoidable crashes in netfront_resume() and netback_changed() after a
> previous fail in talk_to_netback() (e.g. when we fail to read MAC from
> xenstore) were discovered. The failure path in talk_to_netback() does
> unregister/free for netdev but we don't reset drvdata and we try accessing
> it again after resume.
> 
> Reset drvdata in netback_changed() the same way we reset it in
> netfront_probe() and check for NULL in both netfront_resume() and
> netback_changed() to properly handle the situation.
> 
> Signed-off-by: Vitaly Kuznetsov <vkuznets@redhat.com>

The circumstances under which netfront_probe() NULLs out the device
private is different than what you propose here, which is to do it
on a live device in netback_changed() whilst mutliple susbsytems
have a reference to this device and can call into the driver still.

It is only legal to do this in the probe function because such
references and execution possibilities do not exist at that point.

What really needs to happen is that the xenbus_driver must be told to
unregister this xen device and stop making calls into the driver for
it before you release the netdev state.

That is the only reasonable way to fix this bug.

Thanks.

^ permalink raw reply

* Re: [PATCH] cfg80211: make RATE_INFO_BW_20 the default
From: David Miller @ 2017-05-04 15:22 UTC (permalink / raw)
  To: johannes-cdvu00un1VgdHxzADdlk8Q
  Cc: linux-wireless-u79uwXL29TY76Z2rM5mHXA,
	torvalds-de/tnXTf+JLsfHDXvbKv3WD2FQJk+8+b,
	netdev-u79uwXL29TY76Z2rM5mHXA
In-Reply-To: <1493911002.18881.0.camel-cdvu00un1VgdHxzADdlk8Q@public.gmane.org>

From: Johannes Berg <johannes-cdvu00un1VgdHxzADdlk8Q@public.gmane.org>
Date: Thu, 04 May 2017 17:16:42 +0200

> On Thu, 2017-05-04 at 11:13 -0400, David Miller wrote:
>> 
>> Johannes, would you like me to merge this in via my tree directly?
> 
> I figured I'd give Linus to a chance to try or even apply it, but I
> have no objection to you applying it either. I don't have anything else
>   yet right now, and sending a pull request for just a single patch
> would be quite pointless.

Ok, let's give Linus a chance to test the patch.

^ permalink raw reply

* WARNING: CPU: 2 PID: 682 at net/wireless/util.c:1236
From: Jens Axboe @ 2017-05-04 15:23 UTC (permalink / raw)
  To: Kalle Valo
  Cc: linux-wireless-u79uwXL29TY76Z2rM5mHXA,
	netdev-u79uwXL29TY76Z2rM5mHXA, linuxwifi-ral2JQCrhuEAvxtiuMwx3w,
	Johannes Berg

Hi,

Running current -git on my laptop, and I see this spew every once
in a while. This is new, haven't seen it in 4.11 or previously. Driver
is iwlwifi:

04:00.0 Network controller: Intel Corporation Wireless 8260 (rev 3a)


[ 3285.862640] IPv6: ADDRCONF(NETDEV_CHANGE): wlp4s0: link becomes ready
[ 3285.978482] ------------[ cut here ]------------
[ 3285.978501] WARNING: CPU: 2 PID: 682 at net/wireless/util.c:1236 cfg80211_calculate_bitrate+0x130/0x160 [cfg80211]
[ 3285.978502] Modules linked in: ctr ccm rfcomm fuse bnep arc4 snd_hda_codec_hdmi iwlmvm snd_hda_codec_conexant snd_hda_codec_generic mac80211 snd_hda_intel snd_hda_codec binfmt_misc snd_hwdep snd_hda_core snd_pcm x86_pkg_temp_thermal nls_iso8859_1 intel_powerclamp nls_cp437 kvm_intel vfat snd_seq_midi fat kvm iwlwifi snd_seq_midi_event btusb snd_rawmidi btintel bluetooth snd_seq uvcvideo irqbypass aesni_intel videobuf2_vmalloc videobuf2_memops snd_seq_device aes_x86_64 videobuf2_v4l2 crypto_simd snd_timer videobuf2_core cryptd glue_helper videodev cfg80211 ecdh_generic snd soundcore hid_generic usbhid hid i915 psmouse e1000e ptp pps_core xhci_pci xhci_hcd intel_gtt
[ 3285.978536] CPU: 2 PID: 682 Comm: NetworkManager Tainted: G     U          4.11.0+ #59
[ 3285.978537] Hardware name: LENOVO 20FBCTO1WW/20FBCTO1WW, BIOS N1FET50W (1.24 ) 03/08/2017
[ 3285.978538] task: ffff880421de2880 task.stack: ffff8804234a8000
[ 3285.978551] RIP: 0010:cfg80211_calculate_bitrate+0x130/0x160 [cfg80211]
[ 3285.978552] RSP: 0018:ffff8804234ab638 EFLAGS: 00010293
[ 3285.978553] RAX: 0000000000000000 RBX: ffff88042df2cf00 RCX: 0000000000000002
[ 3285.978554] RDX: 0000000000000000 RSI: 0000000000000000 RDI: ffff8804234ab7d6
[ 3285.978555] RBP: ffff8804234ab638 R08: 0000000000000004 R09: ffff8804252c20d4
[ 3285.978556] R10: 00000000088002aa R11: ffffffffa02a6000 R12: ffff8804234ab7d6
[ 3285.978557] R13: ffff8804252c20d0 R14: ffff8804252c2030 R15: ffff880424bf0000
[ 3285.978559] FS:  00007f4e016a8940(0000) GS:ffff880441500000(0000) knlGS:0000000000000000
[ 3285.978560] CS:  0010 DS: 0000 ES: 0000 CR0: 0000000080050033
[ 3285.978561] CR2: 00000c5e5d540010 CR3: 000000042b626000 CR4: 00000000001406e0
[ 3285.978561] DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000
[ 3285.978562] DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400
[ 3285.978563] Call Trace:
[ 3285.978577]  nl80211_put_sta_rate+0x4e/0x1f0 [cfg80211]
[ 3285.978591]  nl80211_send_station.isra.66+0x344/0xcc0 [cfg80211]
[ 3285.978595]  ? __kmalloc_track_caller+0x31/0x1a0
[ 3285.978608]  nl80211_get_station+0x1d9/0x250 [cfg80211]
[ 3285.978620]  genl_family_rcv_msg+0x1bf/0x380
[ 3285.978622]  genl_rcv_msg+0x4c/0x90
[ 3285.978623]  ? genl_family_rcv_msg+0x380/0x380
[ 3285.978629]  netlink_rcv_skb+0x7f/0x110
[ 3285.978630]  genl_rcv+0x28/0x40
[ 3285.978633]  netlink_unicast+0x183/0x220
[ 3285.978635]  netlink_sendmsg+0x293/0x390
[ 3285.978637]  sock_sendmsg+0x38/0x50
[ 3285.978638]  ___sys_sendmsg+0x256/0x2b0
[ 3285.978641]  ? __slab_free+0x1d1/0x2c0
[ 3285.978643]  ? destroy_inode+0x3b/0x60
[ 3285.978645]  ? do_wp_page+0x103/0x440
[ 3285.978646]  ? __handle_mm_fault+0x34e/0xa10
[ 3285.978648]  ? __fget+0x6e/0x90
[ 3285.978650]  __sys_sendmsg+0x45/0x80
[ 3285.978652]  ? __sys_sendmsg+0x45/0x80
[ 3285.978654]  SyS_sendmsg+0x12/0x20
[ 3285.978656]  entry_SYSCALL_64_fastpath+0x13/0x94
[ 3285.978657] RIP: 0033:0x7f4dff521a6d
[ 3285.978658] RSP: 002b:00007ffc7507aec0 EFLAGS: 00000293 ORIG_RAX: 000000000000002e
[ 3285.978660] RAX: ffffffffffffffda RBX: 0000000002044b60 RCX: 00007f4dff521a6d
[ 3285.978661] RDX: 0000000000000000 RSI: 00007ffc7507af50 RDI: 0000000000000010
[ 3285.978661] RBP: 00007f4dff50bb20 R08: 0000000000000000 R09: 0000000000000000
[ 3285.978662] R10: 0000000001fd8df0 R11: 0000000000000293 R12: 0000000000001010
[ 3285.978663] R13: 00007f4dff50bb78 R14: 00000000000026fc R15: 0000000001ffc570
[ 3285.978664] Code: d0 f7 e1 d1 ea 8d 14 92 01 d2 81 c2 50 c3 00 00 b9 c5 5a 7c 0a 5d c1 ea 05 89 d0 f7 e1 89 d0 c1 e8 07 c3 31 c0 40 80 fe 02 74 b6 <0f> ff 31 c0 eb b0 8d 14 52 01 d2 e9 41 ff ff ff 0f ff 31 c0 5d 
[ 3285.978693] ---[ end trace ae08dfa326cc120a ]---

-- 
Jens Axboe

^ permalink raw reply

* Re: [PATCH net] rtnetlink: NUL-terminate IFLA_PHYS_PORT_NAME string
From: David Miller @ 2017-05-04 15:24 UTC (permalink / raw)
  To: mschmidt; +Cc: netdev, thaller, dsahern
In-Reply-To: <20170504144858.1905-1-mschmidt@redhat.com>

From: Michal Schmidt <mschmidt@redhat.com>
Date: Thu,  4 May 2017 16:48:58 +0200

> IFLA_PHYS_PORT_NAME is a string attribute, so terminate it with \0.
> Otherwise libnl3 fails to validate netlink messages with this attribute.
> "ip -detail a" assumes too that the attribute is NUL-terminated when
> printing it. It often was, due to padding.
> 
> I noticed this as libvirtd failing to start on a system with sfc driver
> after upgrading it to Linux 4.11, i.e. when sfc added support for
> phys_port_name.
> 
> Signed-off-by: Michal Schmidt <mschmidt@redhat.com>

Good catch, applied and queued up for -stable, thanks.

^ 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