Netdev List
 help / color / mirror / Atom feed
* Re: Kernel 4.13.0-rc4-next-20170811 - IP Routing / Forwarding performance vs Core/RSS number / HT on
From: Paweł Staszewski @ 2017-09-09  9:03 UTC (permalink / raw)
  To: Eric Dumazet
  Cc: Paolo Abeni, Jesper Dangaard Brouer,
	Linux Kernel Network Developers, Alexander Duyck
In-Reply-To: <1502759849.4936.46.camel@edumazet-glaptop3.roam.corp.google.com>

Hi


Are there any plans to have this fix normally in kernel ?

Or it is mostly only hack - not longterm fix and need to be different ?


All tests that was done shows that without this patch there is about 
20-30% network forwarding performance degradation when using vlan 
interfaces


Thanks
Paweł



W dniu 2017-08-15 o 03:17, Eric Dumazet pisze:
> On Mon, 2017-08-14 at 18:07 -0700, Eric Dumazet wrote:
>
>> Or try to hack the IFF_XMIT_DST_RELEASE flag on the vlan netdev.
> Something like :
>
> diff --git a/net/8021q/vlan_netlink.c b/net/8021q/vlan_netlink.c
> index 5e831de3103e2f7092c7fa15534def403bc62fb4..9472de846d5c0960996261cb2843032847fa4bf7 100644
> --- a/net/8021q/vlan_netlink.c
> +++ b/net/8021q/vlan_netlink.c
> @@ -143,6 +143,7 @@ static int vlan_newlink(struct net *src_net, struct net_device *dev,
>   	vlan->vlan_proto = proto;
>   	vlan->vlan_id	 = nla_get_u16(data[IFLA_VLAN_ID]);
>   	vlan->real_dev	 = real_dev;
> +	dev->priv_flags |= (real_dev->priv_flags & IFF_XMIT_DST_RELEASE);
>   	vlan->flags	 = VLAN_FLAG_REORDER_HDR;
>   
>   	err = vlan_check_real_dev(real_dev, vlan->vlan_proto, vlan->vlan_id);
>
>
>
>

^ permalink raw reply

* [PATCH v2 net] net: qualcomm: rmnet: Fix a double free
From: Dan Carpenter @ 2017-09-09  8:58 UTC (permalink / raw)
  To: David S. Miller, Subash Abhinov Kasiviswanathan; +Cc: netdev, kernel-janitors
In-Reply-To: <2ddbb6da514108b4e70ccd8362292134@codeaurora.org>

There is a typo here so we accidentally free "skb" instead of "skbn".
It leads to a double free and a leak.  After discussing with Subash,
it's better to just move the check before the allocation and avoid the
need to free.

Fixes: ceed73a2cf4a ("drivers: net: ethernet: qualcomm: rmnet: Initial implementation")
Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
---
v2: Fix the leak as well.  Thanks Subash!

diff --git a/drivers/net/ethernet/qualcomm/rmnet/rmnet_map_data.c b/drivers/net/ethernet/qualcomm/rmnet/rmnet_map_data.c
index 557c9bf1a469..86b8c758f94e 100644
--- a/drivers/net/ethernet/qualcomm/rmnet/rmnet_map_data.c
+++ b/drivers/net/ethernet/qualcomm/rmnet/rmnet_map_data.c
@@ -84,6 +84,10 @@ struct sk_buff *rmnet_map_deaggregate(struct sk_buff *skb)
 	if (((int)skb->len - (int)packet_len) < 0)
 		return NULL;
 
+	/* Some hardware can send us empty frames. Catch them */
+	if (ntohs(maph->pkt_len) == 0)
+		return NULL;
+
 	skbn = alloc_skb(packet_len + RMNET_MAP_DEAGGR_SPACING, GFP_ATOMIC);
 	if (!skbn)
 		return NULL;
@@ -94,11 +98,5 @@ struct sk_buff *rmnet_map_deaggregate(struct sk_buff *skb)
 	memcpy(skbn->data, skb->data, packet_len);
 	skb_pull(skb, packet_len);
 
-	/* Some hardware can send us empty frames. Catch them */
-	if (ntohs(maph->pkt_len) == 0) {
-		kfree_skb(skb);
-		return NULL;
-	}
-
 	return skbn;
 }

^ permalink raw reply related

* Re: [PATCH net-next v8] openvswitch: enable NSH support
From: kbuild test robot @ 2017-09-09  7:10 UTC (permalink / raw)
  To: Yi Yang
  Cc: kbuild-all, netdev, davem, dev, jbenc, e, blp, jan.scheurich,
	Yi Yang
In-Reply-To: <1504850299-84140-1-git-send-email-yi.y.yang@intel.com>

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

Hi Yi,

[auto build test ERROR on net-next/master]

url:    https://github.com/0day-ci/linux/commits/Yi-Yang/openvswitch-enable-NSH-support/20170909-124643
config: x86_64-rhel (attached as .config)
compiler: gcc-6 (Debian 6.2.0-3) 6.2.0 20160901
reproduce:
        # save the attached .config to linux build tree
        make ARCH=x86_64 

All errors (new ones prefixed by >>):

>> ERROR: "skb_pop_nsh" [net/openvswitch/openvswitch.ko] undefined!
>> ERROR: "skb_push_nsh" [net/openvswitch/openvswitch.ko] undefined!

---
0-DAY kernel test infrastructure                Open Source Technology Center
https://lists.01.org/pipermail/kbuild-all                   Intel Corporation

