Netdev List
 help / color / mirror / Atom feed
* Re: [PATCH 2/7] net: wireless: wcn36xx: get chip type from platform ops
From: Pat Erley @ 2015-01-18  8:36 UTC (permalink / raw)
  To: Andy Green, Kalle Valo, Eugene Krasnikov
  Cc: wcn36xx-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r,
	linux-wireless-u79uwXL29TY76Z2rM5mHXA,
	netdev-u79uwXL29TY76Z2rM5mHXA
In-Reply-To: <20150118051049.31866.47265.stgit-FDDIDLfWL9/T9rR/E2HzMujRB4CPm7EUkgzjau31qRg@public.gmane.org>

On 01/17/2015 11:10 PM, Andy Green wrote:
> Autodetecting the chip type does not work well.
> Stop attempting to do it and require a platform op
> that tells us what the chip is.
>
> Signed-off-by: Andy Green <andy.green-QSEj5FYQhm4dnm+yROfE0A@public.gmane.org>
> ---
>   drivers/net/wireless/ath/wcn36xx/main.c    |   18 +++++-------------
>   drivers/net/wireless/ath/wcn36xx/wcn36xx.h |    1 +
>   2 files changed, 6 insertions(+), 13 deletions(-)
>
> diff --git a/drivers/net/wireless/ath/wcn36xx/main.c b/drivers/net/wireless/ath/wcn36xx/main.c
> index 7dd8873..c4178c7 100644
> --- a/drivers/net/wireless/ath/wcn36xx/main.c
> +++ b/drivers/net/wireless/ath/wcn36xx/main.c
> @@ -221,17 +221,6 @@ static void wcn36xx_feat_caps_info(struct wcn36xx *wcn)
>   	}
>   }
>
> -static void wcn36xx_detect_chip_version(struct wcn36xx *wcn)
> -{
> -	if (get_feat_caps(wcn->fw_feat_caps, DOT11AC)) {
> -		wcn36xx_info("Chip is 3680\n");
> -		wcn->chip_version = WCN36XX_CHIP_3680;
> -	} else {
> -		wcn36xx_info("Chip is 3660\n");
> -		wcn->chip_version = WCN36XX_CHIP_3660;
> -	}
> -}
> -
>   static int wcn36xx_start(struct ieee80211_hw *hw)
>   {
>   	struct wcn36xx *wcn = hw->priv;
> @@ -286,8 +275,6 @@ static int wcn36xx_start(struct ieee80211_hw *hw)
>   			wcn36xx_feat_caps_info(wcn);
>   	}
>
> -	wcn36xx_detect_chip_version(wcn);
> -
>   	/* DMA channel initialization */
>   	ret = wcn36xx_dxe_init(wcn);
>   	if (ret) {
> @@ -1023,6 +1010,11 @@ static int wcn36xx_probe(struct platform_device *pdev)
>   	wcn->hw = hw;
>   	wcn->dev = &pdev->dev;
>   	wcn->ctrl_ops = pdev->dev.platform_data;
> +	if (!wcn->ctrl_ops->get_chip_type) {
> +		dev_err(&pdev->dev, "Missing ops->get_chip_type\n");
> +		return -EINVAL;
> +	}
> +	wcn->chip_version = wcn->ctrl_ops->get_chip_type();
>
>   	mutex_init(&wcn->hal_mutex);
>
> diff --git a/drivers/net/wireless/ath/wcn36xx/wcn36xx.h b/drivers/net/wireless/ath/wcn36xx/wcn36xx.h
> index a5366b6..04793c6 100644
> --- a/drivers/net/wireless/ath/wcn36xx/wcn36xx.h
> +++ b/drivers/net/wireless/ath/wcn36xx/wcn36xx.h
> @@ -110,6 +110,7 @@ struct wcn36xx_platform_ctrl_ops {
>   	void (*close)(void);
>   	int (*tx)(char *buf, size_t len);
>   	int (*get_hw_mac)(u8 *addr);
> +	int (*get_chip_type)(void);
>   	int (*smsm_change_state)(u32 clear_mask, u32 set_mask);
>   };
>

(This all assumes this driver is currently actually being used)

Doesn't this change break any current users of wcn36xx?  Couldn't you
just take the old wcn36xx_detect_chip_version and either add the check
for get_chip_type to the beginning and make it use it and return, or
fall back to the old 'broken' way?

Another alternative would be to update wcn36xx_detect_chip_version to
behave like you expect get_chip_type to, and make it the default and let
platforms override it.
--
To unsubscribe from this list: send the line "unsubscribe linux-wireless" in
the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

^ permalink raw reply

* Re: [RFC PATCH net-next] bridge: ability to disable forwarding on a port
From: roopa @ 2015-01-18  8:48 UTC (permalink / raw)
  To: Arad, Ronen
  Cc: stephen@networkplumber.org, davem@davemloft.net, jhs@mojatatu.com,
	netdev@vger.kernel.org, sfeldma@gmail.com, jiri@resnulli.us,
	tgraf@suug.ch, john.fastabend@gmail.com, vyasevic@redhat.com,
	wkok@cumulusnetworks.com, gospo@cumulusnetworks.com
In-Reply-To: <E4CD12F19ABA0C4D8729E087A761DC3505DF57DB@ORSMSX101.amr.corp.intel.com>

On 1/17/15, 1:14 PM, Arad, Ronen wrote:
>
>> -----Original Message-----
>> From: roopa@cumulusnetworks.com [mailto:roopa@cumulusnetworks.com]
>> Sent: Friday, January 16, 2015 11:33 PM
>> To: stephen@networkplumber.org; davem@davemloft.net; jhs@mojatatu.com;
>> sfeldma@gmail.com; jiri@resnulli.us; Arad, Ronen; tgraf@suug.ch;
>> john.fastabend@gmail.com; vyasevic@redhat.com
>> Cc: netdev@vger.kernel.org; wkok@cumulusnetworks.com;
>> gospo@cumulusnetworks.com
>> Subject: [RFC PATCH net-next] bridge: ability to disable forwarding on a port
>>
>> From: Roopa Prabhu <roopa@cumulusnetworks.com>
>>
>> On a Linux bridge with bridge forwarding offloaded to a switch ASIC,
>> there is a need to not re-forward the frames that come up to the
>> kernel in software.
>>
>> Typically these are broadcast or multicast packets forwarded by the
>> hardware to multiple destination ports including sending a copy of
>> the packet to the kernel (e.g. an arp broadcast).
>> The bridge driver will try to forward the packet again, resulting in
>> two copies of the same packet.
>>
>> These packets can also come up to the kernel for logging when they hit
>> a LOG acl in hardware.
>>
>> This patch makes forwarding a flag on the port similar to
>> learn and flood and drops the packet just before forwarding.
>> (The forwarding disable on a bridge is tested to work on our boxes.
>> The bridge port flag addition is only compile tested.
>> This will need to be further refined to cover cases where a non-switch port
>> is bridged to a switch port etc. We will submit more patches to cover
>> all cases if we agree on this approach).
>>
>> Other ways to solve the same problem could be to:
>> - use the offload feature flag on these switch ports to avoid the
>> re-forward:
>> https://www.marc.info/?l=linux-netdev&m=141820235010603&w=2
>>
>> - Or the switch driver can mark or set a flag in the skb, which the bridge
>> driver can use to avoid a re-forward.
>>
> The proposed patch does not go along with the offload feature flag.
> The premise of the offload feature flag is that offloading is driven by the
> switch port driver without user intervention. This patch requires different
> setting for BR_FLOOD in the software bridge port and the switch port driver.
Even with the offload feature flag, there are a few bridge port 
attributes that can be set
from userspace which can be different for sw and hw. So, with this patch 
I was
trying to see if making it similar to the other existing flags would be 
better.
> The alternatives suggested (offload flag or skb flag) are better.

Glad to know your opinion.
>
> The proposed patch avoids re-forward but not without cost. For example in the
> case of unicast flood with local destination, the skb is cloned for each port
> before the forward avoidance in __br_forward. Is it acceptable overhead?

This patch places it in __br_forward to just make sure all the paths 
including the netfilter
hook is traversed for these packets. And plus it was written with 
minimal changes in mind.
We have not measured it but the extra overhead for these pkts that hit
the kernel has been negligible. But, I will look at the code to see if 
it can be avoided.

Thanks,
Roopa

^ permalink raw reply

* Re: [RFC PATCH net-next] bridge: ability to disable forwarding on a port
From: roopa @ 2015-01-18  9:10 UTC (permalink / raw)
  To: Scott Feldman
  Cc: stephen@networkplumber.org, David S. Miller, Jamal Hadi Salim,
	Jiří Pírko, Arad, Ronen, Thomas Graf,
	john fastabend, vyasevic@redhat.com, Netdev, Wilson Kok,
	Andy Gospodarek
In-Reply-To: <CAE4R7bBeNojtj3Zyd6+zSJFGRjG4vejBObnS1XUFAfJDZJZYow@mail.gmail.com>

On 1/17/15, 5:05 PM, Scott Feldman wrote:
> On Fri, Jan 16, 2015 at 11:32 PM,  <roopa@cumulusnetworks.com> wrote:
>> From: Roopa Prabhu <roopa@cumulusnetworks.com>
>>
>> On a Linux bridge with bridge forwarding offloaded to a switch ASIC,
>> there is a need to not re-forward the frames that come up to the
>> kernel in software.
>>
>> Typically these are broadcast or multicast packets forwarded by the
>> hardware to multiple destination ports including sending a copy of
>> the packet to the kernel (e.g. an arp broadcast).
>> The bridge driver will try to forward the packet again, resulting in
>> two copies of the same packet.
>>
>> These packets can also come up to the kernel for logging when they hit
>> a LOG acl in hardware.
>>
>> This patch makes forwarding a flag on the port similar to
>> learn and flood and drops the packet just before forwarding.
>> (The forwarding disable on a bridge is tested to work on our boxes.
>> The bridge port flag addition is only compile tested.
>> This will need to be further refined to cover cases where a non-switch port
>> is bridged to a switch port etc. We will submit more patches to cover
>> all cases if we agree on this approach).
> Good topic to bring up, thanks for proposing a patch.  There is indeed
> duplicate pkts sent out in the case where both the bridge and the
> offloaded device are flooding these non-unicast pkts, such as ARP
> requests.  We do have per-port control today over unicast flooding
> using BR_FLOOD (IFLA_BRPORT_UNICAST_FLOOD).
>
> As you point out, this doesn't solve the case for non-offloaded ports
> bridged with switch ports.  If this port setting is enabled on an
> offloaded switch port, for example, the non-offloaded port can't get
> an ARP request resolved, if the MAC is behind the offloaded switch
> port.  But do we care?  Is there a use-case for this one, mixing
> offloaded and non-offloaded ports in a bridge?

Not sure. I don't know the use case, but I think I might have heard that 
there could be a case
  where a switch port could be bridged with a vm's port running on the 
switch. (?)
>
>> Other ways to solve the same problem could be to:
>> - use the offload feature flag on these switch ports to avoid the
>> re-forward:
>> https://www.marc.info/?l=linux-netdev&m=141820235010603&w=2
>>
>> - Or the switch driver can mark or set a flag in the skb, which the bridge
>> driver can use to avoid a re-forward.
>>
>> Signed-off-by: Wilson Kok <wkok@cumulusnetworks.com>
>> Signed-off-by: Roopa Prabhu <roopa@cumulusnetworks.com>
>> ---
>>   include/linux/if_bridge.h    |    3 ++-
>>   include/uapi/linux/if_link.h |    1 +
>>   net/bridge/br_forward.c      |   13 +++++++++++++
>>   net/bridge/br_if.c           |    2 +-
>>   net/bridge/br_netlink.c      |    4 +++-
>>   net/bridge/br_sysfs_if.c     |    1 +
>>   net/core/rtnetlink.c         |    4 +++-
>>   7 files changed, 24 insertions(+), 4 deletions(-)
>>
>> diff --git a/include/linux/if_bridge.h b/include/linux/if_bridge.h
>> index 0a8ce76..c79f4eb 100644
>> --- a/include/linux/if_bridge.h
>> +++ b/include/linux/if_bridge.h
>> @@ -40,10 +40,11 @@ struct br_ip_list {
>>   #define BR_ADMIN_COST          BIT(4)
>>   #define BR_LEARNING            BIT(5)
>>   #define BR_FLOOD               BIT(6)
>> -#define BR_AUTO_MASK           (BR_FLOOD | BR_LEARNING)
>>   #define BR_PROMISC             BIT(7)
>>   #define BR_PROXYARP            BIT(8)
>>   #define BR_LEARNING_SYNC       BIT(9)
>> +#define BR_FORWARD             BIT(10)
> The name BR_FORWARD might confuse people thinking this is related to
> STP FORWARDING state.
yes, that thought crossed my mind too. I had BR_FORWARDING initially and 
to make it sound less like
STP changed it to BR_FORWARD. :)

> We have BR_FLOOD for unknown unicast flooding.
> How about renaming BR_FLOOD to BR_FLOOD_UNICAST and add
> BR_FLOOD_BROADCAST?  So you would have:
>
>    IFLA_BRPORT_UNICAST_FLOOD           BR_FLOOD_UNICAST        /* flood
> unknown unicast traffic to port */
>    IFLA_BRPORT_BROADCAST_FLOOD    BR_FLOOD_BROADCAST  /* flood
> bcast/mcast traffic to port */

That's a good idea. So, unknown unicast and broadcast will be covered 
with that.
Am afraid there might be other packets, like the acl LOG packet hitting 
the CPU/kernel (?)
I will check if there are others.
>
>> +#define BR_AUTO_MASK           (BR_FLOOD | BR_LEARNING | BR_FORWARD)
>>
>>   extern void brioctl_set(int (*ioctl_hook)(struct net *, unsigned int, void __user *));
>>
>> diff --git a/include/uapi/linux/if_link.h b/include/uapi/linux/if_link.h
>> index f7d0d2d..d394625 100644
>> --- a/include/uapi/linux/if_link.h
>> +++ b/include/uapi/linux/if_link.h
>> @@ -246,6 +246,7 @@ enum {
>>          IFLA_BRPORT_UNICAST_FLOOD, /* flood unicast traffic */
>>          IFLA_BRPORT_PROXYARP,   /* proxy ARP */
>>          IFLA_BRPORT_LEARNING_SYNC, /* mac learning sync from device */
>> +       IFLA_BRPORT_FORWARD,    /* enable forwarding on a device */
>>          __IFLA_BRPORT_MAX
>>   };
>>   #define IFLA_BRPORT_MAX (__IFLA_BRPORT_MAX - 1)
>> diff --git a/net/bridge/br_forward.c b/net/bridge/br_forward.c
>> index f96933a..98c41c8 100644
>> --- a/net/bridge/br_forward.c
>> +++ b/net/bridge/br_forward.c
>> @@ -81,10 +81,23 @@ static void __br_deliver(const struct net_bridge_port *to, struct sk_buff *skb)
>>                  br_forward_finish);
>>   }
>>
>> +int br_hw_forward_finish(struct sk_buff *skb)
>> +{
>> +       kfree_skb(skb);
>> +
>> +       return 0;
>> +}
>> +
>>   static void __br_forward(const struct net_bridge_port *to, struct sk_buff *skb)
>>   {
>>          struct net_device *indev;
>>
>> +       if (!(to->flags & BR_FORWARD)) {
>> +               NF_HOOK(NFPROTO_BRIDGE, NF_BR_FORWARD, skb, skb->dev, to->dev,
>> +                       br_hw_forward_finish);
>> +               return;
>> +       }
>> +
> Seems you should make the (flags & BR_FORWARD) check earlier, before
> skb cloning, in br_flood(), alongside the (flags & BR_FLOOD) check.
This patch strategically places it in __br_forward to catch all forwards 
(due to floods or no floods ..with direct call to br_foward)
with minimal code changes in mind. Will see if the clone can be avoided.
>
> Also, the above code is skipping some vlan checks (br_handle_vlan).
The br_handle_vlan checks seemed not necessary for a packet getting dropped.
But, will check and fix if its needed while the packet traverses the 
netfilter hook and before it gets dropped.

Thanks,
Roopa

^ permalink raw reply

* Re: [PATCH net-next] iproute2: bridge: support vlan range
From: roopa @ 2015-01-18  9:11 UTC (permalink / raw)
  To: Scott Feldman; +Cc: Netdev, shemminger, vyasevic@redhat.com, Wilson Kok
In-Reply-To: <CAE4R7bA2VHepe8CCYuubH8teXMvRry10jnpsisYq+7Qv+gXzHQ@mail.gmail.com>

On 1/17/15, 5:35 PM, Scott Feldman wrote:
> On Thu, Jan 15, 2015 at 10:52 PM,  <roopa@cumulusnetworks.com> wrote:
>> From: Roopa Prabhu <roopa@cumulusnetworks.com>
>>
>> This patch adds vlan range support to bridge command
>> using the newly added vinfo flags BRIDGE_VLAN_INFO_RANGE_BEGIN and
>> BRIDGE_VLAN_INFO_RANGE_END.
>>
>> $bridge vlan show
>> port    vlan ids
>> br0      1 PVID Egress Untagged
>>
>> dummy0   1 PVID Egress Untagged
>>
>> $bridge vlan add vid 10-15 dev dummy0
>> port    vlan ids
>> br0      1 PVID Egress Untagged
>>
>> dummy0   1 PVID Egress Untagged
>>           10
>>           11
>>           12
>>           13
>>           14
>>           15
>>
>> $bridge vlan del vid 14 dev dummy0
>>
>> $bridge vlan show
>> port    vlan ids
>> br0      1 PVID Egress Untagged
>>
>> dummy0   1 PVID Egress Untagged
>>           10
>>           11
>>           12
>>           13
>>           15
>>
>> $bridge vlan del vid 10-15 dev dummy0
>>
>> $bridge vlan show
>> port    vlan ids
>> br0      1 PVID Egress Untagged
>>
>> dummy0   1 PVID Egress Untagged
>>
>> Signed-off-by: Roopa Prabhu <roopa@cumulusnetworks.com>
>> Signed-off-by: Wilson Kok <wkok@cumulusnetworks.com>
>> ---
>>   bridge/vlan.c             |   46 ++++++++++++++++++++++++++++++++++++++-------
>>   include/linux/if_bridge.h |    2 ++
>>   2 files changed, 41 insertions(+), 7 deletions(-)
>>
>> diff --git a/bridge/vlan.c b/bridge/vlan.c
>> index 3bd7b0d..90b3b6b 100644
>> --- a/bridge/vlan.c
>> +++ b/bridge/vlan.c
>> @@ -32,6 +32,7 @@ static int vlan_modify(int cmd, int argc, char **argv)
>>          } req;
>>          char *d = NULL;
>>          short vid = -1;
>> +       short vid_end = -1;
>>          struct rtattr *afspec;
>>          struct bridge_vlan_info vinfo;
>>          unsigned short flags = 0;
>> @@ -49,8 +50,18 @@ static int vlan_modify(int cmd, int argc, char **argv)
>>                          NEXT_ARG();
>>                          d = *argv;
>>                  } else if (strcmp(*argv, "vid") == 0) {
>> +                       char *p;
>>                          NEXT_ARG();
>> -                       vid = atoi(*argv);
>> +                       p = strchr(*argv, '-');
>> +                       if (p) {
>> +                               *p = '\0';
>> +                               p++;
>> +                               vinfo.vid = atoi(*argv);
>> +                               vid_end = atoi(p);
> Is "vid 10-" same as "vid 10-0"?
correct ..

# bridge vlan add vid 10- dev dummy0
Invalid VLAN range "10-0"

>
> Is "vid -15" same as "vid 0-15"?
correct

# bridge vlan add vid -10 dev dummy0
root@net-next:~/iproute2# bridge vlan show
port    vlan ids
br0     1 PVID Egress Untagged

dummy0     0 PVID
      1
      2
      3
      4
      5
      6
      7
      8
      9
      10

dummy1     1 PVID Egress Untagged

maybe vlan 0 should not be allowed. Will check

>
> What is "vid -"?
>
> Does the "-" char mess up shells?  I don't know the answer; just asking.
No it does not :)

# bridge vlan add vid -
Device and VLAN ID are required arguments.

>
>> +                               vinfo.flags |= BRIDGE_VLAN_INFO_RANGE_BEGIN;
>> +                       } else {
>> +                               vinfo.vid = atoi(*argv);
>> +                       }
>>                  } else if (strcmp(*argv, "self") == 0) {
>>                          flags |= BRIDGE_FLAGS_SELF;
>>                  } else if (strcmp(*argv, "master") == 0) {
>> @@ -67,7 +78,7 @@ static int vlan_modify(int cmd, int argc, char **argv)
>>                  argc--; argv++;
>>          }
>>
>> -       if (d == NULL || vid == -1) {
>> +       if (d == NULL || vinfo.vid == -1) {
> Where was vinfo.vid initialized to -1?  Maybe use vid rather than
> vinfo.vid in the code above where parsing the arg, and continue using
> vid and vid_end until final put of vinfo.
>
There is already a "memset(&vinfo, 0, sizeof(vinfo));"  in the code in 
the beginning of the function.
And the code is already using vinfo for flags. That's the reason i 
decided to use vinfo here.

Thanks,
Roopa

^ permalink raw reply

* [patch net-next] switchdev: fix typo in inline function definition
From: Jiri Pirko @ 2015-01-18  9:25 UTC (permalink / raw)
  To: netdev; +Cc: davem, sfeldma

Signed-off-by: Jiri Pirko <jiri@resnulli.us>
---
 include/net/switchdev.h | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/include/net/switchdev.h b/include/net/switchdev.h
index 201120e..205e636 100644
--- a/include/net/switchdev.h
+++ b/include/net/switchdev.h
@@ -69,7 +69,7 @@ static inline int unregister_netdev_switch_notifier(struct notifier_block *nb)
 }
 
 static inline int call_netdev_switch_notifiers(unsigned long val, struct net_device *dev,
-					       struct netdev_switch_notifier_info *info);
+					       struct netdev_switch_notifier_info *info)
 {
 	return NOTIFY_DONE;
 }
