Netdev List
 help / color / mirror / Atom feed
* Re: [PATCH] at86rf230: assign wait_for_completion_timeout to appropriately typed var
From: Alexander Aring @ 2015-02-08  9:34 UTC (permalink / raw)
  To: Nicholas Mc Guire; +Cc: linux-wpan, netdev, linux-kernel, marcel
In-Reply-To: <1423385700-11125-1-git-send-email-hofrat@osadl.org>

On Sun, Feb 08, 2015 at 03:55:00AM -0500, Nicholas Mc Guire wrote:
> return type of wait_for_completion_timeout is unsigned long not int.
> As rc is used here only for wait_for_completion_timeout the type is simply
> changed to unsigned long.
> 
> Signed-off-by: Nicholas Mc Guire <hofrat@osadl.org>

Acked-by: Alexander Aring <alex.aring@gmail.com>

Marcel, can you please queue this for bluetooth-next. Should be able to
apply against bluetooth-next. Thanks.

- Alex

^ permalink raw reply

* Re: [PATCH net-next 0/4] tcp: mitigate TCP ACK loops due to out-of-window validation dupacks
From: David Miller @ 2015-02-08  9:03 UTC (permalink / raw)
  To: ncardwell; +Cc: netdev
In-Reply-To: <1423256681-31716-1-git-send-email-ncardwell@google.com>

From: Neal Cardwell <ncardwell@google.com>
Date: Fri,  6 Feb 2015 16:04:37 -0500

> This patch series mitigates "ack loop" DoS scenarios by rate-limiting
> outgoing duplicate ACKs sent in response to incoming "out of window"
> segments.

Series applied, thanks a lot Neal.

^ permalink raw reply

* [PATCH] at86rf230: assign wait_for_completion_timeout to appropriately typed var
From: Nicholas Mc Guire @ 2015-02-08  8:55 UTC (permalink / raw)
  To: Alexander Aring; +Cc: linux-wpan, netdev, linux-kernel, Nicholas Mc Guire

return type of wait_for_completion_timeout is unsigned long not int.
As rc is used here only for wait_for_completion_timeout the type is simply
changed to unsigned long.

Signed-off-by: Nicholas Mc Guire <hofrat@osadl.org>
---

Patch was only compile tested with x86_64_defconfig + CONFIG_IEEE802154=m, 
CONFIG_MAC802154=m CONFIG_SPI=m, CONFIG_IEEE802154_AT86RF230=m

Patch is against 3.19.0-rc7 (localversion-next is -next-20150204)

 drivers/net/ieee802154/at86rf230.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/net/ieee802154/at86rf230.c b/drivers/net/ieee802154/at86rf230.c