[-- Attachment #2: .config.gz --]
[-- Type: application/gzip, Size: 39620 bytes --]

^ permalink raw reply

* [PATCH v1 3/3] net: skb_queue_purge(): lock/unlock the queue only once
From: Michael Witten @ 2017-09-09  5:50 UTC (permalink / raw)
  To: David S. Miller, Alexey Kuznetsov, Hideaki YOSHIFUJI
  Cc: Stephen Hemminger, Eric Dumazet, netdev, linux-kernel
In-Reply-To: <60c8906b751d4915be456009c220516e-mfwitten@gmail.com>

Thanks for your input, Eric Dumazet and Stephen Hemminger; based on
your observations, this version of the patch implements a very
lightweight purging of the queue.

To apply this patch, save this email to:

  /path/to/email

and then run:

  git am --scissors /path/to/email

You may also fetch this patch from GitHub:

  git checkout -b test 5969d1bb3082b41eba8fd2c826559abe38ccb6df
  git pull https://github.com/mfwitten/linux.git net/tcp-ip/01-cleanup/02

Sincerely,
Michael Witten

8<----8<----8<----8<----8<----8<----8<----8<----8<----8<----8<----8<----8<----

Hitherto, the queue's lock has been locked/unlocked every time
an item is dequeued; this seems not only inefficient, but also
incorrect, as the whole point of `skb_queue_purge()' is to clear
the queue, presumably without giving any other thread a chance to
manipulate the queue in the interim.

With this commit, the queue's lock is locked/unlocked only once
when `skb_queue_purge()' is called, and in a way that disables
the IRQs for only a minimal amount of time.

This is achieved by atomically re-initializing the queue (thereby
clearing it), and then freeing each of the items as though it were
enqueued in a private queue that doesn't require locking.

Signed-off-by: Michael Witten <mfwitten@gmail.com>
---
 net/core/skbuff.c | 26 ++++++++++++++++++--------
 1 file changed, 18 insertions(+), 8 deletions(-)

diff --git a/net/core/skbuff.c b/net/core/skbuff.c
index 68065d7d383f..bd26b0bde784 100644
--- a/net/core/skbuff.c
+++ b/net/core/skbuff.c
@@ -2825,18 +2825,28 @@ struct sk_buff *skb_dequeue_tail(struct sk_buff_head *list)
 EXPORT_SYMBOL(skb_dequeue_tail);
 
 /**
- *	skb_queue_purge - empty a list
- *	@list: list to empty
+ *	skb_queue_purge - empty a queue
+ *	@q: the queue to empty
  *
- *	Delete all buffers on an &sk_buff list. Each buffer is removed from
- *	the list and one reference dropped. This function takes the list
- *	lock and is atomic with respect to other list locking functions.
+ *	Dequeue and free each socket buffer that is in @q.
+ *
+ *	This function is atomic with respect to other queue-locking functions.
  */
-void skb_queue_purge(struct sk_buff_head *list)
+void skb_queue_purge(struct sk_buff_head *q)
 {
-	struct sk_buff *skb;
-	while ((skb = skb_dequeue(list)) != NULL)
+	unsigned long flags;
+	struct sk_buff *skb, *next, *head = (struct sk_buff *)q;
+
+	spin_lock_irqsave(&q->lock, flags);
+	skb = q->next;
+	__skb_queue_head_init(q);
+	spin_unlock_irqrestore(&q->lock, flags);
+
+	while (skb != head) {
+		next = skb->next;
 		kfree_skb(skb);
+		skb = next;
+	}
 }
 EXPORT_SYMBOL(skb_queue_purge);
 
-- 
2.14.1

^ permalink raw reply related

* Re: [PATCH net-next v8] openvswitch: enable NSH support
From: kbuild test robot @ 2017-09-09  5:40 UTC (permalink / raw)
  To: Yi Yang
  Cc: kbuild-all, netdev, davem, dev, jbenc, e, blp, jan.scheurich,
	Yi Yang
In-Reply-To: <1504850299-84140-1-git-send-email-yi.y.yang@intel.com>

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

Hi Yi,

[auto build test ERROR on net-next/master]

url:    https://github.com/0day-ci/linux/commits/Yi-Yang/openvswitch-enable-NSH-support/20170909-124643
config: i386-randconfig-a1-201736 (attached as .config)
compiler: gcc-5 (Debian 5.4.1-2) 5.4.1 20160904
reproduce:
        # save the attached .config to linux build tree
        make ARCH=i386 

All errors (new ones prefixed by >>):

   net/openvswitch/actions.o: In function `do_execute_actions':
>> actions.c:(.text+0x19a7): undefined reference to `skb_push_nsh'
>> actions.c:(.text+0x19ee): undefined reference to `skb_pop_nsh'

---
0-DAY kernel test infrastructure                Open Source Technology Center
https://lists.01.org/pipermail/kbuild-all                   Intel Corporation

[-- Attachment #2: .config.gz --]
[-- Type: application/gzip, Size: 27829 bytes --]

^ permalink raw reply

* Re: [PATCH] ipv4: Namespaceify tcp_max_orphans knob
From: David Miller @ 2017-09-09  5:16 UTC (permalink / raw)
  To: yanhaishuang
  Cc: xiyou.wangcong, kuznet, yoshfuji, edumazet, netdev, linux-kernel
In-Reply-To: <E15E5C56-D712-4FEF-9AC5-AE28857D8D27@cmss.chinamobile.com>

From: 严海双 <yanhaishuang@cmss.chinamobile.com>
Date: Sat, 9 Sep 2017 13:09:57 +0800

> 
> 
>> On 2017年9月9日, at 下午12:35, Cong Wang <xiyou.wangcong@gmail.com> wrote:
>> 
>> On Fri, Sep 8, 2017 at 6:25 PM, 严海双 <yanhaishuang@cmss.chinamobile.com> wrote:
>>> 
>>> 
>>>> On 2017年9月9日, at 上午6:13, Cong Wang <xiyou.wangcong@gmail.com> wrote:
>>>> 
>>>> On Wed, Sep 6, 2017 at 8:10 PM, Haishuang Yan
>>>> <yanhaishuang@cmss.chinamobile.com> wrote:
>>>>> Different namespace application might require different maximal number
>>>>> of TCP sockets independently of the host.
>>>> 
>>>> So after your patch we could have N * net->ipv4.sysctl_tcp_max_orphans
>>>> in a whole system, right? This just makes OOM easier to trigger.
>>>> 
>>> 
>>> From my understanding, before the patch, we had N * net->ipv4.sysctl_tcp_max_orphans,
>>> and after the patch, we could have ns1.sysctl_tcp_max_orphans + ns2.sysctl_tcp_max_orphans
>>> + ns3.sysctl_tcp_max_orphans, is that right? Thanks for your reviewing.
>> 
>> Nope, by N I mean the number of containers. Before your patch, the limit
>> is global, after your patch it is per container.
>> 
> 
> Yeah, for example, if there is N containers, before the patch, I mean the limit is:
> 
> 	N * net->ipv4.sysctl_tcp_max_orphans
> 
> After the patch, the limit is:
> 
> 	ns1. net->ipv4.sysctl_tcp_max_orphans + ns2. net->ipv4.sysctl_tcp_max_orphans + …

Not true.

Please remove "N" from your equation of the current situation.

"sysctl_tcp_max_orphans" applies to entire system, it is a global limit,
comparing one limit against all orphans in the system, there is no N.

^ permalink raw reply

* Re: [PATCH] ipv4: Namespaceify tcp_max_orphans knob
From: 严海双 @ 2017-09-09  5:09 UTC (permalink / raw)
  To: Cong Wang
  Cc: David S. Miller, Alexey Kuznetsov, Hideaki YOSHIFUJI,
	Eric Dumazet, Linux Kernel Network Developers, LKML
In-Reply-To: <CAM_iQpVDM0HwZd6c+Loych=nQE__eGteeJQ=XTOfHKgVxMRfrA@mail.gmail.com>



> On 2017年9月9日, at 下午12:35, Cong Wang <xiyou.wangcong@gmail.com> wrote:
> 
> On Fri, Sep 8, 2017 at 6:25 PM, 严海双 <yanhaishuang@cmss.chinamobile.com> wrote:
>> 
>> 
>>> On 2017年9月9日, at 上午6:13, Cong Wang <xiyou.wangcong@gmail.com> wrote:
>>> 
>>> On Wed, Sep 6, 2017 at 8:10 PM, Haishuang Yan
>>> <yanhaishuang@cmss.chinamobile.com> wrote:
>>>> Different namespace application might require different maximal number
>>>> of TCP sockets independently of the host.
>>> 
>>> So after your patch we could have N * net->ipv4.sysctl_tcp_max_orphans
>>> in a whole system, right? This just makes OOM easier to trigger.
>>> 
>> 
>> From my understanding, before the patch, we had N * net->ipv4.sysctl_tcp_max_orphans,
>> and after the patch, we could have ns1.sysctl_tcp_max_orphans + ns2.sysctl_tcp_max_orphans
>> + ns3.sysctl_tcp_max_orphans, is that right? Thanks for your reviewing.
> 
> Nope, by N I mean the number of containers. Before your patch, the limit
> is global, after your patch it is per container.
> 

Yeah, for example, if there is N containers, before the patch, I mean the limit is:

	N * net->ipv4.sysctl_tcp_max_orphans

After the patch, the limit is:

	ns1. net->ipv4.sysctl_tcp_max_orphans + ns2. net->ipv4.sysctl_tcp_max_orphans + …

^ permalink raw reply

* Re: [PATCH net-next 1/1] sched: Use __qdisc_drop instead of kfree_skb in sch_prio and sch_qfq
From: David Miller @ 2017-09-07  4:20 UTC (permalink / raw)
  To: gfree.wind; +Cc: jhs, xiyou.wangcong, jiri, edumazet, netdev
In-Reply-To: <1504506072-46207-1-git-send-email-gfree.wind@vip.163.com>

From: gfree.wind@vip.163.com
Date: Mon,  4 Sep 2017 14:21:12 +0800

> From: Gao Feng <gfree.wind@vip.163.com>
> 
> The commit 520ac30f4551 ("net_sched: drop packets after root qdisc lock
> is released) made a big change of tc for performance. There are two points
> left in sch_prio and sch_qfq which are not changed with that commit. Now
> enhance them now with __qdisc_drop.
> 
> Signed-off-by: Gao Feng <gfree.wind@vip.163.com>

Thanks for catching these missed cases, applied.

^ permalink raw reply

* [GIT] Networking
From: David Miller @ 2017-09-09  5:06 UTC (permalink / raw)
  To: torvalds; +Cc: akpm, netdev, linux-kernel


The iwlwifi firmware compat fix is in here as well as some other
stuff:

1) Fix request socket leak introduced by BPF deadlock fix, from Eric
   Dumazet.

2) Fix VLAN handling with TXQs in mac80211, from Johannes Berg.

3) Missing __qdisc_drop conversions in prio and qfq schedulers, from
   Gao Feng.

4) Use after free in netlink nlk groups handling, from Xin Long.

5) Handle MTU update properly in ipv6 gre tunnels, from Xin Long.

6) Fix leak of ipv6 fib tables on netns teardown, from Sabrina Dubroca
   with follow-on fix from Eric Dumazet.

7) Need RCU and preemption disabled during generic XDP data patch, from
   John Fastabend.

Please pull, thanks a lot!

The following changes since commit 80cee03bf1d626db0278271b505d7f5febb37bba:

  Merge branch 'linus' of git://git.kernel.org/pub/scm/linux/kernel/git/herbert/crypto-2.6 (2017-09-06 15:17:17 -0700)

are available in the git repository at:

  git://git.kernel.org/pub/scm/linux/kernel/git/davem/net.git 

for you to fetch changes up to 9beb8bedb05c5f3a353dba62b8fa7cbbb9ec685e:

  bpf: make error reporting in bpf_warn_invalid_xdp_action more clear (2017-09-08 21:13:09 -0700)

----------------------------------------------------------------
Arnd Bergmann (1):
      isdn: isdnloop: fix logic error in isdnloop_sendbuf

Avraham Stern (1):
      mac80211: flush hw_roc_start work before cancelling the ROC

Baruch Siach (5):
      dt-binding: phy: don't confuse with Ethernet phy properties
      dt-bindings: net: don't confuse with generic PHY property
      dt-bindings: add SFF vendor prefix
      dt-binding: net: sfp binding documentation
      net: phy: sfp: rename dt properties to match the binding

Beni Lev (1):
      mac80211_hwsim: Use proper TX power

Chunho Lee (1):
      mac80211: Fix null pointer dereference with iTXQ support

Daniel Borkmann (2):
      bpf: don't select potentially stale ri->map from buggy xdp progs
      bpf: make error reporting in bpf_warn_invalid_xdp_action more clear

David S. Miller (4):
      Merge tag 'mac80211-for-davem-2017-09-07' of git://git.kernel.org/.../jberg/mac80211
      Merge tag 'wireless-drivers-for-davem-2017-09-08' of git://git.kernel.org/.../kvalo/wireless-drivers
      Merge git://git.kernel.org/.../pablo/nf
      Merge branch 'xdp-bpf-fixes'

Emmanuel Grumbach (1):
      cfg80211: honor NL80211_RRF_NO_HT40{MINUS,PLUS}

Eric Dumazet (2):
      tcp: fix a request socket leak
      ipv6: fix typo in fib6_net_exit()

Florian Fainelli (1):
      Revert "mdio_bus: Remove unneeded gpiod NULL check"

Florian Westphal (5):
      netfilter: nf_nat: don't bug when mapping already exists
      netfilter: xtables: add scheduling opportunity in get_counters
      netfilter: nat: Revert "netfilter: nat: convert nat bysrc hash to rhashtable"
      netfilter: nat: use keyed locks
      netfilter: core: remove erroneous warn_on

Gao Feng (1):
      sched: Use __qdisc_drop instead of kfree_skb in sch_prio and sch_qfq

Haishuang Yan (2):
      ip_tunnel: fix setting ttl and tos value in collect_md mode
      ip6_tunnel: fix setting hop_limit value for ipv6 tunnel

Håkon Bugge (1):
      rds: Fix incorrect statistics counting

Ian W MORRISON (1):
      brcmfmac: feature check for multi-scheduled scan fails on bcm4345 devices

Igor Mitsyanko (1):
      nl80211: look for HT/VHT capabilities in beacon's tail

Ilan peer (1):
      mac80211: Complete ampdu work schedule during session tear down

Ivan Khoronzhuk (1):
      net: ethernet: ti: netcp_core: no need in netif_napi_del

Jiri Pirko (1):
      net: sched: fix memleak for chain zero

Johannes Berg (3):
      mac80211: fix VLAN handling with TXQs
      mac80211: agg-tx: call drv_wake_tx_queue in proper context
      mac80211: fix deadlock in driver-managed RX BA session start

John Fastabend (3):
      net: rcu lock and preempt disable missing around generic xdp
      bpf: add support for sockmap detach programs
      bpf: devmap, use cond_resched instead of cpu_relax

Kees Cook (1):
      net: tulip: Constify tulip_tbl

Kleber Sacilotto de Souza (1):
      tipc: remove unnecessary call to dev_net()

Larry Finger (2):
      rtlwifi: btcoexist: Fix breakage of ant_sel for rtl8723be
      rtlwifi: btcoexist: Fix antenna selection code

Liad Kaufman (1):
      mac80211: add MESH IE in the correct order

Luca Coelho (1):
      iwlwifi: mvm: only send LEDS_CMD when the FW supports it

Marcelo Ricardo Leitner (1):
      sctp: fix missing wake ups in some situations

Mathieu Malaterre (1):
      davicom: Display proper debug level up to 6

Paolo Abeni (1):
      udp: drop head states only when all skb references are gone

Sabrina Dubroca (1):
      ipv6: fix memory leak with multiple tables during netns destruction

Sharon Dvir (1):
      mac80211: shorten debug prints using ht_dbg() to avoid warning

Simon Dinkin (1):
      mac80211: fix incorrect assignment of reassoc value

Vishwanath Pai (1):
      netfilter: xt_hashlimit: fix build error caused by 64bit division

Xin Long (5):
      netlink: fix an use-after-free issue for nlk groups
      netlink: access nlk groups safely in netlink bind and getname
      ip6_gre: update mtu properly in ip6gre_err
      netfilter: ipvs: fix the issue that sctp_conn_schedule drops non-INIT packet
      netfilter: ipvs: do not create conn for ABORT packet in sctp_conn_schedule

Zhizhou Tian (1):
      netfilter: xt_hashlimit: alloc hashtable with right size

 Documentation/devicetree/bindings/net/ethernet.txt               |   4 +++
 Documentation/devicetree/bindings/net/sff,sfp.txt                |  76 ++++++++++++++++++++++++++++++++++++++++++++++
 Documentation/devicetree/bindings/phy/phy-bindings.txt           |   4 ++-
 Documentation/devicetree/bindings/vendor-prefixes.txt            |   1 +
 drivers/isdn/isdnloop/isdnloop.c                                 |   2 +-
 drivers/net/ethernet/davicom/dm9000.c                            |   2 +-
 drivers/net/ethernet/dec/tulip/tulip.h                           |   2 +-
 drivers/net/ethernet/dec/tulip/tulip_core.c                      |   2 +-
 drivers/net/ethernet/ti/netcp_core.c                             |   1 -
 drivers/net/phy/mdio_bus.c                                       |   6 ++--
 drivers/net/phy/sfp.c                                            |   4 +--
 drivers/net/wireless/broadcom/brcm80211/brcmfmac/feature.c       |   3 +-
 drivers/net/wireless/intel/iwlwifi/fw/file.h                     |   1 +
 drivers/net/wireless/intel/iwlwifi/mvm/led.c                     |   3 +-
 drivers/net/wireless/mac80211_hwsim.c                            |   2 --
 drivers/net/wireless/realtek/rtlwifi/btcoexist/halbtc8723b2ant.c |   5 +++-
 drivers/net/wireless/realtek/rtlwifi/btcoexist/halbtcoutsrc.c    |  23 +++++++++-----
 include/linux/bpf.h                                              |   8 ++---
 include/linux/skbuff.h                                           |   2 +-
 include/net/mac80211.h                                           |  15 ++--------
 include/net/netfilter/nf_conntrack.h                             |   3 +-
 include/net/netfilter/nf_nat.h                                   |   1 -
 include/uapi/linux/bpf.h                                         |   4 +--
 kernel/bpf/devmap.c                                              |   2 +-
 kernel/bpf/sockmap.c                                             |   2 +-
 kernel/bpf/syscall.c                                             |  27 ++++++++++-------
 kernel/bpf/verifier.c                                            |  16 ++++++++++
 net/core/dev.c                                                   |  25 ++++++++++------
 net/core/filter.c                                                |  27 +++++++++++++++--
 net/core/skbuff.c                                                |   9 ++----
 net/ipv4/ip_tunnel.c                                             |   4 +--
 net/ipv4/netfilter/arp_tables.c                                  |   1 +
 net/ipv4/netfilter/ip_tables.c                                   |   1 +
 net/ipv4/tcp_ipv4.c                                              |   6 ++--
 net/ipv4/udp.c                                                   |   5 +++-
 net/ipv6/ip6_fib.c                                               |  25 ++++++++++++----
 net/ipv6/ip6_gre.c                                               |   4 ++-
 net/ipv6/ip6_tunnel.c                                            |   1 +
 net/ipv6/netfilter/ip6_tables.c                                  |   1 +
 net/ipv6/tcp_ipv6.c                                              |   6 ++--
 net/mac80211/agg-rx.c                                            |  32 +++++++++++++-------
 net/mac80211/agg-tx.c                                            |   8 +++--
 net/mac80211/ht.c                                                |  24 +++++++++++++--
 net/mac80211/ieee80211_i.h                                       |   4 +++
 net/mac80211/iface.c                                             |  20 +++++++++++--
 net/mac80211/mlme.c                                              |   2 +-
 net/mac80211/offchannel.c                                        |   2 ++
 net/mac80211/tx.c                                                |  36 +++++++++++++++++-----
 net/mac80211/util.c                                              |   2 +-
 net/netfilter/core.c                                             |   2 +-
 net/netfilter/ipvs/ip_vs_proto_sctp.c                            |   8 +++--
 net/netfilter/nf_nat_core.c                                      | 146 +++++++++++++++++++++++++++++++++++++++++------------------------------------------------
 net/netfilter/xt_hashlimit.c                                     |  16 +++++-----
 net/netlink/af_netlink.c                                         |  22 +++++++++-----
 net/rds/send.c                                                   |  10 +++++--
 net/sched/cls_api.c                                              |  18 +++++------
 net/sched/sch_prio.c                                             |   2 +-
 net/sched/sch_qfq.c                                              |   2 +-
 net/sctp/ulpqueue.c                                              |   3 +-
 net/tipc/bearer.c                                                |   2 +-
 net/wireless/nl80211.c                                           |   4 +--
 net/wireless/reg.c                                               |  20 +++++++++++--
 tools/testing/selftests/bpf/test_maps.c                          |  51 ++++++++++++++++++++++++++++++-
 63 files changed, 537 insertions(+), 235 deletions(-)
 create mode 100644 Documentation/devicetree/bindings/net/sff,sfp.txt

^ permalink raw reply

* Re: [PATCH] ipv4: Namespaceify tcp_max_orphans knob
From: Cong Wang @ 2017-09-09  4:35 UTC (permalink / raw)
  To: 严海双
  Cc: David S. Miller, Alexey Kuznetsov, Hideaki YOSHIFUJI,
	Eric Dumazet, Linux Kernel Network Developers, LKML
In-Reply-To: <798CA25A-CA09-4D06-A9B6-7C5791A6EEC1@cmss.chinamobile.com>

On Fri, Sep 8, 2017 at 6:25 PM, 严海双 <yanhaishuang@cmss.chinamobile.com> wrote:
>
>
>> On 2017年9月9日, at 上午6:13, Cong Wang <xiyou.wangcong@gmail.com> wrote:
>>
>> On Wed, Sep 6, 2017 at 8:10 PM, Haishuang Yan
>> <yanhaishuang@cmss.chinamobile.com> wrote:
>>> Different namespace application might require different maximal number
>>> of TCP sockets independently of the host.
>>
>> So after your patch we could have N * net->ipv4.sysctl_tcp_max_orphans
>> in a whole system, right? This just makes OOM easier to trigger.
>>
>
> From my understanding, before the patch, we had N * net->ipv4.sysctl_tcp_max_orphans,
> and after the patch, we could have ns1.sysctl_tcp_max_orphans + ns2.sysctl_tcp_max_orphans
> + ns3.sysctl_tcp_max_orphans, is that right? Thanks for your reviewing.

Nope, by N I mean the number of containers. Before your patch, the limit
is global, after your patch it is per container.

^ permalink raw reply

* Re: [PATCH net] bpf: make error reporting in bpf_warn_invalid_xdp_action more clear
From: David Miller @ 2017-09-09  4:13 UTC (permalink / raw)
  To: daniel; +Cc: ast, john.fastabend, netdev
In-Reply-To: <a89dbb43f7196f6ba8c5fd1f07c7e4bcc97726c3.1504913751.git.daniel@iogearbox.net>

From: Daniel Borkmann <daniel@iogearbox.net>
Date: Sat,  9 Sep 2017 01:40:35 +0200

> Differ between illegal XDP action code and just driver
> unsupported one to provide better feedback when we throw
> a one-time warning here. Reason is that with 814abfabef3c
> ("xdp: add bpf_redirect helper function") not all drivers
> support the new XDP return code yet and thus they will
> fall into their 'default' case when checking for return
> codes after program return, which then triggers a
> bpf_warn_invalid_xdp_action() stating that the return
> code is illegal, but from XDP perspective it's not.
> 
> I decided not to place something like a XDP_ACT_MAX define
> into uapi i) given we don't have this either for all other
> program types, ii) future action codes could have further
> encoding there, which would render such define unsuitable
> and we wouldn't be able to rip it out again, and iii) we
> rarely add new action codes.
> 
> Signed-off-by: Daniel Borkmann <daniel@iogearbox.net>
> Acked-by: Alexei Starovoitov <ast@kernel.org>

Applied.

^ permalink raw reply

* Re: [PATCH net] Revert "mdio_bus: Remove unneeded gpiod NULL check"
From: David Miller @ 2017-09-09  4:13 UTC (permalink / raw)
  To: f.fainelli
  Cc: netdev, linus.walleij, andrew, festevam, sergei.shtylyov,
	fabio.estevam, Bryan.Whitehead
In-Reply-To: <20170908223807.6015-1-f.fainelli@gmail.com>

From: Florian Fainelli <f.fainelli@gmail.com>
Date: Fri,  8 Sep 2017 15:38:07 -0700

> This reverts commit 95b80bf3db03c2bf572a357cf74b9a6aefef0a4a ("mdio_bus:
> Remove unneeded gpiod NULL check"), this commit assumed that GPIOLIB
> checks for NULL descriptors, so it's safe to drop them, but it is not
> when CONFIG_GPIOLIB is disabled in the kernel. If we do call
> gpiod_set_value_cansleep() on a GPIO descriptor we will issue warnings
> coming from the inline stubs declared in include/linux/gpio/consumer.h.
> 
> Fixes: 95b80bf3db03 ("mdio_bus: Remove unneeded gpiod NULL check")
> Reported-by: Woojung Huh <Woojung.Huh@microchip.com>
> Signed-off-by: Florian Fainelli <f.fainelli@gmail.com>

Applied.

^ permalink raw reply

* Re: [net PATCH 0/3] Fixes for XDP/BPF
From: David Miller @ 2017-09-09  4:11 UTC (permalink / raw)
  To: john.fastabend; +Cc: netdev, daniel, ast
In-Reply-To: <150490397545.11590.1409723973253492363.stgit@john-XPS-13-9360>

From: John Fastabend <john.fastabend@gmail.com>
Date: Fri, 08 Sep 2017 14:00:05 -0700

> The following fixes, UAPI updates, and small improvement,
> 
> i. XDP needs to be called inside RCU with preempt disabled.
> 
> ii. Not strictly a bug fix but we have an attach command in the
> sockmap UAPI already to avoid having a single kernel released with
> only the attach and not the detach I'm pushing this into net branch.
> Its early in the RC cycle so I think this is OK (not ideal but better
> than supporting a UAPI with a missing detach forever).
> 
> iii. Final patch replace cpu_relax with cond_resched in devmap.

Series applied, thanks John.

^ permalink raw reply

* Re: [PATCH net] phy: mvebu-cp110: checking for NULL instead of IS_ERR()
From: David Miller @ 2017-09-09  4:09 UTC (permalink / raw)
  To: dan.carpenter
  Cc: kishon, antoine.tenart, netdev, kernel-janitors, linux-kernel
In-Reply-To: <20170908103137.zck6bw66sge4fhua@mwanda>

From: Dan Carpenter <dan.carpenter@oracle.com>
Date: Fri, 8 Sep 2017 13:31:37 +0300

> devm_ioremap_resource() never returns NULL, it only returns error
> pointers so this test needs to be changed.
> 
> Fixes: d0438bd6aa09 ("phy: add the mvebu cp110 comphy driver")
> Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
> ---
> This driver apparently is going through the net tree, but netdev isn't
> listed as handling it in MAINTAINERS.  Kishon, do you know what's up
> with that?

Yeah let's sort this out before I apply this fix to my tree.

^ permalink raw reply

* Re: [V2 PATCH net-next 0/2] Fixes for XDP_REDIRECT map
From: David Miller @ 2017-09-09  3:54 UTC (permalink / raw)
  To: brouer; +Cc: netdev, borkmann, john.fastabend, andy
In-Reply-To: <150478756604.28665.6915020425359475729.stgit@firesoul>

From: Jesper Dangaard Brouer <brouer@redhat.com>
Date: Thu, 07 Sep 2017 14:33:08 +0200

> This my V2 of catching XDP_REDIRECT and bpf_redirect_map() API usage
> that can potentially crash the kernel.  Addressed Daniels feedback in
> patch01, and added patch02 which catch and cleanup dangling map
> pointers.
> 
> I know John and Daniel are working on a more long-term solution, of
> recording the bpf_prog pointer together with the map pointer.  I just
> wanted to propose these fixes as a stop-gap to the potential crashes.

Jesper if these are still relevant, please resubmit against the 'net'
tree, thanks!

^ permalink raw reply

* Re: [PATCH] net: tulip: Constify tulip_tbl
From: David Miller @ 2017-09-09  3:54 UTC (permalink / raw)
  To: keescook; +Cc: netdev, jarod, gustavo, linux-parisc, linux-kernel
In-Reply-To: <20170907193514.GA114400@beast>

From: Kees Cook <keescook@chromium.org>
Date: Thu, 7 Sep 2017 12:35:14 -0700

> It looks like all users of tulip_tbl are reads, so mark this table
> as read-only.
> 
> $ git grep tulip_tbl  # edited to avoid line-wraps...
> interrupt.c: iowrite32(tulip_tbl[tp->chip_id].valid_intrs, ...
> interrupt.c: iowrite32(tulip_tbl[tp->chip_id].valid_intrs&~RxPollInt, ...
> interrupt.c: iowrite32(tulip_tbl[tp->chip_id].valid_intrs, ...
> interrupt.c: iowrite32(tulip_tbl[tp->chip_id].valid_intrs | TimerInt,
> pnic.c:      iowrite32(tulip_tbl[tp->chip_id].valid_intrs, ioaddr + CSR7);
> tulip.h:     extern struct tulip_chip_table tulip_tbl[];
> tulip_core.c:struct tulip_chip_table tulip_tbl[] = {
> tulip_core.c:iowrite32(tulip_tbl[tp->chip_id].valid_intrs, ioaddr + CSR5);
> tulip_core.c:iowrite32(tulip_tbl[tp->chip_id].valid_intrs, ioaddr + CSR7);
> tulip_core.c:setup_timer(&tp->timer, tulip_tbl[tp->chip_id].media_timer,
> tulip_core.c:const char *chip_name = tulip_tbl[chip_idx].chip_name;
> tulip_core.c:if (pci_resource_len (pdev, 0) < tulip_tbl[chip_idx].io_size)
> tulip_core.c:ioaddr =  pci_iomap(..., tulip_tbl[chip_idx].io_size);
> tulip_core.c:tp->flags = tulip_tbl[chip_idx].flags;
> tulip_core.c:setup_timer(&tp->timer, tulip_tbl[tp->chip_id].media_timer,
> tulip_core.c:INIT_WORK(&tp->media_work, tulip_tbl[tp->chip_id].media_task);
> 
> Cc: "David S. Miller" <davem@davemloft.net>
> Cc: Jarod Wilson <jarod@redhat.com>
> Cc: "Gustavo A. R. Silva" <gustavo@embeddedor.com>
> Cc: netdev@vger.kernel.org
> Cc: linux-parisc@vger.kernel.org
> Signed-off-by: Kees Cook <keescook@chromium.org>

Applied.

^ permalink raw reply

* Re: [PATCH] net: ethernet: ti: netcp_core: no need in netif_napi_del
From: David Miller @ 2017-09-09  3:54 UTC (permalink / raw)
  To: ivan.khoronzhuk
  Cc: w-kwok2, m-karicheri2, netdev, linux-kernel, grygorii.strashko
In-Reply-To: <1504798350-790-1-git-send-email-ivan.khoronzhuk@linaro.org>

From: Ivan Khoronzhuk <ivan.khoronzhuk@linaro.org>
Date: Thu,  7 Sep 2017 18:32:30 +0300

> Don't remove rx_napi specifically just before free_netdev(),
> it's supposed to be done in it and is confusing w/o tx_napi deletion.
> 
> Signed-off-by: Ivan Khoronzhuk <ivan.khoronzhuk@linaro.org>

Applied.

^ permalink raw reply

* Re: [PATCH] drivers: net: Display proper debug level up to 6
From: David Miller @ 2017-09-09  3:53 UTC (permalink / raw)
  To: malat; +Cc: tremyfr, johannes.berg, jarod, netdev, linux-kernel
In-Reply-To: <20170907112422.26570-1-malat@debian.org>

From: Mathieu Malaterre <malat@debian.org>
Date: Thu,  7 Sep 2017 13:24:20 +0200

> This will make it explicit some messages are of the form:
> dm9000_dbg(db, 5, ...
> 
> Signed-off-by: Mathieu Malaterre <malat@debian.org>

Applied.

^ permalink raw reply

* Re: [PATCH net v4 3/3] net: phy: sfp: rename dt properties to match the binding
From: David Miller @ 2017-09-09  3:51 UTC (permalink / raw)
  To: baruch
  Cc: robh+dt, mark.rutland, andrew, f.fainelli, rmk+kernel, netdev,
	devicetree, sergei.shtylyov, antoine.tenart
In-Reply-To: <720bdc3383214231cd6e25d2e1980262c68863ac.1504776350.git.baruch@tkos.co.il>

From: Baruch Siach <baruch@tkos.co.il>
Date: Thu,  7 Sep 2017 12:25:50 +0300

> Make the Rx rate select control gpio property name match the documented
> binding. This would make the addition of 'rate-select1-gpios' for SFP+
> support more natural.
> 
> Also, make the MOD-DEF0 gpio property name match the documentation.
> 
> Signed-off-by: Baruch Siach <baruch@tkos.co.il>

Applied.

^ permalink raw reply

* Re: [PATCH net v4 2/3] dt-binding: net: sfp binding documentation
From: David Miller @ 2017-09-09  3:51 UTC (permalink / raw)
  To: baruch
  Cc: robh+dt, mark.rutland, andrew, f.fainelli, rmk+kernel, netdev,
	devicetree, sergei.shtylyov, antoine.tenart
In-Reply-To: <5b46343b543ad1d2ebbc5be9871def7f92c4dbd8.1504776350.git.baruch@tkos.co.il>

From: Baruch Siach <baruch@tkos.co.il>
Date: Thu,  7 Sep 2017 12:25:49 +0300

> Add device-tree binding documentation SFP transceivers. Support for SFP
> transceivers has been recently introduced (drivers/net/phy/sfp.c).
> 
> Signed-off-by: Baruch Siach <baruch@tkos.co.il>

Applied.

^ permalink raw reply

* Re: [PATCH net v4 1/3] dt-bindings: add SFF vendor prefix
From: David Miller @ 2017-09-09  3:51 UTC (permalink / raw)
  To: baruch-NswTu9S1W3P6gbPvEgmw2w
  Cc: robh+dt-DgEjT+Ai2ygdnm+yROfE0A, mark.rutland-5wv7dgnIgG8,
	andrew-g2DYL2Zd6BY, f.fainelli-Re5JQEeQqe8AvxtiuMwx3w,
	rmk+kernel-lFZ/pmaqli7XmaaqVzeoHQ, netdev-u79uwXL29TY76Z2rM5mHXA,
	devicetree-u79uwXL29TY76Z2rM5mHXA,
	sergei.shtylyov-M4DtvfQ/ZS1MRgGoP+s0PdBPR1lH4CV8,
	antoine.tenart-wi1+55ScJUtKEb57/3fJTNBPR1lH4CV8
In-Reply-To: <b98ac3e8cde5c99489e8dcee9a1d5b8a19face8d.1504776350.git.baruch-NswTu9S1W3P6gbPvEgmw2w@public.gmane.org>

From: Baruch Siach <baruch-NswTu9S1W3P6gbPvEgmw2w@public.gmane.org>
Date: Thu,  7 Sep 2017 12:25:48 +0300

> Acked-by: Rob Herring <robh-DgEjT+Ai2ygdnm+yROfE0A@public.gmane.org>
> Signed-off-by: Baruch Siach <baruch-NswTu9S1W3P6gbPvEgmw2w@public.gmane.org>

Applied.
--
To unsubscribe from this list: send the line "unsubscribe devicetree" 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] dt-bindings: net: don't confuse with generic PHY property
From: David Miller @ 2017-09-09  3:50 UTC (permalink / raw)
  To: baruch; +Cc: robh+dt, mark.rutland, netdev, devicetree
In-Reply-To: <2e201cc1cff4fad372f589c83c4c438b3dccbadf.1504771799.git.baruch@tkos.co.il>

From: Baruch Siach <baruch@tkos.co.il>
Date: Thu,  7 Sep 2017 11:09:59 +0300

> This complements commit 9a94b3a4bd (dt-binding: phy: don't confuse with
> Ethernet phy properties).
> 
> The generic PHY 'phys' property sometime appears in the same node with
> the Ethernet PHY 'phy' or 'phy-handle' properties. Add a warning in
> ethernet.txt to reduce confusion.
> 
> Signed-off-by: Baruch Siach <baruch@tkos.co.il>

Applied.

^ permalink raw reply

* Re: [PATCH 2/2] ip6_tunnel: fix setting hop_limit value for ipv6 tunnel
From: David Miller @ 2017-09-09  3:48 UTC (permalink / raw)
  To: yanhaishuang; +Cc: kuznet, yoshfuji, netdev, linux-kernel
In-Reply-To: <1504764515-13536-2-git-send-email-yanhaishuang@cmss.chinamobile.com>

From: Haishuang Yan <yanhaishuang@cmss.chinamobile.com>
Date: Thu,  7 Sep 2017 14:08:35 +0800

> Similar to vxlan/geneve tunnel, if hop_limit is zero, it should fall
> back to ip6_dst_hoplimt().
> 
> Signed-off-by: Haishuang Yan <yanhaishuang@cmss.chinamobile.com>

Applied.

^ permalink raw reply

* Re: [PATCH 1/2] ip_tunnel: fix setting ttl and tos value in collect_md mode
From: David Miller @ 2017-09-09  3:47 UTC (permalink / raw)
  To: yanhaishuang; +Cc: kuznet, yoshfuji, netdev, linux-kernel, ast
In-Reply-To: <1504764515-13536-1-git-send-email-yanhaishuang@cmss.chinamobile.com>

From: Haishuang Yan <yanhaishuang@cmss.chinamobile.com>
Date: Thu,  7 Sep 2017 14:08:34 +0800

> ttl and tos variables are declared and assigned, but are not used in
> iptunnel_xmit() function.
> 
> Fixes: cfc7381b3002 ("ip_tunnel: add collect_md mode to IPIP tunnel")
> Cc: Alexei Starovoitov <ast@fb.com>
> Signed-off-by: Haishuang Yan <yanhaishuang@cmss.chinamobile.com>

Applied.

^ permalink raw reply

* Re: [PATCH net-next 3/3] net: phy: realtek: add RTL8201F phy-id and functions
From: Jassi Brar @ 2017-09-09  3:33 UTC (permalink / raw)
  To: Florian Fainelli
  Cc: Kunihiko Hayashi, netdev-u79uwXL29TY76Z2rM5mHXA, David S. Miller,
	Andrew Lunn, Rob Herring, Mark Rutland,
	linux-arm-kernel-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r@public.gmane.org,
	lkml, Devicetree List, Masahiro Yamada, Masami Hiramatsu,
	Jongsung Kim
In-Reply-To: <4173a876-3cff-205a-ce87-ce049f419aa0-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>

On 9 September 2017 at 00:21, Florian Fainelli <f.fainelli-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote:
> On 09/08/2017 06:02 AM, Kunihiko Hayashi wrote:
>> From: Jassi Brar <jaswinder.singh-QSEj5FYQhm4dnm+yROfE0A@public.gmane.org>
>>
>> Add RTL8201F phy-id and the related functions to the driver.
>>
>> The original patch is as follows:
>> https://patchwork.kernel.org/patch/2538341/
>>
>> Signed-off-by: Jongsung Kim <neidhard.kim-Hm3cg6mZ9cc@public.gmane.org>
>> Signed-off-by: Jassi Brar <jaswinder.singh-QSEj5FYQhm4dnm+yROfE0A@public.gmane.org>
>> Signed-off-by: Kunihiko Hayashi <hayashi.kunihiko-uWyLwvC0a2jby3iVrkZq2A@public.gmane.org>
>> ---
>>  drivers/net/phy/realtek.c | 45 +++++++++++++++++++++++++++++++++++++++++++++
>>  1 file changed, 45 insertions(+)
>>
>> diff --git a/drivers/net/phy/realtek.c b/drivers/net/phy/realtek.c
>> index 9cbe645..d9974ce 100644
>> --- a/drivers/net/phy/realtek.c
>> +++ b/drivers/net/phy/realtek.c
>> @@ -29,10 +29,23 @@
>>  #define RTL8211F_PAGE_SELECT 0x1f
>>  #define RTL8211F_TX_DELAY    0x100
>>
>> +#define RTL8201F_ISR         0x1e
>> +#define RTL8201F_PAGE_SELECT 0x1f
>
> We have a page select register define for the RTL8211F right above, so
> surely we can make that a common definition?
>
That is just for the sake of consistency.
I mean RTL8211 wouldn't look neat among everything else RTL8201.

Also the page-select offsets just _happen_ to be same value...
RTL8211E_INER_LINK_STATUS and RTL8211F_INER_LINK_STATUS are very
different.

>> +#define RTL8201F_IER         0x13
>> +
>>  MODULE_DESCRIPTION("Realtek PHY driver");
>>  MODULE_AUTHOR("Johnson Leung");
>>  MODULE_LICENSE("GPL");
>>
>> +static int rtl8201_ack_interrupt(struct phy_device *phydev)
>> +{
>> +     int err;
>> +
>> +     err = phy_read(phydev, RTL8201F_ISR);
>> +
>> +     return (err < 0) ? err : 0;
>> +}
>> +
>>  static int rtl821x_ack_interrupt(struct phy_device *phydev)
>>  {
>>       int err;
>> @@ -54,6 +67,25 @@ static int rtl8211f_ack_interrupt(struct phy_device *phydev)
>>       return (err < 0) ? err : 0;
>>  }
>>
>> +static int rtl8201_config_intr(struct phy_device *phydev)
>> +{
>> +     int err;
>> +
>> +     /* switch to page 7 */
>> +     phy_write(phydev, RTL8201F_PAGE_SELECT, 0x7);
>> +
>> +     if (phydev->interrupts == PHY_INTERRUPT_ENABLED)
>> +             err = phy_write(phydev, RTL8201F_IER,
>> +                             BIT(13) | BIT(12) | BIT(11));
>
> Can you detail what bits 11, 12 and 13 do? Do they correspond to link,
> duplex and pause changes by any chance?
>
Sorry no idea. The datasheet would say, and other functions too use
such magic values.

>> +     else
>> +             err = phy_write(phydev, RTL8201F_IER, 0);
>> +
>> +     /* restore to default page 0 */
>> +     phy_write(phydev, RTL8201F_PAGE_SELECT, 0x0);
>> +
>> +     return err;
>> +}
>> +
>
> Other than that, LGTM:
>
> Reviewed-by: Florian Fainelli <f.fainelli-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
>
Thank you.
--
To unsubscribe from this list: send the line "unsubscribe devicetree" 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


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