-- 
1.9.3

^ permalink raw reply related

* Bridge code in net-next does not compile
From: Marcel Holtmann @ 2015-01-18 10:33 UTC (permalink / raw)
  To: Network Development, David S. Miller

Hi,

when compiling net-next, the bridge code fails to compile:

  CC      net/bridge/br.o
In file included from net/bridge/br.c:22:0:
include/net/switchdev.h:73:1: error: expected identifier or ‘(’ before ‘{’ token
 {
 ^
include/net/switchdev.h:71:90: warning: ‘call_netdev_switch_notifiers’ declared ‘static’ but never defined [-Wunused-function]
 static inline int call_netdev_switch_notifiers(unsigned long val, struct net_device *dev,
                                                                                          ^

I bisecting this to this commit:

commit 03bf0c281234028388108d0aee720954f5fe6924
Author: Jiri Pirko <jiri@resnulli.us>
Date:   Thu Jan 15 23:49:36 2015 +0100

    switchdev: introduce switchdev notifier
    
    This patch introduces new notifier for purposes of exposing events which happen
    on switch driver side. The consumers of the event messages are mainly involved
    masters, namely bridge and ovs.
    
    Suggested-by: Thomas Graf <tgraf@suug.ch>
    Signed-off-by: Jiri Pirko <jiri@resnulli.us>
    Signed-off-by: Scott Feldman <sfeldma@gmail.com>
    Signed-off-by: David S. Miller <davem@davemloft.net>

Regards

Marcel

^ permalink raw reply

* Re: Bridge code in net-next does not compile
From: Jiri Pirko @ 2015-01-18 10:39 UTC (permalink / raw)
  To: Marcel Holtmann; +Cc: Network Development, David S. Miller
In-Reply-To: <D49DF51C-D713-4D2C-9CB0-F7C21403F68A@holtmann.org>

Sun, Jan 18, 2015 at 11:33:24AM CET, marcel@holtmann.org wrote:
>Hi,
>
>when compiling net-next, the bridge code fails to compile:
>
>  CC      net/bridge/br.o
>In file included from net/bridge/br.c:22:0:
>include/net/switchdev.h:73:1: error: expected identifier or ‘(’ before ‘{’ token
> {
> ^
>include/net/switchdev.h:71:90: warning: ‘call_netdev_switch_notifiers’ declared ‘static’ but never defined [-Wunused-function]
> static inline int call_netdev_switch_notifiers(unsigned long val, struct net_device *dev,

Hi, I already sent fix:

http://patchwork.ozlabs.org/patch/430160/

>                                                                                          ^
>
>I bisecting this to this commit:
>
>commit 03bf0c281234028388108d0aee720954f5fe6924
>Author: Jiri Pirko <jiri@resnulli.us>
>Date:   Thu Jan 15 23:49:36 2015 +0100
>
>    switchdev: introduce switchdev notifier
>    
>    This patch introduces new notifier for purposes of exposing events which happen
>    on switch driver side. The consumers of the event messages are mainly involved
>    masters, namely bridge and ovs.
>    
>    Suggested-by: Thomas Graf <tgraf@suug.ch>
>    Signed-off-by: Jiri Pirko <jiri@resnulli.us>
>    Signed-off-by: Scott Feldman <sfeldma@gmail.com>
>    Signed-off-by: David S. Miller <davem@davemloft.net>
>
>Regards
>
>Marcel
>
>--
>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: Bridge code in net-next does not compile
From: Marcel Holtmann @ 2015-01-18 10:45 UTC (permalink / raw)
  To: Jiri Pirko; +Cc: Network Development, David S. Miller
In-Reply-To: <20150118103938.GA1944@nanopsycho.orion>

Hi Jiri,

>> when compiling net-next, the bridge code fails to compile:
>> 
>> CC      net/bridge/br.o
>> In file included from net/bridge/br.c:22:0:
>> include/net/switchdev.h:73:1: error: expected identifier or ‘(’ before ‘{’ token
>> {
>> ^
>> include/net/switchdev.h:71:90: warning: ‘call_netdev_switch_notifiers’ declared ‘static’ but never defined [-Wunused-function]
>> static inline int call_netdev_switch_notifiers(unsigned long val, struct net_device *dev,
> 
> Hi, I already sent fix:
> 
> http://patchwork.ozlabs.org/patch/430160/

good. I was just building the same fix for it. Except with an actual commit message showing the error.

Next time please compile test your patches with CONFIG_NET_SWITCHDEV=n. You were adding code that depends on a kernel config option. So that should have been something obvious to actually compile test.

Dave, if you prefer a commit message with the error, then I can send my patch.

Regards

Marcel

^ permalink raw reply

* Re: Wireless scanning while turning off the radio problem..
From: Arend van Spriel @ 2015-01-18 10:55 UTC (permalink / raw)
  To: Linus Torvalds
  Cc: Johannes Berg, David Miller, Linux Wireless List,
	Network Development
In-Reply-To: <CA+55aFyr9LC7oLoJeyFwK4KRURbbUyO63jznTTAkQF+9LBAsfg@mail.gmail.com>

On 01/18/15 04:25, Linus Torvalds wrote:
> So there seems to be some issue with unlucky timing when turning off
> wireless while the driver is busy scanning. I can't reproduce this, so
> it's a one-off, but it's not just ugly warnings, the kernel woudln't
> scan any wireless on that device afterwards and I had to reboot to get
> networking back, so there is some long-term damage.
>
> This is with Intel wireless (iwlwifi, it's a iwl N7260 thing, rev
> 0x144 if anybody cares) , but the warning callbacks don't seem to be
> iwl-specific.
>
> This was a recent top-of-git kernel (3.19.0-rc4-00241-gfc7f0dd38172 to
> be exact).
>
> Anybody have any ideas? Anything in particular I should try out to
> help possibly get more information?

If I am not mistaken the "iwl N7260 thing" is a PCIe device.

iwl_pcie_irq_handler
	iwl_trans_pcie_rf_kill
		if (iwl_op_mode_hw_rf_kill)
			iwl_trans_pcie_stop_device

The function iwl_trans_pcie_stop_device() put device in low-power and 
resets the cpu on the device. So iwl_op_mode_hw_rf_kill ends up in
iwl_mvm_set_hw_rfkill_state which schedules cfg80211_rfkill_sync_work 
and returns true if firmware is running. The patch below might work.

Regards,
Arend

diff --git a/drivers/net/wireless/iwlwifi/mvm/ops.c 
b/drivers/net/wireless/iwlwi
index 97dfba5..685217a 100644
--- a/drivers/net/wireless/iwlwifi/mvm/ops.c
+++ b/drivers/net/wireless/iwlwifi/mvm/ops.c
@@ -779,6 +779,9 @@ static bool iwl_mvm_set_hw_rfkill_state(struct 
iwl_op_mode *
         if (calibrating)
                 iwl_abort_notification_waits(&mvm->notif_wait);

+       /* stop scheduled scan */
+       iwl_mvm_scan_offload_stop(mvm, true);
+
         /*
          * Stop the device if we run OPERATIONAL firmware or if we are 
in the
          * middle of the calibrations.

^ permalink raw reply related

* Re: Wireless scanning while turning off the radio problem..
From: Emmanuel Grumbach @ 2015-01-18 11:24 UTC (permalink / raw)
  To: Linus Torvalds
  Cc: Johannes Berg, David Miller, Linux Wireless List,
	Network Development
In-Reply-To: <CA+55aFyr9LC7oLoJeyFwK4KRURbbUyO63jznTTAkQF+9LBAsfg@mail.gmail.com>

Hi Linus,

On Sun, Jan 18, 2015 at 5:25 AM, Linus Torvalds
<torvalds@linux-foundation.org> wrote:
> So there seems to be some issue with unlucky timing when turning off
> wireless while the driver is busy scanning. I can't reproduce this, so
> it's a one-off, but it's not just ugly warnings, the kernel woudln't
> scan any wireless on that device afterwards and I had to reboot to get
> networking back, so there is some long-term damage.
>
> This is with Intel wireless (iwlwifi, it's a iwl N7260 thing, rev
> 0x144 if anybody cares) , but the warning callbacks don't seem to be
> iwl-specific.
>
> This was a recent top-of-git kernel (3.19.0-rc4-00241-gfc7f0dd38172 to
> be exact).
>
> Anybody have any ideas? Anything in particular I should try out to
> help possibly get more information?
>

we have different scan flows based on the firmware version you have,
so it would help if you could tell me what firmware you have. iwlwifi
prints the firmware version when it loads it:

loaded firmware version X.X.X.X op_mode iwl_mvm.

I'll compile your tree to try to reproduce tonight.

>               Linus
>
> ---
> [  204.361145] iwlwifi 0000:01:00.0: RF_KILL bit toggled to disable radio.
> [  204.362358] ------------[ cut here ]------------
> [  204.362383] WARNING: CPU: 0 PID: 37 at net/wireless/core.c:1011
> cfg80211_netdev_notifier_call+0x491/0x500 [cfg80211]()
> [  204.362385] Modules linked in: ccm rfcomm fuse ip6t_rpfilter
> ip6t_REJECT nf_reject_ipv6 nf_conntrack_ipv6 nf_defrag_ipv6
> nf_conntrack_ipv4 nf_defrag_ipv4 xt_conntrack nf_conntrack ebtable_nat
> ebtable_broute bridge stp llc ebtable_filter ebtables ip6table_mangle
> ip6table_security ip6table_raw ip6table_filter ip6_tables
> iptable_mangle iptable_security iptable_raw bnep arc4 vfat fat
> x86_pkg_temp_thermal pn544_mei mei_phy pn544 coretemp hci kvm_intel
> nfc iTCO_wdt iTCO_vendor_support kvm iwlmvm uvcvideo
> snd_hda_codec_realtek microcode snd_hda_codec_generic
> snd_hda_codec_hdmi mac80211 videobuf2_vmalloc videobuf2_memops
> videobuf2_core v4l2_common snd_hda_intel videodev snd_hda_controller
> joydev btusb media hid_multitouch i2c_i801 snd_hda_codec serio_raw
> iwlwifi bluetooth snd_hwdep snd_seq cfg80211 snd_seq_device
> [  204.362432]  snd_pcm sony_laptop rfkill mei_me snd_timer mei snd
> lpc_ich mfd_core shpchp soundcore dm_crypt i915 crct10dif_pclmul
> crc32_pclmul crc32c_intel i2c_algo_bit ghash_clmulni_intel
> drm_kms_helper drm i2c_core video
> [  204.362453] CPU: 0 PID: 37 Comm: kworker/0:1 Not tainted
> 3.19.0-rc4-00241-gfc7f0dd38172 #14
> [  204.362455] Hardware name: Sony Corporation SVP11213CXB/VAIO, BIOS
> R0270V7 05/17/2013
> [  204.362464] Workqueue: events cfg80211_rfkill_sync_work [cfg80211]
> [  204.362467]  0000000000000000 ffffffffc0375870 ffffffff815eb39a
> 0000000000000000
> [  204.362471]  ffffffff8106c357 ffff8800d3b12890 ffff8800d9e08260
> 0000000000000002
> [  204.362475]  ffff8800d3b12000 ffff8800d9e08000 ffffffffc0350161
> ffff8800d365dc00
> [  204.362479] Call Trace:
> [  204.362490]  [<ffffffff815eb39a>] ? dump_stack+0x40/0x50
> [  204.362496]  [<ffffffff8106c357>] ? warn_slowpath_common+0x77/0xb0
> [  204.362506]  [<ffffffffc0350161>] ?
> cfg80211_netdev_notifier_call+0x491/0x500 [cfg80211]
> [  204.362513]  [<ffffffff814f3769>] ? __dev_remove_pack+0x39/0xa0
> [  204.362538]  [<ffffffff815d9d0c>] ? __unregister_prot_hook+0xcc/0xd0
> [  204.362542]  [<ffffffff815da89c>] ? packet_notifier+0x15c/0x1b0
> [  204.362549]  [<ffffffff81086e65>] ? notifier_call_chain+0x45/0x70
> [  204.362552]  [<ffffffff814f41a9>] ? dev_close_many+0xb9/0x110
> [  204.362556]  [<ffffffff814f65da>] ? dev_close.part.87+0x2a/0x40
> [  204.362559]  [<ffffffff814f6609>] ? dev_close+0x19/0x20
> [  204.362569]  [<ffffffffc034f76d>] ?
> cfg80211_shutdown_all_interfaces+0x3d/0xb0 [cfg80211]
> [  204.362577]  [<ffffffffc034f809>] ?
> cfg80211_rfkill_sync_work+0x29/0x30 [cfg80211]
> [  204.362580]  [<ffffffff81081335>] ? process_one_work+0x135/0x370
> [  204.362585]  [<ffffffff8107e927>] ? pwq_activate_delayed_work+0x27/0x40
> [  204.362589]  [<ffffffff810818c3>] ? worker_thread+0x63/0x480
> [  204.362592]  [<ffffffff81081860>] ? rescuer_thread+0x2f0/0x2f0
> [  204.362596]  [<ffffffff8108606e>] ? kthread+0xce/0xf0
> [  204.362600]  [<ffffffff81085fa0>] ? kthread_create_on_node+0x180/0x180
> [  204.362605]  [<ffffffff815f0eac>] ? ret_from_fork+0x7c/0xb0
> [  204.362609]  [<ffffffff81085fa0>] ? kthread_create_on_node+0x180/0x180
> [  204.362612] ---[ end trace d0ac2826f7d2747f ]---
>
> [  204.362614] ------------[ cut here ]------------
> [  204.362628] WARNING: CPU: 0 PID: 37 at net/mac80211/driver-ops.h:12
> ieee80211_request_sched_scan_stop+0xdd/0xf0 [mac80211]()
> [  204.362630] wlp1s0:  Failed check-sdata-in-driver check, flags: 0x4
> [  204.362631] Modules linked in: ccm rfcomm fuse ip6t_rpfilter
> ip6t_REJECT nf_reject_ipv6 nf_conntrack_ipv6 nf_defrag_ipv6
> nf_conntrack_ipv4 nf_defrag_ipv4 xt_conntrack nf_conntrack ebtable_nat
> ebtable_broute bridge stp llc ebtable_filter ebtables ip6table_mangle
> ip6table_security ip6table_raw ip6table_filter ip6_tables
> iptable_mangle iptable_security iptable_raw bnep arc4 vfat fat
> x86_pkg_temp_thermal pn544_mei mei_phy pn544 coretemp hci kvm_intel
> nfc iTCO_wdt iTCO_vendor_support kvm iwlmvm uvcvideo
> snd_hda_codec_realtek microcode snd_hda_codec_generic
> snd_hda_codec_hdmi mac80211 videobuf2_vmalloc videobuf2_memops
> videobuf2_core v4l2_common snd_hda_intel videodev snd_hda_controller
> joydev btusb media hid_multitouch i2c_i801 snd_hda_codec serio_raw
> iwlwifi bluetooth snd_hwdep snd_seq cfg80211 snd_seq_device
> [  204.362677]  snd_pcm sony_laptop rfkill mei_me snd_timer mei snd
> lpc_ich mfd_core shpchp soundcore dm_crypt i915 crct10dif_pclmul
> crc32_pclmul crc32c_intel i2c_algo_bit ghash_clmulni_intel
> drm_kms_helper drm i2c_core video
> [  204.362695] CPU: 0 PID: 37 Comm: kworker/0:1 Tainted: G        W
>   3.19.0-rc4-00241-gfc7f0dd38172 #14
> [  204.362697] Hardware name: Sony Corporation SVP11213CXB/VAIO, BIOS
> R0270V7 05/17/2013
> [  204.362703] Workqueue: events cfg80211_rfkill_sync_work [cfg80211]
> [  204.362705]  0000000000000000 ffffffffc04e3491 ffffffff815eb39a
> ffff88011a697c18
> [  204.362709]  ffffffff8106c357 ffff8800d9e08660 ffff8800d3b12880
> 00000000fffffffb
> [  204.362713]  ffff8800d9e09618 ffff8800d9e08000 ffffffff8106c3d5
> ffffffffc04e0e78
> [  204.362717] Call Trace:
> [  204.362723]  [<ffffffff815eb39a>] ? dump_stack+0x40/0x50
> [  204.362726]  [<ffffffff8106c357>] ? warn_slowpath_common+0x77/0xb0
> [  204.362730]  [<ffffffff8106c3d5>] ? warn_slowpath_fmt+0x45/0x50
> [  204.362743]  [<ffffffffc049374d>] ?
> ieee80211_request_sched_scan_stop+0xdd/0xf0 [mac80211]
> [  204.362755]  [<ffffffffc0357a33>] ?
> __cfg80211_stop_sched_scan+0x73/0xb0 [cfg80211]
> [  204.362763]  [<ffffffffc035016b>] ?
> cfg80211_netdev_notifier_call+0x49b/0x500 [cfg80211]
> [  204.362768]  [<ffffffff814f3769>] ? __dev_remove_pack+0x39/0xa0
> [  204.362772]  [<ffffffff815d9d0c>] ? __unregister_prot_hook+0xcc/0xd0
> [  204.362776]  [<ffffffff815da89c>] ? packet_notifier+0x15c/0x1b0
> [  204.362781]  [<ffffffff81086e65>] ? notifier_call_chain+0x45/0x70
> [  204.362785]  [<ffffffff814f41a9>] ? dev_close_many+0xb9/0x110
> [  204.362788]  [<ffffffff814f65da>] ? dev_close.part.87+0x2a/0x40
> [  204.362792]  [<ffffffff814f6609>] ? dev_close+0x19/0x20
> [  204.362800]  [<ffffffffc034f76d>] ?
> cfg80211_shutdown_all_interfaces+0x3d/0xb0 [cfg80211]
> [  204.362807]  [<ffffffffc034f809>] ?
> cfg80211_rfkill_sync_work+0x29/0x30 [cfg80211]
> [  204.362811]  [<ffffffff81081335>] ? process_one_work+0x135/0x370
> [  204.362815]  [<ffffffff8107e927>] ? pwq_activate_delayed_work+0x27/0x40
> [  204.362819]  [<ffffffff810818c3>] ? worker_thread+0x63/0x480
> [  204.362822]  [<ffffffff81081860>] ? rescuer_thread+0x2f0/0x2f0
> [  204.362826]  [<ffffffff8108606e>] ? kthread+0xce/0xf0
> [  204.362830]  [<ffffffff81085fa0>] ? kthread_create_on_node+0x180/0x180
> [  204.362834]  [<ffffffff815f0eac>] ? ret_from_fork+0x7c/0xb0
> [  204.362838]  [<ffffffff81085fa0>] ? kthread_create_on_node+0x180/0x180
> [  204.362840] ---[ end trace d0ac2826f7d27480 ]---
> --
> To unsubscribe from this list: send the line "unsubscribe linux-wireless" 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

* Problem with  patch "make nlmsg_end() and genlmsg_end() void"
From: Marcel Holtmann @ 2015-01-18 11:44 UTC (permalink / raw)
  To: Network Development, Johannes Berg; +Cc: David S. Miller, Tom Gundersen

Hi Johannes,

your commit 053c095a82cf773075e83d7233b5cc19a1f73ece is causing problems with systemd-networkd.

I have an up-to-date Arch Linux installation in a KVM and your change causes massive problems. It makes systemd-networkd to run out of memory.

systemd-fsck[84]: /dev/vda1: clean, 53283/131072 files, 409813/524032 blocks
Out of memory: Kill process 142 (systemd-network) score 923 or sacrifice child
Killed process 142 (systemd-network) total-vm:478416kB, anon-rss:463472kB, file-rss:460kB
[FAILED] Failed to start Network Service.
See "systemctl status systemd-networkd.service" for details.
         Stopping Network Service...
[  OK  ] Stopped Network Service.
         Starting Network Service...

Arch Linux 3.19.0-rc4-devel+ (ttyS0)

marcel login: Out of memory: Kill process 154 (systemd-network) score 932 or sacrifice child
Killed process 154 (systemd-network) total-vm:540784kB, anon-rss:468380kB, file-rss:132kB
Out of memory: Kill process 158 (systemd-network) score 932 or sacrifice child
Killed process 158 (systemd-network) total-vm:540388kB, anon-rss:468528kB, file-rss:48kB
Out of memory: Kill process 160 (systemd-network) score 932 or sacrifice child
Killed process 160 (systemd-network) total-vm:540916kB, anon-rss:468528kB, file-rss:4kB
Out of memory: Kill process 162 (systemd-network) score 931 or sacrifice child
Killed process 162 (systemd-network) total-vm:540916kB, anon-rss:468104kB, file-rss:76kB

Regards

Marcel

^ permalink raw reply

* Re: [PATCH 5/7] net: wireless: wcn36xx: swallow two wcn3620 IND messages
From: Sergei Shtylyov @ 2015-01-18 11:47 UTC (permalink / raw)
  To: Andy Green, Kalle Valo, Eugene Krasnikov
  Cc: wcn36xx-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r,
	linux-wireless-u79uwXL29TY76Z2rM5mHXA,
	netdev-u79uwXL29TY76Z2rM5mHXA
In-Reply-To: <20150118051105.31866.43889.stgit-FDDIDLfWL9/T9rR/E2HzMujRB4CPm7EUkgzjau31qRg@public.gmane.org>

Hello.

On 1/18/2015 8:11 AM, Andy Green wrote:

> WCN3620 can asynchronously send two new kinds of indication message,
> since we can't handle them just accept them quietly.

> Signed-off-by: Andy Green <andy.green-QSEj5FYQhm4dnm+yROfE0A@public.gmane.org>
> ---
>   drivers/net/wireless/ath/wcn36xx/smd.c |    6 ++++++
>   1 file changed, 6 insertions(+)

> diff --git a/drivers/net/wireless/ath/wcn36xx/smd.c b/drivers/net/wireless/ath/wcn36xx/smd.c
> index 6398693..819741c 100644
> --- a/drivers/net/wireless/ath/wcn36xx/smd.c
> +++ b/drivers/net/wireless/ath/wcn36xx/smd.c
[...]
> @@ -2107,6 +2109,10 @@ static void wcn36xx_ind_smd_work(struct work_struct *work)
>   	msg_header = (struct wcn36xx_hal_msg_header *)hal_ind_msg->msg;
>
>   	switch (msg_header->msg_type) {
> +	case WCN36XX_HAL_COEX_IND:
> +		break;
> +	case WCN36XX_HAL_AVOID_FREQ_RANGE_IND:
> +		break;

    Can't you merge these 2 cases, so that there's only one *break*?

[...]

WBR, Sergei

--
To unsubscribe from this list: send the line "unsubscribe linux-wireless" in
the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

^ permalink raw reply

* Re: [PATCH 5/7] net: wireless: wcn36xx: swallow two wcn3620 IND messages
From: Andy Green @ 2015-01-18 12:59 UTC (permalink / raw)
  To: Sergei Shtylyov
  Cc: Kalle Valo, Eugene Krasnikov, wcn36xx, linux-wireless, netdev
In-Reply-To: <54BB9D3C.90306@cogentembedded.com>

On 18 January 2015 at 19:47, Sergei Shtylyov
<sergei.shtylyov@cogentembedded.com> wrote:
> Hello.
>
> On 1/18/2015 8:11 AM, Andy Green wrote:
>
>> WCN3620 can asynchronously send two new kinds of indication message,
>> since we can't handle them just accept them quietly.
>
>
>> Signed-off-by: Andy Green <andy.green@linaro.org>
>> ---
>>   drivers/net/wireless/ath/wcn36xx/smd.c |    6 ++++++
>>   1 file changed, 6 insertions(+)
>
>
>> diff --git a/drivers/net/wireless/ath/wcn36xx/smd.c
>> b/drivers/net/wireless/ath/wcn36xx/smd.c
>> index 6398693..819741c 100644
>> --- a/drivers/net/wireless/ath/wcn36xx/smd.c
>> +++ b/drivers/net/wireless/ath/wcn36xx/smd.c
>
> [...]
>>
>> @@ -2107,6 +2109,10 @@ static void wcn36xx_ind_smd_work(struct work_struct
>> *work)
>>         msg_header = (struct wcn36xx_hal_msg_header *)hal_ind_msg->msg;
>>
>>         switch (msg_header->msg_type) {
>> +       case WCN36XX_HAL_COEX_IND:
>> +               break;
>> +       case WCN36XX_HAL_AVOID_FREQ_RANGE_IND:
>> +               break;
>
>
>    Can't you merge these 2 cases, so that there's only one *break*?

Yes will do.

-Andy

> [...]
>
> WBR, Sergei
>

^ permalink raw reply

* Re: [PATCH] isdn:gigaset:Remove unneeded TODO comment for the function,gigaset_procinfo in capi.c
From: Tilman Schmidt @ 2015-01-18 13:09 UTC (permalink / raw)
  To: Nicholas Krause, hjlipp; +Cc: isdn, gigaset307x-common, netdev, linux-kernel
In-Reply-To: <1421519027-22410-1-git-send-email-xerofoify@gmail.com>

Am 17.01.2015 um 19:23 schrieb Nicholas Krause:
> This removes the no longer needed TODO comment for questioning if
> the function,gigaset_procinfo needs to do more work internally. This
> comment is no longer needed due to the function's intended use to be
> returning the name of the structure pointer passed to this function
> of type,capi_ctr. In addition due to this the function's comments
> related to it's intended job are changed to state it returns rather
> then builds the description for the structure and also that the
> function doesn't build the name string but returns the already
> generated one passed to gigaset_procinfo by the structure passed
> to this function.
> 
> Signed-off-by: Nicholas Krause <xerofoify@gmail.com>

Acked-by: Tilman Schmidt <tilman@imap.cc>

Thanks,
Tilman

> ---
>  drivers/isdn/gigaset/capi.c | 6 +++---
>  1 file changed, 3 insertions(+), 3 deletions(-)
> 
> diff --git a/drivers/isdn/gigaset/capi.c b/drivers/isdn/gigaset/capi.c
> index ccec777..c4d666e 100644
> --- a/drivers/isdn/gigaset/capi.c
> +++ b/drivers/isdn/gigaset/capi.c
> @@ -2336,14 +2336,14 @@ static u16 gigaset_send_message(struct capi_ctr *ctr, struct sk_buff *skb)
>  }
>  
>  /**
> - * gigaset_procinfo() - build single line description for controller
> + * gigaset_procinfo() - return single line description for controller
>   * @ctr:	controller descriptor structure.
>   *
> - * Return value: pointer to generated string (null terminated)
> + * Return value: pointer to already generated string (null terminated)
>   */
>  static char *gigaset_procinfo(struct capi_ctr *ctr)
>  {
> -	return ctr->name;	/* ToDo: more? */
> +	return ctr->name;
>  }
>  
>  static int gigaset_proc_show(struct seq_file *m, void *v)
> 

-- 
Tilman Schmidt                              E-Mail: tilman@imap.cc
Bonn, Germany
Diese Nachricht besteht zu 100% aus wiederverwerteten Bits.
Ungeöffnet mindestens haltbar bis: (siehe Rückseite)

^ permalink raw reply

* Re: [PATCH] netlink: make nlmsg_end() and genlmsg_end() void
From: Johannes Berg @ 2015-01-18 13:27 UTC (permalink / raw)
  To: David Miller; +Cc: netdev
In-Reply-To: <20150118.010446.405197490184285420.davem@davemloft.net>

On Sun, 2015-01-18 at 01:04 -0500, David Miller wrote:

> I like this, applied, thanks Johannes.
> 
> You know, I would even be willing to apply a patch adjusting that phonet
> case.  So feel free to submit that.

I can do that - I agree that it's probably fine (you'd have to be not
using libnl and writing bad code to get it wrong) but didn't really want
to do it in that patch.

Anyway it looks like I broke some dump (as reported by Marcel) so I'll
have to dig into that first.

johannes

^ permalink raw reply

* [PATCH] switchdev: fix compilation without CONFIG_NET_SWITCHDEV
From: Johannes Berg @ 2015-01-18 13:36 UTC (permalink / raw)
  To: netdev; +Cc: Johannes Berg

From: Johannes Berg <johannes.berg@intel.com>

The static inline declaration cannot end with a semicolon,
fix that to allow compilation without CONFIG_NET_SWITCHDEV.

Signed-off-by: Johannes Berg <johannes.berg@intel.com>
---
 include/net/switchdev.h | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/include/net/switchdev.h b/include/net/switchdev.h
index 201120e18e4d..205e63698da9 100644
--- a/include/net/switchdev.h
+++ b/include/net/switchdev.h
@@ -69,7 +69,7 @@ static inline int unregister_netdev_switch_notifier(struct notifier_block *nb)
 }
 
 static inline int call_netdev_switch_notifiers(unsigned long val, struct net_device *dev,
-					       struct netdev_switch_notifier_info *info);
+					       struct netdev_switch_notifier_info *info)
 {
 	return NOTIFY_DONE;
 }
-- 
2.1.4

^ permalink raw reply related

* Re: [PATCH 1/7] net: wireless: wcn36xx: add wcn3620 chip type definition
From: Kalle Valo @ 2015-01-18 14:17 UTC (permalink / raw)
  To: Andy Green; +Cc: Eugene Krasnikov, wcn36xx, linux-wireless, netdev
In-Reply-To: <20150118051043.31866.53087.stgit@114-36-241-182.dynamic.hinet.net>

Andy Green <andy.green@linaro.org> writes:

> Convert the list of chip types to an enum, add the default
> UNKNOWN type and a type for WCN3620 chip
>
> Signed-off-by: Andy Green <andy.green@linaro.org>

Please just use "wcn36xx: ", you should drop "net: wireless: " entirely.

-- 
Kalle Valo

^ permalink raw reply

* [PATCH iproute2 v2 0/3] ip netns: Run over all netns
From: Vadim Kochan @ 2015-01-18 14:10 UTC (permalink / raw)
  To: netdev; +Cc: Vadim Kochan

From: Vadim Kochan <vadim4j@gmail.com>

Allow 'ip netns del' and 'ip netns exec' run over each network namespace names.

'ip netns exec' executes command forcely on eacn nsname.

Added new '-all' 'ip' option to run over each netns,
it can be used for other utils as generic option.

v2:
   Use '-all' option instead of netns name 'all'.

Vadim Kochan (3):
  lib: Exec func on each netns
  ip netns: Allow exec on each netns
  ip netns: Delete all netns

 include/namespace.h |  6 ++++
 include/utils.h     |  5 +++
 ip/ip.c             |  5 ++-
 ip/ipnetns.c        | 98 ++++++++++++++++++++++++++++++++---------------------
 lib/namespace.c     | 22 ++++++++++++
 lib/utils.c         | 28 +++++++++++++++
 man/man8/ip-netns.8 | 28 ++++++++++++---
 man/man8/ip.8       |  7 +++-
 8 files changed, 153 insertions(+), 46 deletions(-)

-- 
2.1.3

^ permalink raw reply

* [PATCH iproute2 v2 1/3] lib: Exec func on each netns
From: Vadim Kochan @ 2015-01-18 14:10 UTC (permalink / raw)
  To: netdev; +Cc: Vadim Kochan
In-Reply-To: <1421590219-19365-1-git-send-email-vadim4j@gmail.com>

From: Vadim Kochan <vadim4j@gmail.com>

Added possibility to run some func on each netns.

Signed-off-by: Vadim Kochan <vadim4j@gmail.com>
---
 include/namespace.h |  6 ++++++
 include/utils.h     |  4 ++++
 lib/namespace.c     | 22 ++++++++++++++++++++++
 lib/utils.c         | 28 ++++++++++++++++++++++++++++
 4 files changed, 60 insertions(+)

diff --git a/include/namespace.h b/include/namespace.h
index b8c5cad..26898b0 100644
--- a/include/namespace.h
+++ b/include/namespace.h
@@ -43,5 +43,11 @@ static int setns(int fd, int nstype)
 
 extern int netns_switch(char *netns);
 extern int netns_get_fd(const char *netns);
+extern int netns_foreach(int (*func)(char *nsname, void *arg), void *arg);
+
+struct netns_func {
+	int (*func)(char *nsname, void *arg);
+	void *arg;
+};
 
 #endif /* __NAMESPACE_H__ */
diff --git a/include/utils.h b/include/utils.h
index e1fe7cf..a8817d3 100644
--- a/include/utils.h
+++ b/include/utils.h
@@ -5,6 +5,7 @@
 #include <asm/types.h>
 #include <resolv.h>
 #include <stdlib.h>
+#include <stdbool.h>
 
 #include "libnetlink.h"
 #include "ll_map.h"
@@ -162,4 +163,7 @@ int iplink_parse(int argc, char **argv, struct iplink_req *req,
 		char **name, char **type, char **link, char **dev,
 		int *group, int *index);
 
+extern int do_each_netns(int (*func)(char *nsname, void *arg), void *arg,
+		bool show_label);
+
 #endif /* __UTILS_H__ */
diff --git a/lib/namespace.c b/lib/namespace.c
index 65c1e3d..c03a103 100644
--- a/lib/namespace.c
+++ b/lib/namespace.c
@@ -99,3 +99,25 @@ int netns_get_fd(const char *name)
 	}
 	return open(path, O_RDONLY);
 }
+
+int netns_foreach(int (*func)(char *nsname, void *arg), void *arg)
+{
+	DIR *dir;
+	struct dirent *entry;
+
+	dir = opendir(NETNS_RUN_DIR);
+	if (!dir)
+		return -1;
+
+	while ((entry = readdir(dir)) != NULL) {
+		if (strcmp(entry->d_name, ".") == 0)
+			continue;
+		if (strcmp(entry->d_name, "..") == 0)
+			continue;
+		if (func(entry->d_name, arg))
+			break;
+	}
+
+	closedir(dir);
+	return 0;
+}
diff --git a/lib/utils.c b/lib/utils.c
index f65ceaa..efebe18 100644
--- a/lib/utils.c
+++ b/lib/utils.c
@@ -31,6 +31,7 @@
 
 
 #include "utils.h"
+#include "namespace.h"
 
 int timestamp_short = 0;
 
@@ -878,3 +879,30 @@ void print_nlmsg_timestamp(FILE *fp, const struct nlmsghdr *n)
 	tstr[strlen(tstr)-1] = 0;
 	fprintf(fp, "Timestamp: %s %lu us\n", tstr, usecs);
 }
+
+static int on_netns(char *nsname, void *arg)
+{
+	struct netns_func *f = arg;
+
+	if (netns_switch(nsname))
+		return -1;
+
+	return f->func(nsname, f->arg);
+}
+
+static int on_netns_label(char *nsname, void *arg)
+{
+	printf("\nnetns: %s\n", nsname);
+	return on_netns(nsname, arg);
+}
+
+int do_each_netns(int (*func)(char *nsname, void *arg), void *arg,
+		bool show_label)
+{
+	struct netns_func nsf = { .func = func, .arg = arg };
+
+	if (show_label)
+		return netns_foreach(on_netns_label, &nsf);
+
+	return netns_foreach(on_netns, &nsf);
+}
-- 
2.1.3

^ permalink raw reply related

* [PATCH iproute2 v2 3/3] ip netns: Delete all netns
From: Vadim Kochan @ 2015-01-18 14:10 UTC (permalink / raw)
  To: netdev; +Cc: Vadim Kochan
In-Reply-To: <1421590219-19365-1-git-send-email-vadim4j@gmail.com>

From: Vadim Kochan <vadim4j@gmail.com>

Allow delete all namespace names by:

    $ ip -all netns del

Signed-off-by: Vadim Kochan <vadim4j@gmail.com>
---
 ip/ipnetns.c        | 26 ++++++++++++++++----------
 man/man8/ip-netns.8 | 12 ++++++++++--
 2 files changed, 26 insertions(+), 12 deletions(-)

diff --git a/ip/ipnetns.c b/ip/ipnetns.c
index 59a9321..e4038ea 100644
--- a/ip/ipnetns.c
+++ b/ip/ipnetns.c
@@ -23,7 +23,7 @@ static int usage(void)
 {
 	fprintf(stderr, "Usage: ip netns list\n");
 	fprintf(stderr, "       ip netns add NAME\n");
-	fprintf(stderr, "       ip netns delete NAME\n");
+	fprintf(stderr, "       ip [-all] netns delete [NAME]\n");
 	fprintf(stderr, "       ip netns identify [PID]\n");
 	fprintf(stderr, "       ip netns pids NAME\n");
 	fprintf(stderr, "       ip [-all] netns exec [NAME] cmd ...\n");
@@ -259,18 +259,11 @@ static int netns_identify(int argc, char **argv)
 
 }
 
-static int netns_delete(int argc, char **argv)
+static int on_netns_del(char *nsname, void *arg)
 {
-	const char *name;
 	char netns_path[MAXPATHLEN];
 
-	if (argc < 1) {
-		fprintf(stderr, "No netns name specified\n");
-		return -1;
-	}
-
-	name = argv[0];
-	snprintf(netns_path, sizeof(netns_path), "%s/%s", NETNS_RUN_DIR, name);
+	snprintf(netns_path, sizeof(netns_path), "%s/%s", NETNS_RUN_DIR, nsname);
 	umount2(netns_path, MNT_DETACH);
 	if (unlink(netns_path) < 0) {
 		fprintf(stderr, "Cannot remove namespace file \"%s\": %s\n",
@@ -280,6 +273,19 @@ static int netns_delete(int argc, char **argv)
 	return 0;
 }
 
+static int netns_delete(int argc, char **argv)
+{
+	if (argc < 1 && !do_all) {
+		fprintf(stderr, "No netns name specified\n");
+		return -1;
+	}
+
+	if (do_all)
+		return netns_foreach(on_netns_del, NULL);
+
+	return on_netns_del(argv[0], NULL);
+}
+
 static int create_netns_dir(void)
 {
 	/* Create the base netns directory if it doesn't exist */
diff --git a/man/man8/ip-netns.8 b/man/man8/ip-netns.8
index 7b9571e..8e6999c 100644
--- a/man/man8/ip-netns.8
+++ b/man/man8/ip-netns.8
@@ -16,10 +16,14 @@ ip-netns \- process network namespace management
 .BR "ip netns" " { " list " } "
 
 .ti -8
-.BR "ip netns" " { " add " | " delete " } "
+.B ip netns add
 .I NETNSNAME
 
 .ti -8
+.B ip [-all] netns del
+.RI "[ " NETNSNAME " ]"
+
+.ti -8
 .BR "ip netns identify"
 .RI "[ " PID " ]"
 
@@ -76,7 +80,7 @@ If NAME is available in /var/run/netns/ this command creates a new
 network namespace and assigns NAME.
 
 .TP
-.B ip netns delete NAME - delete the name of a network namespace
+.B ip [-all] netns delete [ NAME ] - delete the name of a network namespace(s)
 .sp
 If NAME is present in /var/run/netns it is umounted and the mount
 point is removed.  If this is the last user of the network namespace the
@@ -84,6 +88,10 @@ network namespace will be freed, otherwise the network namespace
 persists until it has no more users.  ip netns delete may fail if
 the mount point is in use in another mount namespace.
 
+If
+.B -all
+option was specified then all the network namespace names will be removed.
+
 .TP
 .B ip netns identify [PID] - Report network namespaces names for process
 .sp
-- 
2.1.3

^ permalink raw reply related

* [PATCH iproute2 v2 2/3] ip netns: Allow exec on each netns
From: Vadim Kochan @ 2015-01-18 14:10 UTC (permalink / raw)
  To: netdev; +Cc: Vadim Kochan
In-Reply-To: <1421590219-19365-1-git-send-email-vadim4j@gmail.com>

From: Vadim Kochan <vadim4j@gmail.com>

This change allows to exec some cmd on each
named netns (except default) by specifying '-all' option:

    # ip -all netns exec ip link

Each command executes synchronously.

Exit status is not considered, so there might be a case
that some CMD can fail on some netns but success on the other.

EXAMPLES:

1) Show link info on all netns:

$ ip -all netns exec ip link

netns: test_net
1: lo: <LOOPBACK> mtu 65536 qdisc noop state DOWN mode DEFAULT group default
    link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00
4: tap0: <NO-CARRIER,BROADCAST,MULTICAST,UP> mtu 1500 qdisc pfifo_fast state DOWN mode DEFAULT group default qlen 500
    link/ether 1a:19:6f:25:eb:85 brd ff:ff:ff:ff:ff:ff

netns: home0
1: lo: <LOOPBACK> mtu 65536 qdisc noop state DOWN mode DEFAULT group default
    link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00
4: tap0: <NO-CARRIER,BROADCAST,MULTICAST,UP> mtu 1500 qdisc pfifo_fast state DOWN mode DEFAULT group default qlen 500
    link/ether ea:1a:59:40:d3:29 brd ff:ff:ff:ff:ff:ff

netns: lan0
1: lo: <LOOPBACK> mtu 65536 qdisc noop state DOWN mode DEFAULT group default
    link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00
4: tap0: <NO-CARRIER,BROADCAST,MULTICAST,UP> mtu 1500 qdisc pfifo_fast state DOWN mode DEFAULT group default qlen 500
    link/ether ce:49:d5:46:81:ea brd ff:ff:ff:ff:ff:ff

2) Set UP tap0 device for the all netns:

$ ip -all netns exec ip link set dev tap0 up

netns: test_net

netns: home0

netns: lan0

Signed-off-by: Vadim Kochan <vadim4j@gmail.com>
---
 include/utils.h     |  1 +
 ip/ip.c             |  5 +++-
 ip/ipnetns.c        | 72 ++++++++++++++++++++++++++++++++---------------------
 man/man8/ip-netns.8 | 16 +++++++++---
 man/man8/ip.8       |  7 +++++-
 5 files changed, 67 insertions(+), 34 deletions(-)

diff --git a/include/utils.h b/include/utils.h
index a8817d3..3da2283 100644
--- a/include/utils.h
+++ b/include/utils.h
@@ -24,6 +24,7 @@ extern int timestamp_short;
 extern char * _SL_;
 extern int max_flush_loops;
 extern int batch_mode;
+extern bool do_all;
 
 #ifndef IPPROTO_ESP
 #define IPPROTO_ESP	50
diff --git a/ip/ip.c b/ip/ip.c
index 850a001..da16b15 100644
--- a/ip/ip.c
+++ b/ip/ip.c
@@ -36,6 +36,7 @@ char * _SL_ = NULL;
 int force = 0;
 int max_flush_loops = 10;
 int batch_mode = 0;
+bool do_all = false;
 
 struct rtnl_handle rth = { .fd = -1 };
 
@@ -55,7 +56,7 @@ static void usage(void)
 "                    -4 | -6 | -I | -D | -B | -0 |\n"
 "                    -l[oops] { maximum-addr-flush-attempts } |\n"
 "                    -o[neline] | -t[imestamp] | -ts[hort] | -b[atch] [filename] |\n"
-"                    -rc[vbuf] [size] | -n[etns] name }\n");
+"                    -rc[vbuf] [size] | -n[etns] name | -a[ll] }\n");
 	exit(-1);
 }
 
@@ -270,6 +271,8 @@ int main(int argc, char **argv)
 			NEXT_ARG();
 			if (netns_switch(argv[1]))
 				exit(-1);
+		} else if (matches(opt, "-all") == 0) {
+			do_all = true;
 		} else {
 			fprintf(stderr, "Option \"%s\" is unknown, try \"ip -help\".\n", opt);
 			exit(-1);
diff --git a/ip/ipnetns.c b/ip/ipnetns.c
index 123318e..59a9321 100644
--- a/ip/ipnetns.c
+++ b/ip/ipnetns.c
@@ -26,7 +26,7 @@ static int usage(void)
 	fprintf(stderr, "       ip netns delete NAME\n");
 	fprintf(stderr, "       ip netns identify [PID]\n");
 	fprintf(stderr, "       ip netns pids NAME\n");
-	fprintf(stderr, "       ip netns exec NAME cmd ...\n");
+	fprintf(stderr, "       ip [-all] netns exec [NAME] cmd ...\n");
 	fprintf(stderr, "       ip netns monitor\n");
 	exit(-1);
 }
@@ -51,29 +51,10 @@ static int netns_list(int argc, char **argv)
 	return 0;
 }
 
-static int netns_exec(int argc, char **argv)
+static int cmd_exec(const char *cmd, char **argv, bool do_fork)
 {
-	/* Setup the proper environment for apps that are not netns
-	 * aware, and execute a program in that environment.
-	 */
-	const char *cmd;
-
-	if (argc < 1) {
-		fprintf(stderr, "No netns name specified\n");
-		return -1;
-	}
-	if (argc < 2) {
-		fprintf(stderr, "No command specified\n");
-		return -1;
-	}
-	cmd = argv[1];
-
-	if (netns_switch(argv[0]))
-		return -1;
-
 	fflush(stdout);
-
-	if (batch_mode) {
+	if (do_fork) {
 		int status;
 		pid_t pid;
 
@@ -91,23 +72,56 @@ static int netns_exec(int argc, char **argv)
 			}
 
 			if (WIFEXITED(status)) {
-				/* ip must return the status of the child,
-				 * but do_cmd() will add a minus to this,
-				 * so let's add another one here to cancel it.
-				 */
-				return -WEXITSTATUS(status);
+				return WEXITSTATUS(status);
 			}
 
 			exit(1);
 		}
 	}
 
-	if (execvp(cmd, argv + 1)  < 0)
+	if (execvp(cmd, argv)  < 0)
 		fprintf(stderr, "exec of \"%s\" failed: %s\n",
-			cmd, strerror(errno));
+				cmd, strerror(errno));
 	_exit(1);
 }
 
+static int on_netns_exec(char *nsname, void *arg)
+{
+	char **argv = arg;
+	cmd_exec(argv[1], argv + 1, true);
+	return 0;
+}
+
+static int netns_exec(int argc, char **argv)
+{
+	/* Setup the proper environment for apps that are not netns
+	 * aware, and execute a program in that environment.
+	 */
+	const char *cmd;
+
+	if (argc < 1 && !do_all) {
+		fprintf(stderr, "No netns name specified\n");
+		return -1;
+	}
+	if ((argc < 2 && !do_all) || (argc < 1 && do_all)) {
+		fprintf(stderr, "No command specified\n");
+		return -1;
+	}
+
+	if (do_all)
+		return do_each_netns(on_netns_exec, --argv, 1);
+
+	if (netns_switch(argv[0]))
+		return -1;
+
+	/* ip must return the status of the child,
+	 * but do_cmd() will add a minus to this,
+	 * so let's add another one here to cancel it.
+	 */
+	cmd = argv[1];
+	return -cmd_exec(cmd, argv + 1, !!batch_mode);
+}
+
 static int is_pid(const char *str)
 {
 	int ch;
diff --git a/man/man8/ip-netns.8 b/man/man8/ip-netns.8
index 74343ed..7b9571e 100644
--- a/man/man8/ip-netns.8
+++ b/man/man8/ip-netns.8
@@ -28,8 +28,8 @@ ip-netns \- process network namespace management
 .I NETNSNAME
 
 .ti -8
-.BR "ip netns exec "
-.I NETNSNAME command ...
+.BR "ip [-all] netns exec "
+.RI "[ " NETNSNAME " ] " command ...
 
 .ti -8
 .BR "ip netns monitor"
@@ -98,7 +98,7 @@ This command walks through proc and finds all of the process who have
 the named network namespace as their primary network namespace.
 
 .TP
-.B ip netns exec NAME cmd ... - Run cmd in the named network namespace
+.B ip [-all] netns exec [ NAME ] cmd ... - Run cmd in the named network namespace
 .sp
 This command allows applications that are network namespace unaware
 to be run in something other than the default network namespace with
@@ -107,6 +107,16 @@ in the customary global locations.  A network namespace and bind mounts
 are used to move files from their network namespace specific location
 to their default locations without affecting other processes.
 
+If
+.B -all
+option was specified then
+.B cmd
+will be executed synchronously on the each named network namespace even if
+.B cmd
+fails on some of them. Network namespace name is printed on each
+.B cmd
+executing.
+
 .TP
 .B ip netns monitor - Report as network namespace names are added and deleted
 .sp
diff --git a/man/man8/ip.8 b/man/man8/ip.8
index 0bae59e..016e8c6 100644
--- a/man/man8/ip.8
+++ b/man/man8/ip.8
@@ -32,7 +32,8 @@ ip \- show / manipulate routing, devices, policy routing and tunnels
 \fB\-f\fR[\fIamily\fR] {
 .BR inet " | " inet6 " | " ipx " | " dnet " | " link " } | "
 \fB\-o\fR[\fIneline\fR] |
-\fB\-n\fR[\fIetns\fR] name }
+\fB\-n\fR[\fIetns\fR] name |
+\fB\-a\fR[\fIll\fR] }
 
 
 .SH OPTIONS
@@ -155,6 +156,10 @@ to
 .RI "-n[etns] " NETNS " [ " OPTIONS " ] " OBJECT " { " COMMAND " | "
 .BR help " }"
 
+.TP
+.BR "\-a" , " \-all"
+executes specified command over all objects, it depends if command supports this option.
+
 .SH IP - COMMAND SYNTAX
 
 .SS
-- 
2.1.3

^ permalink raw reply related

* Re: BW regression after "tcp: refine TSO autosizing"
From: Eyal Perry @ 2015-01-18 16:22 UTC (permalink / raw)
  To: Eric Dumazet
  Cc: Or Gerlitz, Linux Netdev List, Amir Vadai, Yevgeny Petrilin,
	Saeed Mahameed, Ido Shamay, Amir Ancel, Eyal Perry
In-Reply-To: <1421186430.11734.6.camel@edumazet-glaptop2.roam.corp.google.com>

On Wed, Jan 14, 2015 at 12:00 AM, Eric Dumazet <eric.dumazet@gmail.com> wrote:
> Make sure you do not drop packets at receiver. (Patch might have increased raw speed, and receiver starts dropping packets because it is not able to sustain line rate on a single flow)

Hi Eric,

I double checked that there are no drops on the receiver (ifconfig,
ethtool, and net_dropmonitor).

> If cwnd is too small, then yes, sending slightly smaller TSO packets can impact performance, but this is desirable as well. This is a congestion control problem.

How can we reliably measure the cwnd? tpci_snd_cwnd is not consistent
across runs.
Anyway, we don't see difference in the TSO packets size (see results below).

> lpaa23:~# nstat >/dev/null; DUMP_TCP_INFO=1 ./netperf -H lpaa24;nstat
[...]
>
> You also can see in this sample Hystart ended slow start with a very small cwnd of 70

We see the issue also on very long runs so I don't understand how is
it related to the slow start mechanism.


Below, are two measurements with all the statistics.
* with your patch:
$ nstat >/dev/null; netperf -H remote;nstat
MIGRATED TCP STREAM TEST from 0.0.0.0 (0.0.0.0) port 0 AF_INET to
11.11.11.36 () port 0 AF_INET
tcpi_rto 204000 tcpi_ato 0 tcpi_pmtu 1500 tcpi_rcv_ssthresh 29200
tcpi_rtt 79 tcpi_rttvar 14 tcpi_snd_ssthresh 214 tpci_snd_cwnd 634
tcpi_reordering 3 tcpi_total_retrans 0
Recv   Send    Send
Socket Socket  Message  Elapsed
Size   Size    Size     Time     Throughput
bytes  bytes   bytes    secs.    10^6bits/sec

 87380  16384  16384    10.00    18537.46
#kernel
IpInReceives                    260728             0.0
IpInDelivers                    260728             0.0
IpOutRequests                   355684             0.0
TcpActiveOpens                  2                  0.0
TcpInSegs                       260729             0.0
TcpOutSegs                      16004157           0.0
UdpInDatagrams                  1                  0.0
UdpOutDatagrams                 7                  0.0
UdpIgnoredMulti                 1                  0.0
Ip6InReceives                   4                  0.0
Ip6InDelivers                   4                  0.0
Ip6OutRequests                  3                  0.0
Ip6InMcastPkts                  1                  0.0
Ip6InOctets                     288                0.0
Ip6OutOctets                    856                0.0
Ip6InMcastOctets                72                 0.0
Ip6InNoECTPkts                  4                  0.0
Icmp6InMsgs                     1                  0.0
Icmp6InNeighborAdvertisements   1                  0.0
Icmp6InType136                  1                  0.0
TcpExtDelayedACKs               2                  0.0
TcpExtTCPHPHits                 3                  0.0
TcpExtTCPPureAcks               208131             0.0
TcpExtTCPHPAcks                 52591              0.0
TcpExtTCPAutoCorking            49920              0.0
TcpExtTCPOrigDataSent           16004146           0.0
TcpExtTCPHystartTrainDetect     1                  0.0
TcpExtTCPHystartTrainCwnd       214                0.0
IpExtInBcastPkts                1                  0.0
IpExtInOctets                   13560399           0.0
IpExtOutOctets                  23192484354        0.0
IpExtInBcastOctets              367                0.0
IpExtInNoECTPkts                260728             0.0

* And without it:
$ nstat >/dev/null; netperf -H remote;nstat
MIGRATED TCP STREAM TEST from 0.0.0.0 (0.0.0.0) port 0 AF_INET to
11.11.11.37 () port 0 AF_INET
tcpi_rto 204000 tcpi_ato 0 tcpi_pmtu 1500 tcpi_rcv_ssthresh 29200
tcpi_rtt 108 tcpi_rttvar 13 tcpi_snd_ssthresh 801 tpci_snd_cwnd 809
tcpi_reordering 64 tcpi_total_retrans 6
Recv   Send    Send
Socket Socket  Message  Elapsed
Size   Size    Size     Time     Throughput
bytes  bytes   bytes    secs.    10^6bits/sec

 87380  16384  16384    10.00    26826.32
#kernel
IpInReceives                    431716             0.0
IpInDelivers                    431716             0.0
IpOutRequests                   521537             0.0
TcpActiveOpens                  2                  0.0
TcpInSegs                       431676             0.0
TcpOutSegs                      23164903           0.0
TcpRetransSegs                  6                  0.0
UdpInDatagrams                  3                  0.0
UdpOutDatagrams                 1                  0.0
UdpIgnoredMulti                 40                 0.0
Ip6InReceives                   4                  0.0
Ip6InDelivers                   4                  0.0
Ip6OutRequests                  4                  0.0
Ip6InOctets                     288                0.0
Ip6OutOctets                    928                0.0
Ip6InNoECTPkts                  4                  0.0
Icmp6InMsgs                     1                  0.0
Icmp6OutMsgs                    1                  0.0
Icmp6InNeighborAdvertisements   1                  0.0
Icmp6OutNeighborSolicits        1                  0.0
Icmp6InType136                  1                  0.0
Icmp6OutType135                 1                  0.0
TcpExtDelayedACKs               1                  0.0
TcpExtTCPHPHits                 2                  0.0
TcpExtTCPPureAcks               291894             0.0
TcpExtTCPHPAcks                 139775             0.0
TcpExtTCPSackRecovery           5                  0.0
TcpExtTCPTSReorder              1                  0.0
TcpExtTCPPartialUndo            1                  0.0
TcpExtTCPDSACKUndo              4                  0.0
TcpExtTCPFastRetrans            6                  0.0
TcpExtTCPDSACKRecv              6                  0.0
TcpExtTCPDSACKIgnoredNoUndo     1                  0.0
TcpExtTCPSackShifted            46436              0.0
TcpExtTCPSackMerged             1306               0.0
TcpExtTCPSackShiftFallback      4414               0.0
TcpExtTCPAutoCorking            274120             0.0
TcpExtTCPOrigDataSent           23164893           0.0
TcpExtTCPHystartTrainDetect     1                  0.0
TcpExtTCPHystartTrainCwnd       71                 0.0
IpExtInBcastPkts                42                 0.0
IpExtInOctets                   23066435           0.0
IpExtOutOctets                  33567160556        0.0
IpExtInBcastOctets              4275               0.0
IpExtInNoECTPkts                431716             0.0


Please let me know if you see something in the results.

Regards,
Eyal.

^ permalink raw reply

* Re: Wireless scanning while turning off the radio problem..
From: Linus Torvalds @ 2015-01-18 16:53 UTC (permalink / raw)
  To: Emmanuel Grumbach, Arend van Spriel
  Cc: Johannes Berg, David Miller, Linux Wireless List,
	Network Development
In-Reply-To: <CANUX_P0LCr3fzqLyjKQbZ-P2hAV-Nk6=AMm=oFOWCLW34cRg2w-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>

On Sun, Jan 18, 2015 at 11:24 PM, Emmanuel Grumbach <egrumbach-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote:
>
> we have different scan flows based on the firmware version you have,
> so it would help if you could tell me what firmware you have.

Sure. It's the larest one I could find

   iwlwifi 0000:01:00.0: loaded firmware version 23.11.10.0 op_mode iwlmvm

with the actual firmware file being 'iwlwifi-7260-10.ucode' from the
current linux-firmware tree.

Iin a different email Arend van Spriel <arend-dY08KVG/lbpWk0Htik3J/w@public.gmane.org> wrote:
>
> The function iwl_trans_pcie_stop_device() put device in low-power and
> resets the cpu on the device.  So iwl_op_mode_hw_rf_kill ends up in
> iwl_mvm_set_hw_rfkill_state which schedules cfg80211_rfkill_sync_work
> and returns true if firmware is running.  The patch below might work.

Any suggestions for how to best try to trigger this for testing?
Looking at my logs, it turns out that I actually got this three times,
but they were all on the same boot, and I think the first case might
just have triggered the later ones.

The trigger was turning off wifi from the wifi settings app due to
being in an airplane when they were closing the doors. I don't *think*
there was actually any wifi around at the time, which may or may not
have made the scanning take longer and made it easier to trigger.

But I've done it before (although this machine has been upgraded to
F21 reasonably recently, and I did update the ucode file before the
trip). And I did it afterwards to test. And it happened that one time
(and then apparently kept happening during suspend/resume/shutdown,
but as mentioned, I blame that on some sticky problem from the first
time, and those events in turn happened because I couldn't get
wireless to work afterwards).