index 7b051ea..cbfc8c5 100644
--- a/drivers/net/ieee802154/at86rf230.c
+++ b/drivers/net/ieee802154/at86rf230.c
@@ -689,7 +689,7 @@ at86rf230_sync_state_change_complete(void *context)
 static int
 at86rf230_sync_state_change(struct at86rf230_local *lp, unsigned int state)
 {
-	int rc;
+	unsigned long rc;
 
 	at86rf230_async_state_change(lp, &lp->state, state,
 				     at86rf230_sync_state_change_complete,
-- 
1.7.10.4

^ permalink raw reply related

* Re: [PATCH net-next v2] openvswitch: Initialize unmasked key and uid len
From: David Miller @ 2015-02-08  8:51 UTC (permalink / raw)
  To: pshelar; +Cc: netdev, joestringer
In-Reply-To: <1423250233-1529-1-git-send-email-pshelar@nicira.com>

From: Pravin B Shelar <pshelar@nicira.com>
Date: Fri,  6 Feb 2015 11:17:13 -0800

> Flow alloc needs to initialize unmasked key pointer. Otherwise
> it can crash kernel trying to free random unmasked-key pointer.
 ...
> Fixes: 74ed7ab9264("openvswitch: Add support for unique flow IDs.")
> CC: Joe Stringer <joestringer@nicira.com>
> Reported-by: Or Gerlitz <ogerlitz@mellanox.com>
> Signed-off-by: Pravin B Shelar <pshelar@nicira.com>

Applied, thanks.

^ permalink raw reply

* [PATCH iproute2] ss: Show stats from specified network namespace
From: Vadim Kochan @ 2015-02-08  6:58 UTC (permalink / raw)
  To: netdev; +Cc: Vadim Kochan

From: Vadim Kochan <vadim4j@gmail.com>

Added new '-N NSNAME, --net=NSNAME' option to show socket stats
from the specified network namespace name.

Signed-off-by: Vadim Kochan <vadim4j@gmail.com>
---
 man/man8/ss.8 | 3 +++
 misc/Makefile | 4 ++++
 misc/ss.c     | 9 ++++++++-
 3 files changed, 15 insertions(+), 1 deletion(-)

diff --git a/man/man8/ss.8 b/man/man8/ss.8
index 450649a..b7fbaef 100644
--- a/man/man8/ss.8
+++ b/man/man8/ss.8
@@ -84,6 +84,9 @@ context of the creating process, however the context shown will reflect
 any policy role, type and/or range transition rules applied,
 and is therefore a useful reference.
 .TP
+.B \-N NSNAME, \-\-net=NSNAME
+Switch to the specified network namespace name.
+.TP
 .B \-b, \-\-bpf
 Show socket BPF filters (only administrators are allowed to get these information).
 .TP
diff --git a/misc/Makefile b/misc/Makefile
index 004bcc3..b7ecba9 100644
--- a/misc/Makefile
+++ b/misc/Makefile
@@ -10,6 +10,10 @@ ifeq ($(HAVE_SELINUX),y)
 	CFLAGS += $(shell pkg-config --cflags libselinux) -DHAVE_SELINUX
 endif
 
+ifeq ($(IP_CONFIG_SETNS),y)
+	CFLAGS += -DHAVE_SETNS
+endif
+
 all: $(TARGETS)
 
 ss: $(SSOBJ)
diff --git a/misc/ss.c b/misc/ss.c
index 7fc0a99..0a6a65e 100644
--- a/misc/ss.c
+++ b/misc/ss.c
@@ -31,6 +31,7 @@
 #include "rt_names.h"
 #include "ll_map.h"
 #include "libnetlink.h"
+#include "namespace.h"
 #include "SNAPSHOT.h"
 
 #include <linux/tcp.h>
@@ -3246,6 +3247,7 @@ static void _usage(FILE *dest)
 "   -b, --bpf           show bpf filter socket information\n"
 "   -Z, --context       display process SELinux security contexts\n"
 "   -z, --contexts      display process and socket SELinux security contexts\n"
+"   -N, --net           switch to the specified network namespace name\n"
 "\n"
 "   -4, --ipv4          display only IP version 4 sockets\n"
 "   -6, --ipv6          display only IP version 6 sockets\n"
@@ -3345,6 +3347,7 @@ static const struct option long_opts[] = {
 	{ "help", 0, 0, 'h' },
 	{ "context", 0, 0, 'Z' },
 	{ "contexts", 0, 0, 'z' },
+	{ "net", 1, 0, 'N' },
 	{ 0 }
 
 };
@@ -3360,7 +3363,7 @@ int main(int argc, char *argv[])
 	struct filter dbs_filter = {};
 	int state_filter = 0;
 
-	while ((ch = getopt_long(argc, argv, "dhaletuwxnro460spbf:miA:D:F:vVzZ",
+	while ((ch = getopt_long(argc, argv, "dhaletuwxnro460spbf:miA:D:F:vVzZN:",
 				 long_opts, NULL)) != EOF) {
 		switch(ch) {
 		case 'n':
@@ -3532,6 +3535,10 @@ int main(int argc, char *argv[])
 			show_proc_ctx++;
 			user_ent_hash_build();
 			break;
+		case 'N':
+			if (netns_switch(optarg))
+				exit(1);
+			break;
 		case 'h':
 		case '?':
 			help();
-- 
2.2.2

^ permalink raw reply related

* Re: [PATCHv2 net-next 0/5] Add support to dump some hw debug info
From: David Miller @ 2015-02-08  6:54 UTC (permalink / raw)
  To: hariprasad; +Cc: netdev, leedom, anish, nirranjan, kumaras
In-Reply-To: <1423231375-28004-1-git-send-email-hariprasad@chelsio.com>

From: Hariprasad Shenai <hariprasad@chelsio.com>
Date: Fri,  6 Feb 2015 19:32:50 +0530

> This patch series adds support to dump sensor info, dump Transport Processor
> event trace, dump Upper Layer Protocol RX module command trace, dump mailbox
> contents and dump Transport Processor congestion control configuration. 
> 
> Will send a separate patch series for all the hw stats patches, by moving them
> to ethtool.
> 
> The patches series is created against 'net-next' tree.
> And includes patches on cxgb4 driver.
> 
> We have included all the maintainers of respective drivers. Kindly review the
> change and let us know in case of any review comments.
...
> V2: Dopped all hw stats related patches. Added a new patch which adds support to
> dump congestion control table. 

Series applied, thanks.

^ permalink raw reply

* Re: [PATCH net-next 0/9] be2net: patch set
From: David Miller @ 2015-02-08  6:52 UTC (permalink / raw)
  To: sathya.perla; +Cc: netdev
In-Reply-To: <1423228723-10919-1-git-send-email-sathya.perla@emulex.com>

From: Sathya Perla <sathya.perla@emulex.com>
Date: Fri, 6 Feb 2015 08:18:34 -0500

> Hi Dave, pls consider applying the following patch-set to the
> net-next tree. It has 5 code/style cleanup patches and 4 patches that
> add functionality to the driver.

Series applied.

^ permalink raw reply

* Re: [PATCH net-next] bridge: add missing bridge port check for offloads
From: David Miller @ 2015-02-08  6:50 UTC (permalink / raw)
  To: roopa; +Cc: netdev, bridge, dan.carpenter
In-Reply-To: <1423203885-45657-1-git-send-email-roopa@cumulusnetworks.com>

From: roopa@cumulusnetworks.com
Date: Thu,  5 Feb 2015 22:24:45 -0800

> From: Roopa Prabhu <roopa@cumulusnetworks.com>
> 
> This patch fixes a missing bridge port check caught by smatch.
> 
> setlink/dellink of attributes like vlans can come for a bridge device
> and there is no need to offload those today. So, this patch adds a bridge
> port check. (In these cases however, the BRIDGE_SELF flags will always be set
> and we may not hit a problem with the current code).
> 
> smatch complaint:
> 
> The patch 68e331c785b8: "bridge: offload bridge port attributes to
> switch asic if feature flag set" from Jan 29, 2015, leads to the
> following Smatch complaint:
> 
> net/bridge/br_netlink.c:552 br_setlink()
> 	 error: we previously assumed 'p' could be null (see line 518)
> 
> net/bridge/br_netlink.c
>    517
>    518		if (p && protinfo) {
>                     ^
> Check for NULL.
> 
> Reported-By: Dan Carpenter <dan.carpenter@oracle.com>
> Signed-off-by: Roopa Prabhu <roopa@cumulusnetworks.com>

Applied, thanks.

^ permalink raw reply

* Re: [net-next v2 00/16][pull request] Intel Wired LAN Driver Updates 2015-02-05
From: David Miller @ 2015-02-08  6:49 UTC (permalink / raw)
  To: jeffrey.t.kirsher; +Cc: netdev, nhorman, sassmann, jogreene
In-Reply-To: <1423197085-32270-1-git-send-email-jeffrey.t.kirsher@intel.com>

From: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
Date: Thu,  5 Feb 2015 20:31:09 -0800

> This series contains updates to fm10k, ixgbe and ixgbevf.

Pulled, thanks Jeff.

^ permalink raw reply

* Re: [PATCH net-next v2 0/7] r8152: adjust the code
From: David Miller @ 2015-02-08  6:46 UTC (permalink / raw)
  To: hayeswang; +Cc: netdev, nic_swsd, linux-kernel, linux-usb
In-Reply-To: <1394712342-15778-129-Taiwan-albertk@realtek.com>

From: Hayes Wang <hayeswang@realtek.com>
Date: Fri, 6 Feb 2015 11:30:44 +0800

> V2:
> Correct the subject of patch #5. Replace "link feed" with "line feed".
> 
> v1:
> Code adjustment.

Series applied, thanks.

^ permalink raw reply

* Re: [PATCH net] amd-xgbe: Check per channel DMA interrupt use in main ISR
From: David Miller @ 2015-02-08  6:45 UTC (permalink / raw)
  To: thomas.lendacky; +Cc: netdev
In-Reply-To: <20150206011714.2507.45712.stgit@tlendack-t1.amdoffice.net>

From: Tom Lendacky <thomas.lendacky@amd.com>
Date: Thu, 5 Feb 2015 19:17:14 -0600

> When using per channel DMA interrupts the transmit interrupt (TI) and the
> receive interrupt (RI) are masked off so as to not generate an interrupt
> to the main ISR. However, should another interrupt fire for the DMA channel
> that is handled by the main ISR the TI/RI bits can still be set. This
> will cause the wrong and uninitialized napi structure to be used causing a
> panic. Add a check to be sure per channel DMA interrupts are not enabled
> before acting on those bit flags.
> 
> Signed-off-by: Tom Lendacky <thomas.lendacky@amd.com>

Applied.

^ permalink raw reply

* Re: [PATCH net] net: use netif_rx_ni() from process context
From: David Miller @ 2015-02-08  6:44 UTC (permalink / raw)
  To: eric.dumazet; +Cc: netdev
In-Reply-To: <1423177094.31870.93.camel@edumazet-glaptop2.roam.corp.google.com>

From: Eric Dumazet <eric.dumazet@gmail.com>
Date: Thu, 05 Feb 2015 14:58:14 -0800

> From: Eric Dumazet <edumazet@google.com>
> 
> Hotpluging a cpu might be rare, yet we have to use proper
> handlers when taking over packets found in backlog queues.
> 
> dev_cpu_callback() runs from process context, thus we should
> call netif_rx_ni() to properly invoke softirq handler.
> 
> Signed-off-by: Eric Dumazet <edumazet@google.com>
> ---
> I never saw real operational issues, but I suspect this patch cannot
> hurt.

Applied, thanks.

^ permalink raw reply

* Re: [PATCHv2] rds: Make rds_message_copy_from_user() return 0 on success.
From: David Miller @ 2015-02-08  6:42 UTC (permalink / raw)
  To: sowmini.varadhan; +Cc: chien.yen, rds-devel, netdev, linux-kernel, viro
In-Reply-To: <20150205224143.GD28883@oracle.com>

From: Sowmini Varadhan <sowmini.varadhan@oracle.com>
Date: Thu, 5 Feb 2015 17:41:43 -0500

> Commit 083735f4b01b ("rds: switch rds_message_copy_from_user() to iov_iter")
> breaks rds_message_copy_from_user() semantics on success, and causes it
> to return nbytes copied, when it should return 0.  This commit fixes that bug.
> 
> Signed-off-by: Sowmini Varadhan <sowmini.varadhan@oracle.com>
> ---
> changes from v1: incorporate Al.Viro comment. 

Applied.

^ permalink raw reply

* Re: [PATCH] net: rds: Remove repeated function names from debug output
From: David Miller @ 2015-02-08  6:42 UTC (permalink / raw)
  To: linux; +Cc: chien.yen, rds-devel, netdev, linux-kernel
In-Reply-To: <1423174641-11057-1-git-send-email-linux@rasmusvillemoes.dk>

From: Rasmus Villemoes <linux@rasmusvillemoes.dk>
Date: Thu,  5 Feb 2015 23:17:20 +0100

> The macro rdsdebug is defined as
> 
>   pr_debug("%s(): " fmt, __func__ , ##args)
> 
> Hence it doesn't make sense to include the name of the calling
> function explicitly in the format string passed to rdsdebug.
> 
> Signed-off-by: Rasmus Villemoes <linux@rasmusvillemoes.dk>

Applied.

^ permalink raw reply

* Re: [PATCH v3] net: openvswitch: Support masked set actions.
From: David Miller @ 2015-02-08  6:40 UTC (permalink / raw)
  To: jrajahalme; +Cc: netdev, dev
In-Reply-To: <1423172449-3654-1-git-send-email-jrajahalme@nicira.com>

From: Jarno Rajahalme <jrajahalme@nicira.com>
Date: Thu,  5 Feb 2015 13:40:49 -0800

> OVS userspace already probes the openvswitch kernel module for
> OVS_ACTION_ATTR_SET_MASKED support.  This patch adds the kernel module
> implementation of masked set actions.
> 
> The existing set action sets many fields at once.  When only a subset
> of the IP header fields, for example, should be modified, all the IP
> fields need to be exact matched so that the other field values can be
> copied to the set action.  A masked set action allows modification of
> an arbitrary subset of the supported header bits without requiring the
> rest to be matched.
> 
> Masked set action is now supported for all writeable key types, except
> for the tunnel key.  The set tunnel action is an exception as any
> input tunnel info is cleared before action processing starts, so there
> is no tunnel info to mask.
> 
> The kernel module converts all (non-tunnel) set actions to masked set
> actions.  This makes action processing more uniform, and results in
> less branching and duplicating the action processing code.  When
> returning actions to userspace, the fully masked set actions are
> converted back to normal set actions.  We use a kernel internal action
> code to be able to tell the userspace provided and converted masked
> set actions apart.
> 
> Signed-off-by: Jarno Rajahalme <jrajahalme@nicira.com>
> ---
> v3: Clean up code and remove flow key transport port checks from
>     validate_set(), as suggested by Jesse Gross.

Applied, thanks.

^ permalink raw reply

* Re: [PATCH net-next 0/2] net: dsa: bcm_sf2: GPHY power down
From: David Miller @ 2015-02-08  6:39 UTC (permalink / raw)
  To: f.fainelli; +Cc: netdev
In-Reply-To: <1423165242-6042-1-git-send-email-f.fainelli@gmail.com>

From: Florian Fainelli <f.fainelli@gmail.com>
Date: Thu,  5 Feb 2015 11:40:40 -0800

> This patch series implement GPHY power up and down in the SF2 switch
> driver in order to conserve power whenever possible (e.g: port is brought
> down or unused during Wake-on-LAN).

Applied, thanks Florian.

^ permalink raw reply

* Re: [GIT] [3.20] 2nd NFC update
From: David Miller @ 2015-02-08  6:22 UTC (permalink / raw)
  To: sameo; +Cc: netdev
In-Reply-To: <20150205174757.GA24523@ribalta.amr.corp.intel.com>

From: Samuel Ortiz <sameo@linux.intel.com>
Date: Thu, 5 Feb 2015 18:47:57 +0100

> Here goes one last NFC pull request for 3.20.
> 
> It brings:
> 
> - NCI NFCEE (NFC Execution Environment, typically an embedded or
>   external secure element) discovery and enabling/disabling support.
>   In order to communicate with an NFCEE, we also added NCI's logical
>   connections support to the NCI stack.
> 
> - HCI over NCI protocol support. Some secure elements only understand
>   HCI and thus we need to send them HCI frames when they're part of
>   an NCI chipset.
> 
> - NFC_EVT_TRANSACTION userspace API addition. Whenever an application
>   running on a secure element needs to notify its host counterpart,
>   we send an NFC_EVENT_SE_TRANSACTION event to userspace through the
>   NFC netlink socket.
> 
> - Secure element and HCI transaction event support for the st21nfcb
>   chipset.
> 
> Thanks in advance for pulling them in.

Pulled, thanks Sam.

^ permalink raw reply

* Re: [PATCH net] ipv6: addrconf: add missing validate_link_af handler
From: David Miller @ 2015-02-08  6:13 UTC (permalink / raw)
  To: daniel; +Cc: netdev, jiri
In-Reply-To: <0f0921b794041725c882546a614defde18fba7ea.1423143235.git.daniel@iogearbox.net>

From: Daniel Borkmann <daniel@iogearbox.net>
Date: Thu,  5 Feb 2015 14:39:11 +0100

> We still need a validate_link_af() handler with an appropriate nla policy,
> similarly as we have in IPv4 case, otherwise size validations are not being
> done properly in that case.
> 
> Fixes: f53adae4eae5 ("net: ipv6: add tokenized interface identifier support")
> Fixes: bc91b0f07ada ("ipv6: addrconf: implement address generation modes")
> Cc: Jiri Pirko <jiri@resnulli.us>
> Signed-off-by: Daniel Borkmann <daniel@iogearbox.net>

A nice, old, bug.

Applied and queued up for -stable, thanks Daniel.

^ permalink raw reply

* Re: [PATCH] dsa: correctly determine the number of switches in a system
From: David Miller @ 2015-02-08  6:08 UTC (permalink / raw)
  To: tobias; +Cc: netdev
In-Reply-To: <20150205135409.GB29383@gmail.com>

From: Tobias Waldekranz <tobias@waldekranz.com>
Date: Thu, 5 Feb 2015 14:54:09 +0100

> The number of connected switches was sourced from the number of
> children to the DSA node, change it to the number of available
> children, skipping any disabled switches.
> 
> Signed-off-by: Tobias Waldekranz <tobias@waldekranz.com>

Applied.

^ permalink raw reply

* Re: [PATCH] dsa: do not dereference non-existing routing table
From: David Miller @ 2015-02-08  6:08 UTC (permalink / raw)
  To: tobias; +Cc: netdev
In-Reply-To: <20150205135206.GA29383@gmail.com>

From: Tobias Waldekranz <tobias@waldekranz.com>
Date: Thu, 5 Feb 2015 14:52:06 +0100

> In the case where there is only one switch, no routing table will have
> been allocated, so do not dereference it in this case.
> 
> Signed-off-by: Tobias Waldekranz <tobias@waldekranz.com>

Applied.

^ permalink raw reply

* Re: [PATCH v2 1/3] bridge: Base the BR_PROXYARP decision on the target port flag
From: David Miller @ 2015-02-08  5:59 UTC (permalink / raw)
  To: jouni; +Cc: netdev, kyeyoonp
In-Reply-To: <1423130063-18323-1-git-send-email-jouni@codeaurora.org>

From: Jouni Malinen <jouni@codeaurora.org>
Date: Thu,  5 Feb 2015 11:54:21 +0200

> From: Kyeyoon Park <kyeyoonp@codeaurora.org>
> 
> When doing proxy ARP, instead of checking the bridge port flag for
> BR_PROXYARP on the bridge port on which the frame was received, check
> the bridge port flag of the bridge port to which the target device
> belongs.
> 
> Signed-off-by: Kyeyoon Park <kyeyoonp@codeaurora.org>
> Signed-off-by: Jouni Malinen <jouni@codeaurora.org>
> ---
> v2: Address Stephen's comment on mixing && and & without parens
>     and check for f->dst != NULL before dereferencing it

This is a semantic change, what if the administrator wanted the
current behavior?

I'm not applying this.  If you want the new behavior, it will have
to be at a minimum turned on via a sysctl that defaults to OFF.

^ permalink raw reply

* Re: [PATCH net-next 1/3] ethtool: rename reserved1 memeber in ethtool_drvinfo for expansion ROM version
From: David Miller @ 2015-02-08  5:57 UTC (permalink / raw)
  To: hariprasad; +Cc: netdev, ben, leedom, anish, nirranjan, kumaras
In-Reply-To: <1423054176-26420-2-git-send-email-hariprasad@chelsio.com>

From: Hariprasad Shenai <hariprasad@chelsio.com>
Date: Wed,  4 Feb 2015 18:19:34 +0530

> Renamed the reserved1 member of struct ethtool_drvinfo to erom_version to get
> expansion/option ROM version of the adapter if present.
> 
> Signed-off-by: Hariprasad Shenai <hariprasad@chelsio.com>
 ...
> @@ -148,6 +148,7 @@ static inline __u32 ethtool_cmd_speed(const struct ethtool_cmd *ep)
>   *	not be an empty string.
>   * @version: Driver version string; may be an empty string
>   * @fw_version: Firmware version string; may be an empty string
> + * @erom_version: Expansion ROM version string; may be an empty string
>   * @bus_info: Device bus address.  This should match the dev_name()
>   *	string for the underlying bus device, if there is one.  May be
>   *	an empty string.
> @@ -176,7 +177,7 @@ struct ethtool_drvinfo {
>  	char	version[32];
>  	char	fw_version[ETHTOOL_FWVERS_LEN];
>  	char	bus_info[ETHTOOL_BUSINFO_LEN];
> -	char	reserved1[32];
> +	char	erom_version[32];

Please add a define like ETHTOOL_FWVERS_LEN and ETHTOOL_BUSINFO_LEN
and use it here.

^ permalink raw reply

* RE: PROBLEM: Bnx2x Checksum/Length Error Over GRE Tunnel
From: Yuval Mintz @ 2015-02-08  5:51 UTC (permalink / raw)
  To: Eren Türkay; +Cc: netdev, Eric Dumazet
In-Reply-To: <54D47275.6070707@skyatlas.com>

> > Tried this on latest net-next [using iproute2] and I didn't manage to
> > hit the issue you've indicated.
> > I.e., traffic seemed to work fine on gre tunnels using both mtu sizes
> > and regardless of whether Tx-checksum-offload was enabled or disabled.
> 
> Interesting. Could it be a firmware issue?

All latest drivers use the same FW;  The difference is usually in management
FW, which should have no relevance to a feature such as this.

Care to share a dump [ethtool -d] and lspci [-vvv] outputs for the device?

Thanks,
Yuval 

^ permalink raw reply

* Re: [PATCH next 2/6] bonding: implement bond_poll_controller()
From: Mahesh Bandewar @ 2015-02-08  5:38 UTC (permalink / raw)
  To: Veaceslav Falico
  Cc: Jay Vosburgh, Andy Gospodarek, Nikolay Aleksandrov, David Miller,
	netdev, Eric Dumazet
In-Reply-To: <20150207090400.GA11343@vps.falico.eu>

On Sat, Feb 7, 2015 at 1:04 AM, Veaceslav Falico <vfalico@gmail.com> wrote:
> On Fri, Feb 06, 2015 at 04:51:51PM -0800, Mahesh Bandewar wrote:
>>
>> This patches implements the poll_controller support for all
>> bonding driver. If the slaves have poll_controller net_op defined,
>> this implementation calls them. This is mode agnostic implementation
>> and iterates through all slaves (based on mode) and calls respective
>> handler.
>>
>> Signed-off-by: Mahesh Bandewar <maheshb@google.com>
>
>
> Really good patchset, thank you. Two nitpicks below, nothing serious. Also,
> please, add Doc/bonding.txt changes for every user-visible
> change/enhancement, this doc is a go-to for a lot of users.
>
> Otherwise, with the doc and other issues, pointed by Jay and Andy, fixed, I
> guess it's good to go. The 0/ patch would be welcome too, btw.
>
>
>> ---
>> drivers/net/bonding/bond_3ad.c  | 24 +++++++++++++++++++++
>> drivers/net/bonding/bond_main.c | 47
>> +++++++++++++++++++++++++++++++++++++++++
>> include/net/bond_3ad.h          |  1 +
>> 3 files changed, 72 insertions(+)
>>
>> diff --git a/drivers/net/bonding/bond_3ad.c
>> b/drivers/net/bonding/bond_3ad.c
>> index 9b436696b95e..14f2ebe786c5 100644
>> --- a/drivers/net/bonding/bond_3ad.c
>> +++ b/drivers/net/bonding/bond_3ad.c
>> @@ -2477,6 +2477,30 @@ int bond_3ad_get_active_agg_info(struct bonding
>> *bond, struct ad_info *ad_info)
>>         return ret;
>> }
>>
>> +#define BOND_3AD_PORT_OPERATIONAL \
>> +               (AD_STATE_DISTRIBUTING | AD_STATE_COLLECTING | \
>> +                AD_STATE_SYNCHRONIZATION | AD_STATE_AGGREGATION)
>> +
>> +static int bond_3ad_port_operational(struct slave *slave)
>> +{
>> +       port_t *port = &SLAVE_AD_INFO(slave)->port;
>> +
>> +       return bond_slave_can_tx(slave) &&
>> +              (port->actor_oper_port_state &
>> port->partner_oper.port_state &
>> +               BOND_3AD_PORT_OPERATIONAL) == BOND_3AD_PORT_OPERATIONAL;
>> +}
>> +
>> +/* bond_3ad_port_is_active - check if a slave port is active or not. A
>> port
>> + * is active when it can forward traffic.
>> + *
>> + * @slave: slave port to check state for.
>> + * Returns: 0 if not active else is active.
>> + */
>> +int bond_3ad_port_is_active(struct slave *slave)
>> +{
>> +       return bond_3ad_port_operational(slave);
>> +}
>> +
>> int bond_3ad_lacpdu_recv(const struct sk_buff *skb, struct bonding *bond,
>>                          struct slave *slave)
>> {
>> diff --git a/drivers/net/bonding/bond_main.c
>> b/drivers/net/bonding/bond_main.c
>> index c9e519cb9214..a50ec87486f3 100644
>> --- a/drivers/net/bonding/bond_main.c
>> +++ b/drivers/net/bonding/bond_main.c
>> @@ -928,6 +928,53 @@ static inline void slave_disable_netpoll(struct slave
>> *slave)
>>
>> static void bond_poll_controller(struct net_device *bond_dev)
>> {
>> +       struct bonding *bond = netdev_priv(bond_dev);
>> +       struct slave *slave = NULL;
>> +       struct list_head *iter;
>> +       struct ad_info ad_info;
>> +       struct aggregator *agg;
>> +       const struct net_device_ops *ops;
>> +       bool call_slave_netpoll;
>> +
>> +       if (BOND_MODE(bond) == BOND_MODE_8023AD)
>> +               if (bond_3ad_get_active_agg_info(bond, &ad_info))
>> +                       return;
>> +
>> +       bond_for_each_slave(bond, slave, iter) {
>> +               call_slave_netpoll = false;
>> +               switch (BOND_MODE(bond)) {
>> +               case BOND_MODE_8023AD:
>> +                       agg = SLAVE_AD_INFO(slave)->port.aggregator;
>> +                       if (!bond_slave_is_up(slave))
>
>
> bond_3ad_port_is_active() already contains the check for being up.
>
>> +                               break;
>> +                       if (agg && agg->aggregator_identifier !=
>
>
> Hm, should we poll it without an aggregator?
>
I think I missed this comment earlier, but it would be wrong. I mean
we have to perform this check otherwise it would be wrong.


>> +                               ad_info.aggregator_id)
>> +                               break;
>> +                       if (!bond_3ad_port_is_active(slave) &&
>> +                           ad_info.ports != 1)
>> +                               break;
>> +
>> +                       call_slave_netpoll = true;
>> +                       break;
>> +               default:
>> +                       if (bond_slave_is_up(slave))
>> +                               call_slave_netpoll = true;
>> +                       break;
>> +               }
>> +
>> +               if (call_slave_netpoll) {
>> +                       ops = slave->dev->netdev_ops;
>> +                       if (ops->ndo_poll_controller) {
>
>
> It's weird to see this check so down the road. Maybe reorg the logic to
> something like:
>
> bond_for_each_slave() {
>         if (!bond_slave_is_up() || !bond_slave_has_ndo_poll())
>                 continue;
>
>         if (BOND_MODE(bond) == 3AD && !bond_3ad_port_is_active())
>                 continue;
>
>         slave-do_ndo_poll_stuff();
> }
>
> Just as a thought, might be easier to read/shorter.
>
I tried this and it does save one bool variable but not much
different. Here it is -

     bond_for_each_slave(bond, slave, iter) {
        ops = slave->dev->netdev_ops;
        if (!bond_slave_is_up(slave) || !ops->ndo_poll_controller)
            continue;

        if (BOND_MODE(bond) == BOND_MODE_8023AD) {
            struct aggregator *agg =
                SLAVE_AD_INFO(slave)->port.aggregator;

            if (agg && agg->aggregator_identifier !=
                   ad_info.aggregator_id)
                continue;
            if (!bond_3ad_port_is_active(slave) || ad_info.ports != 1)
                continue;
        }

        ni = rcu_dereference_bh(slave->dev->npinfo);
        if (down_trylock(&ni->dev_lock))
            continue;
        ops->ndo_poll_controller(slave->dev);
        up(&ni->dev_lock);
    }

I'm not sure if it's any different! BTW I did keep the aggregator
check since I'm not convinced that it's OK to eliminate the check.


>
>> +                               struct netpoll_info *ni =
>> +
>> rcu_dereference_bh(slave->dev->npinfo);
>> +
>> +                               if (down_trylock(&ni->dev_lock))
>> +                                       continue;
>> +                               ops->ndo_poll_controller(slave->dev);
>> +                               up(&ni->dev_lock);
>> +                       }
>> +               }
>> +       }
>> }
>>
>> static void bond_netpoll_cleanup(struct net_device *bond_dev)
>> diff --git a/include/net/bond_3ad.h b/include/net/bond_3ad.h
>> index f04cdbb7848e..6c455c646d61 100644
>> --- a/include/net/bond_3ad.h
>> +++ b/include/net/bond_3ad.h
>> @@ -278,5 +278,6 @@ int bond_3ad_lacpdu_recv(const struct sk_buff *skb,
>> struct bonding *bond,
>>                          struct slave *slave);
>> int bond_3ad_set_carrier(struct bonding *bond);
>> void bond_3ad_update_lacp_rate(struct bonding *bond);
>> +int bond_3ad_port_is_active(struct slave *slave);
>> #endif /* _NET_BOND_3AD_H */
>>
>> --
>> 2.2.0.rc0.207.ga3a616c
>>
>

^ permalink raw reply

* [PATCH] net:ethernet:intel:Remove outdated fix me comment in the function, gb_acquire_swfw_sync_i210
From: Nicholas Krause @ 2015-02-08  5:21 UTC (permalink / raw)
  To: jeffrey.t.kirsher
  Cc: linux.nics, e1000-devel, bruce.w.allan, jesse.brandeburg,
	linux-kernel, john.ronciak, netdev

Removes the outdated fix me comment in the function,gb_acquire_swfw_sync_i210
for setting the variables, i and timeout to the intended correct values for
the function,gb_acquire_swfw_sync_i210 to function correctly. This comment is
no longer due to these values having been no changed in the last few years and
no known issues have been found for these variables being set to their current
values. Due to this the comment can now be removed as the values set for these
variables are known to be correct after years of no known issues or bugs related
to their current values.

Signed-off-by: Nicholas Krause <xerofoify@gmail.com>
---
 drivers/net/ethernet/intel/igb/e1000_i210.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/net/ethernet/intel/igb/e1000_i210.c b/drivers/net/ethernet/intel/igb/e1000_i210.c
index 65d9316..0c169e5 100644
--- a/drivers/net/ethernet/intel/igb/e1000_i210.c
+++ b/drivers/net/ethernet/intel/igb/e1000_i210.c
@@ -140,7 +140,7 @@ s32 igb_acquire_swfw_sync_i210(struct e1000_hw *hw, u16 mask)
 	u32 swmask = mask;
 	u32 fwmask = mask << 16;
 	s32 ret_val = 0;
-	s32 i = 0, timeout = 200; /* FIXME: find real value to use here */
+	s32 i = 0, timeout = 200;
 
 	while (i < timeout) {
 		if (igb_get_hw_semaphore_i210(hw)) {
-- 
2.1.0


------------------------------------------------------------------------------
Dive into the World of Parallel Programming. The Go Parallel Website,
sponsored by Intel and developed in partnership with Slashdot Media, is your
hub for all things parallel software development, from weekly thought
leadership blogs to news, videos, case studies, tutorials and more. Take a
look and join the conversation now. http://goparallel.sourceforge.net/
_______________________________________________
E1000-devel mailing list
E1000-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/e1000-devel
To learn more about Intel&#174; Ethernet, visit http://communities.intel.com/community/wired

^ permalink raw reply related


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