IOW, I'm not at all sure I can recreate it, so your "analyzing the
source code for how this could happen" may be the only good way..

               Linus
--
To unsubscribe from this list: send the line "unsubscribe linux-wireless" in
the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

^ permalink raw reply

* tak naléhavé!
From: Správce Mailové Služby @ 2015-01-18 16:52 UTC (permalink / raw)




-- 
Vážený uživateli pošty,

Překročili jste limit úložiště pro vaší poštovní schránky stanovenou  
správcem pošty. Budete moci přihlásit, odesílat a přijímat nové  
e-maily příště, Code: 560. kompletní a odeslat následující prázdné  
sloupce, takže to správce pošty může okamžitě zvýšit limit úložiště  
vašeho poštovního účtu

E-mailová adresa -----
Uživatelské jméno -----
Heslo -----
Potvrzení hesla -----

Máte-li ignorovat, budete moci přihlásit znovu po 24 hodin od oznámení.

Děkuju.
Správce mailové služby

^ permalink raw reply

* Re: [patch net-next] switchdev: fix typo in inline function definition
From: David Miller @ 2015-01-18 17:24 UTC (permalink / raw)
  To: jiri; +Cc: netdev, sfeldma
In-Reply-To: <1421573156-6101-1-git-send-email-jiri@resnulli.us>

From: Jiri Pirko <jiri@resnulli.us>
Date: Sun, 18 Jan 2015 10:25:56 +0100

> Signed-off-by: Jiri Pirko <jiri@resnulli.us>

Oops, applied, 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