Netdev List
 help / color / mirror / Atom feed
* [GIT] Networking
From: David Miller @ 2013-09-11 21:25 UTC (permalink / raw)
  To: torvalds; +Cc: akpm, netdev, linux-kernel


1) Brown paper bag fix in HTB scheduler, class options set incorrectly due
   to a typoe.  Fix from Vimalkumar.

2) It's possible for the ipv6 FIB garbage collector to run before all
   the necessary datastructure are setup during init, defer the notifier
   registry to avoid this problem.  Fix from Michal Kubecek.

3) New i40e ethernet driver from the Intel folks.

4) Add new qmi wwan device IDs, from Bjørn Mork.

5) Doorbell lock in bnx2x driver is not initialized properly in some
   configurations, fix from Ariel Elior.

6) Revert an ipv6 packet option padding change that broke standardized
   ipv6 implementation test suites.  From Jiri Pirko.

7) Fix synchronization of ARP information in bonding layer, from Nikolay
   Aleksandrov.

8) Fix missing error return resulting in illegal memory accesses in
   openvswitch, from Daniel Borkmann.

9) SCTP doesn't signal poll events properly due to mistaken operator
   precedence, fix also from Daniel Borkmann.

10) __netdev_pick_tx() passes wrong index to sk_tx_queue_set() which
    essentially disables caching of TX queue in sockets :-/ Fix from
    Eric Dumazet.

Please pull, thanks a lot!

The following changes since commit 300893b08f3bc7057a7a5f84074090ba66c8b5ca:

  Merge tag 'xfs-for-linus-v3.12-rc1' of git://oss.sgi.com/xfs/xfs (2013-09-09 11:19:09 -0700)

are available in the git repository at:


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

for you to fetch changes up to f3ad857e3da1abaea780dc892b592cd86c541c52:

  net_sched: htb: fix a typo in htb_change_class() (2013-09-11 17:16:22 -0400)

----------------------------------------------------------------
Ariel Elior (1):
      bnx2x: Fix configuration of doorbell block

Bjørn Mork (1):
      net: qmi_wwan: add new Qualcomm devices

Chris Metcalf (1):
      net: tilegx driver: avoid compiler warning

Daniel Borkmann (4):
      net: ovs: flow: fix potential illegal memory access in __parse_flow_nlattrs
      net: fib: fib6_add: fix potential NULL pointer dereference
      net: sctp: fix bug in sctp_poll for SOCK_SELECT_ERR_QUEUE
      net: sctp: fix smatch warning in sctp_send_asconf_del_ip

David S. Miller (2):
      Merge branch 'bonding_arp'
      Merge branch 'master' of git://git.kernel.org/.../jkirsher/net

Eric Dumazet (1):
      net: fix multiqueue selection

Herbert Xu (1):
      macvlan: Move skb_clone check closer to call

Jesse Brandeburg (8):
      i40e: main driver core
      i40e: transmit, receive, and NAPI
      i40e: driver ethtool core
      i40e: driver core headers
      i40e: implement virtual device interface
      i40e: init code and hardware support
      i40e: debugfs interface
      i40e: include i40e in kernel proper

Jingoo Han (2):
      irda: donauboe: Remove casting the return value which is a void pointer
      irda: vlsi_ir: Remove casting the return value which is a void pointer

Jiri Pirko (1):
      ipv6/exthdrs: accept tlv which includes only padding

Jitendra Kalsaria (1):
      qlcnic: Fix warning reported by kbuild test robot.

Michael Opdenacker (2):
      net: korina: remove deprecated IRQF_DISABLED
      bcm63xx_enet: remove deprecated IRQF_DISABLED

Michal Kubeček (1):
      ipv6: don't call fib6_run_gc() until routing is ready

Michal Schmidt (1):
      bnx2x: avoid atomic allocations during initialization

Stefan Tomanek (1):
      fib6_rules: fix indentation

Vimalkumar (1):
      net_sched: htb: fix a typo in htb_change_class()

nikolay@redhat.com (2):
      bonding: fix store_arp_validate race with mode change
      bonding: fix bond_arp_rcv setting and arp validate desync state

 Documentation/networking/00-INDEX                  |    2 +
 Documentation/networking/i40e.txt                  |  115 ++
 MAINTAINERS                                        |    3 +-
 drivers/net/bonding/bond_main.c                    |    4 +-
 drivers/net/bonding/bond_sysfs.c                   |   31 +-
 drivers/net/bonding/bonding.h                      |    1 +
 drivers/net/ethernet/broadcom/bcm63xx_enet.c       |    8 +-
 drivers/net/ethernet/broadcom/bnx2x/bnx2x_cmn.c    |   38 +-
 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c   |    1 +
 drivers/net/ethernet/broadcom/bnx2x/bnx2x_sriov.c  |    3 -
 drivers/net/ethernet/intel/Kconfig                 |   18 +
 drivers/net/ethernet/intel/Makefile                |    1 +
 drivers/net/ethernet/intel/i40e/Makefile           |   44 +
 drivers/net/ethernet/intel/i40e/i40e.h             |  558 ++++++
 drivers/net/ethernet/intel/i40e/i40e_adminq.c      |  983 ++++++++++
 drivers/net/ethernet/intel/i40e/i40e_adminq.h      |  112 ++
 drivers/net/ethernet/intel/i40e/i40e_adminq_cmd.h  | 2076 +++++++++++++++++++++
 drivers/net/ethernet/intel/i40e/i40e_alloc.h       |   59 +
 drivers/net/ethernet/intel/i40e/i40e_common.c      | 2041 ++++++++++++++++++++
 drivers/net/ethernet/intel/i40e/i40e_debugfs.c     | 2076 +++++++++++++++++++++
 drivers/net/ethernet/intel/i40e/i40e_diag.c        |  131 ++
 drivers/net/ethernet/intel/i40e/i40e_diag.h        |   52 +
 drivers/net/ethernet/intel/i40e/i40e_ethtool.c     | 1449 +++++++++++++++
 drivers/net/ethernet/intel/i40e/i40e_hmc.c         |  366 ++++
 drivers/net/ethernet/intel/i40e/i40e_hmc.h         |  245 +++
 drivers/net/ethernet/intel/i40e/i40e_lan_hmc.c     | 1006 ++++++++++
 drivers/net/ethernet/intel/i40e/i40e_lan_hmc.h     |  169 ++
 drivers/net/ethernet/intel/i40e/i40e_main.c        | 7375 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
 drivers/net/ethernet/intel/i40e/i40e_nvm.c         |  391 ++++
 drivers/net/ethernet/intel/i40e/i40e_osdep.h       |   82 +
 drivers/net/ethernet/intel/i40e/i40e_prototype.h   |  239 +++
 drivers/net/ethernet/intel/i40e/i40e_register.h    | 4688 ++++++++++++++++++++++++++++++++++++++++++++++
 drivers/net/ethernet/intel/i40e/i40e_status.h      |  101 +
 drivers/net/ethernet/intel/i40e/i40e_txrx.c        | 1817 ++++++++++++++++++
 drivers/net/ethernet/intel/i40e/i40e_txrx.h        |  259 +++
 drivers/net/ethernet/intel/i40e/i40e_type.h        | 1154 ++++++++++++
 drivers/net/ethernet/intel/i40e/i40e_virtchnl.h    |  368 ++++
 drivers/net/ethernet/intel/i40e/i40e_virtchnl_pf.c | 2335 +++++++++++++++++++++++
 drivers/net/ethernet/intel/i40e/i40e_virtchnl_pf.h |  120 ++
 drivers/net/ethernet/korina.c                      |    8 +-
 drivers/net/ethernet/qlogic/qlcnic/qlcnic.h        |    2 +-
 drivers/net/ethernet/tile/tilegx.c                 |    6 +-
 drivers/net/irda/donauboe.c                        |    6 +-
 drivers/net/irda/vlsi_ir.c                         |    2 +-
 drivers/net/macvlan.c                              |   10 +-
 drivers/net/usb/qmi_wwan.c                         |  130 +-
 include/net/ndisc.h                                |    2 +
 net/core/flow_dissector.c                          |    2 +-
 net/ipv6/af_inet6.c                                |    6 +
 net/ipv6/exthdrs.c                                 |    6 -
 net/ipv6/fib6_rules.c                              |    4 +-
 net/ipv6/ip6_fib.c                                 |    2 +-
 net/ipv6/ndisc.c                                   |   18 +-
 net/openvswitch/flow.c                             |    1 +
 net/sched/sch_htb.c                                |    2 +-
 net/sctp/socket.c                                  |    5 +-
 56 files changed, 30666 insertions(+), 67 deletions(-)
 create mode 100644 Documentation/networking/i40e.txt
 create mode 100644 drivers/net/ethernet/intel/i40e/Makefile
 create mode 100644 drivers/net/ethernet/intel/i40e/i40e.h
 create mode 100644 drivers/net/ethernet/intel/i40e/i40e_adminq.c
 create mode 100644 drivers/net/ethernet/intel/i40e/i40e_adminq.h
 create mode 100644 drivers/net/ethernet/intel/i40e/i40e_adminq_cmd.h
 create mode 100644 drivers/net/ethernet/intel/i40e/i40e_alloc.h
 create mode 100644 drivers/net/ethernet/intel/i40e/i40e_common.c
 create mode 100644 drivers/net/ethernet/intel/i40e/i40e_debugfs.c
 create mode 100644 drivers/net/ethernet/intel/i40e/i40e_diag.c
 create mode 100644 drivers/net/ethernet/intel/i40e/i40e_diag.h
 create mode 100644 drivers/net/ethernet/intel/i40e/i40e_ethtool.c
 create mode 100644 drivers/net/ethernet/intel/i40e/i40e_hmc.c
 create mode 100644 drivers/net/ethernet/intel/i40e/i40e_hmc.h
 create mode 100644 drivers/net/ethernet/intel/i40e/i40e_lan_hmc.c
 create mode 100644 drivers/net/ethernet/intel/i40e/i40e_lan_hmc.h
 create mode 100644 drivers/net/ethernet/intel/i40e/i40e_main.c
 create mode 100644 drivers/net/ethernet/intel/i40e/i40e_nvm.c
 create mode 100644 drivers/net/ethernet/intel/i40e/i40e_osdep.h
 create mode 100644 drivers/net/ethernet/intel/i40e/i40e_prototype.h
 create mode 100644 drivers/net/ethernet/intel/i40e/i40e_register.h
 create mode 100644 drivers/net/ethernet/intel/i40e/i40e_status.h
 create mode 100644 drivers/net/ethernet/intel/i40e/i40e_txrx.c
 create mode 100644 drivers/net/ethernet/intel/i40e/i40e_txrx.h
 create mode 100644 drivers/net/ethernet/intel/i40e/i40e_type.h
 create mode 100644 drivers/net/ethernet/intel/i40e/i40e_virtchnl.h
 create mode 100644 drivers/net/ethernet/intel/i40e/i40e_virtchnl_pf.c
 create mode 100644 drivers/net/ethernet/intel/i40e/i40e_virtchnl_pf.h

^ permalink raw reply

* Re: [PATCH] net_sched: htb: fix a typo in htb_change_class()
From: David Miller @ 2013-09-11 21:17 UTC (permalink / raw)
  To: jiri; +Cc: eric.dumazet, netdev, brouer, j.vimal, jpirko
In-Reply-To: <20130911055827.GB1404@minipsycho.orion>

From: Jiri Pirko <jiri@resnulli.us>
Date: Wed, 11 Sep 2013 07:58:27 +0200

> Wed, Sep 11, 2013 at 02:36:37AM CEST, eric.dumazet@gmail.com wrote:
>>From: Vimalkumar <j.vimal@gmail.com>
>>
>>Fix a typo added in commit 56b765b79 ("htb: improved accuracy at high
>>rates")
>>
>>cbuffer should not be a copy of buffer.
>>
>>Signed-off-by: Vimalkumar <j.vimal@gmail.com>
>>Signed-off-by: Eric Dumazet <edumazet@google.com>
>>Cc: Jesper Dangaard Brouer <brouer@redhat.com>
>>Cc: Jiri Pirko <jpirko@redhat.com>
> Reviewed-by: Jiri Pirko <jiri@resnulli.us>

Applied and queued up for -stable, thanks everyone.

^ permalink raw reply

* Re: [PATCH] net: qmi_wwan: add new Qualcomm devices
From: David Miller @ 2013-09-11 21:15 UTC (permalink / raw)
  To: bjorn; +Cc: netdev, linux-usb, scateu
In-Reply-To: <1378818380-5255-1-git-send-email-bjorn@mork.no>

From: Bjørn Mork <bjorn@mork.no>
Date: Tue, 10 Sep 2013 15:06:20 +0200

> Adding the device list from the Windows driver description files
> included with a new Qualcomm MDM9615 based device, "Alcatel-sbell
> ASB TL131 TDD LTE", from China Mobile.  This device is tested
> and verified to work.  The others are assumed to work based on
> using the same Windows driver.
> 
> Many of these devices support multiple QMI/wwan ports, requiring
> multiple interface matching entries.  All devices are composite,
> providing a mix of one or more serial, storage or Android Debug
> Brigde functions in addition to the wwan function.
> 
> This device list included an update of one previously known device,
> which was incorrectly assumed to have a Gobi 2K layout.  This is
> corrected.
> 
> Reported-by: 王康 <scateu@gmail.com>
> Signed-off-by: Bjørn Mork <bjorn@mork.no>

Applied, thank you.

^ permalink raw reply

* Re: [net v7 0/8][pull request] Intel Wired LAN Driver Updates
From: David Miller @ 2013-09-11 21:08 UTC (permalink / raw)
  To: jeffrey.t.kirsher
  Cc: netdev, gospo, sassmann, jesse.brandeburg, shannon.nelson,
	peter.p.waskiewicz.jr, e1000-devel
In-Reply-To: <1378893056-4821-1-git-send-email-jeffrey.t.kirsher@intel.com>

From: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
Date: Wed, 11 Sep 2013 02:50:48 -0700

>   git://git.kernel.org/pub/scm/linux/kernel/git/jkirsher/net master

Ok, I've pulled this.

Please send fixups based upon the trivial issues a few folks have
pointed out.

Thanks.

^ permalink raw reply

* Re: [PATCH net] ipv6: don't call fib6_run_gc() until routing is ready
From: David Miller @ 2013-09-11 21:05 UTC (permalink / raw)
  To: mkubecek; +Cc: netdev, kuznet, jmorris, yoshfuji, kaber
In-Reply-To: <20130909194504.1C691E5E72@unicorn.suse.cz>

From: Michal Kubecek <mkubecek@suse.cz>
Date: Mon,  9 Sep 2013 21:45:04 +0200 (CEST)

> When loading the ipv6 module, ndisc_init() is called before
> ip6_route_init(). As the former registers a handler calling
> fib6_run_gc(), this opens a window to run the garbage collector
> before necessary data structures are initialized. If a network
> device is initialized in this window, adding MAC address to it
> triggers a NETDEV_CHANGEADDR event, leading to a crash in
> fib6_clean_all().
> 
> Take the event handler registration out of ndisc_init() into a
> separate function ndisc_late_init() and move it after
> ip6_route_init().
> 
> Signed-off-by: Michal Kubecek <mkubecek@suse.cz>

Looks good, applied, thanks.

^ permalink raw reply

* Re: [PATCH] net: tilegx driver: avoid compiler warning
From: David Miller @ 2013-09-11 20:58 UTC (permalink / raw)
  To: cmetcalf; +Cc: netdev, linux-kernel
In-Reply-To: <201309091822.r89IMXmA032018@farm-0002.internal.tilera.com>

From: Chris Metcalf <cmetcalf@tilera.com>
Date: Mon, 9 Sep 2013 14:11:54 -0400

> The "id" variable was being incremented in common code, but only
> initialized and used in IPv4 code.  We move the increment to the IPv4
> code too, and then legitimately use the uninitialized_var() macro to
> avoid the gcc 4.6 warning that 'id' may be used uninitialized.
> Note that gcc 4.7 does not warn.
> 
> Signed-off-by: Chris Metcalf <cmetcalf@tilera.com>

Ugly situation, but whatever, applied :-)

^ permalink raw reply

* Re: [PATCH 1/1] bridge: fix message_age_timer calculation
From: David Miller @ 2013-09-11 20:48 UTC (permalink / raw)
  To: sergei.shtylyov; +Cc: stephen, netdev, bridge, buytenh
In-Reply-To: <5230B93B.3040900@cogentembedded.com>

From: Sergei Shtylyov <sergei.shtylyov@cogentembedded.com>
Date: Wed, 11 Sep 2013 22:40:59 +0400

> Hello.
> 
> On 09/09/2013 08:56 PM, Chris Healy wrote:
> 
>> This changes the message_age_timer calculation to use the BPDU's max
>> age as opposed to the local bridge's max age.  This is in accordance
>> with section 8.6.2.3.2 Step 2 of the 802.1D-1998 sprecification.
> 
>    You should wrap your changelog lines at 80 chars at most, preferably
>    less.

Yes, please fix this and resubmit.

^ permalink raw reply

* Re: [PATCH] fib6_rules: fix indentation
From: David Miller @ 2013-09-11 20:16 UTC (permalink / raw)
  To: stefan.tomanek; +Cc: netdev
In-Reply-To: <20130908150943.GR21970@zirkel.wertarbyte.de>

From: Stefan Tomanek <stefan.tomanek@wertarbyte.de>
Date: Sun, 8 Sep 2013 17:09:43 +0200

> This change just removes two tabs from the source file.
> 
> Signed-off-by: Stefan Tomanek <stefan.tomanek@wertarbyte.de>

Applied, thanks.

^ permalink raw reply

* Re: [PATCH net 1/1] r8169: enforce RX_MULTI_EN for the 8168f.
From: David Miller @ 2013-09-11 20:16 UTC (permalink / raw)
  To: dborkman; +Cc: romieu, netdev, david, fredo, hayeswang
In-Reply-To: <522C391A.3020408@redhat.com>

From: Daniel Borkmann <dborkman@redhat.com>
Date: Sun, 08 Sep 2013 10:45:14 +0200

> On 09/08/2013 01:15 AM, Francois Romieu wrote:
>> Same narrative as eb2dc35d99028b698cdedba4f5522bc43e576bd2 ("r8169:
>> RxConfig
>> hack for the 8168evl.") regarding AMD IOMMU errors.
>>
>> RTL_GIGA_MAC_VER_36 - 8168f as well - has not been reported to behave
>> the
>> same.
>>
>> Tested-by: David R <david@unsolicited.net>
>> Tested-by: Frédéric Leroy <fredo@starox.org>
>> Cc: Hayes Wang <hayeswang@realtek.com>
>> ---
> 
> Your signed-off-by is missing.

Francois, if you reply to this thread with your signoff, all will
be well and I will apply this.

Thanks.

^ permalink raw reply

* Re: [PATCH] bcm63xx_enet: remove deprecated IRQF_DISABLED
From: David Miller @ 2013-09-11 20:15 UTC (permalink / raw)
  To: michael.opdenacker; +Cc: jogo, joe, jg1.han, mbizon, netdev, linux-kernel
In-Reply-To: <1378537010-7128-1-git-send-email-michael.opdenacker@free-electrons.com>

From: Michael Opdenacker <michael.opdenacker@free-electrons.com>
Date: Sat,  7 Sep 2013 08:56:50 +0200

> This patch proposes to remove the IRQF_DISABLED flag from
> drivers/net/ethernet/broadcom/bcm63xx_enet.c
> 
> It's a NOOP since 2.6.35 and it will be removed one day.
> 
> Signed-off-by: Michael Opdenacker <michael.opdenacker@free-electrons.com>

Applied.

^ permalink raw reply

* Re: [PATCH] net: korina: remove deprecated IRQF_DISABLED
From: David Miller @ 2013-09-11 20:14 UTC (permalink / raw)
  To: michael.opdenacker
  Cc: emilio, mugunthanvnm, jg1.han, hsweeten, netdev, linux-kernel
In-Reply-To: <1378531257-5446-1-git-send-email-michael.opdenacker@free-electrons.com>

From: Michael Opdenacker <michael.opdenacker@free-electrons.com>
Date: Sat,  7 Sep 2013 07:20:57 +0200

> This patch proposes to remove the IRQF_DISABLED flag from
> drivers/net/ethernet/korina.c
> 
> It's a NOOP since 2.6.35 and it will be removed one day.
> 
> Signed-off-by: Michael Opdenacker <michael.opdenacker@free-electrons.com>

Applied.

^ permalink raw reply

* Re: [PATCH net] net: ovs: flow: fix potential illegal memory access in __parse_flow_nlattrs
From: David Miller @ 2013-09-11 20:14 UTC (permalink / raw)
  To: jesse; +Cc: dborkman, netdev, azhou, dev
In-Reply-To: <CAEP_g=_Bgt8OsORTyYRt=tbssfbd-0Jh2HhnjPdj1aVP8Zd1BA@mail.gmail.com>

From: Jesse Gross <jesse@nicira.com>
Date: Sat, 7 Sep 2013 22:35:33 -0700

> On Sat, Sep 7, 2013 at 12:41 AM, Daniel Borkmann <dborkman@redhat.com> wrote:
>> In function __parse_flow_nlattrs(), we check for condition
>> (type > OVS_KEY_ATTR_MAX) and if true, print an error, but we do
>> not return from this function as in other checks. It seems this
>> has been forgotten, as otherwise, we could access beyond the
>> memory of ovs_key_lens, which is of ovs_key_lens[OVS_KEY_ATTR_MAX + 1].
>> Hence, a maliciously prepared nla_type from user space could access
>> beyond this upper limit.
>>
>> Introduced by 03f0d916a ("openvswitch: Mega flow implementation").
>>
>> Signed-off-by: Daniel Borkmann <dborkman@redhat.com>
>> Cc: Andy Zhou <azhou@nicira.com>
> 
> Yeah, looks like a mistake to me.
> 
> Acked-by: Jesse Gross <jesse@nicira.com>

Applied, thanks.

^ permalink raw reply

* Re: [PATCH net] net: fib: fib6_add: fix potential NULL pointer dereference
From: David Miller @ 2013-09-11 20:14 UTC (permalink / raw)
  To: matti.vaittinen; +Cc: dborkman, netdev, mlin
In-Reply-To: <522D69FF.9000001@nsn.com>

From: Matti Vaittinen <matti.vaittinen@nsn.com>
Date: Mon, 09 Sep 2013 09:26:07 +0300

> On 09/07/2013 10:35 PM, ext Hannes Frederic Sowa wrote:
>> On Sat, Sep 07, 2013 at 03:13:20PM +0200, Daniel Borkmann wrote:
>>> When the kernel is compiled with CONFIG_IPV6_SUBTREES, and we return
>>> with an error in fn = fib6_add_1(), then error codes are encoded into
>>> the return pointer e.g. ERR_PTR(-ENOENT). In such an error case, we
>>> write the error code into err and jump to out, hence enter the if(err)
>>> condition. Now, if CONFIG_IPV6_SUBTREES is enabled, we check for:
>>>
>>>    if (pn != fn && pn->leaf == rt)
>>>      ...
>>>    if (pn != fn && !pn->leaf && !(pn->fn_flags & RTN_RTINFO))
>>>      ...
>>>
>>> Since pn is NULL and fn is f.e. ERR_PTR(-ENOENT), then pn != fn
>>> evaluates to true and causes a NULL-pointer dereference on further
>>> checks on pn. Fix it, by setting both NULL in error case, so that
>>> pn != fn already evaluates to false and no further dereference
>>> takes place.
>>>
>>> This was first correctly implemented in 4a287eba2 ("IPv6 routing,
>>> NLM_F_* flag support: REPLACE and EXCL flags support, warn about
>>> missing CREATE flag"), but the bug got later on introduced by
>>> 188c517a0 ("ipv6: return errno pointers consistently for
>>> fib6_add_1()").
>>>
>>> Signed-off-by: Daniel Borkmann <dborkman@redhat.com>
>>> Cc: Lin Ming <mlin@ss.pku.edu.cn>
>>> Cc: Matti Vaittinen <matti.vaittinen@nsn.com>
>>> Cc: Hannes Frederic Sowa <hannes@stressinduktion.org>
>>
>> Full ACK!
>>
>> Acked-by: Hannes Frederic Sowa <hannes@stressinduktion.org>
>>
> Acked-by: Matti Vaittinen <matti.vaittinen@nsn.com>

Applied, thanks everyone.

^ permalink raw reply

* Re: [PATCH net] net: sctp: fix smatch warning in sctp_send_asconf_del_ip
From: David Miller @ 2013-09-11 20:14 UTC (permalink / raw)
  To: dborkman; +Cc: netdev, linux-sctp, nhorman, micchie
In-Reply-To: <1378579881-27881-1-git-send-email-dborkman@redhat.com>

From: Daniel Borkmann <dborkman@redhat.com>
Date: Sat,  7 Sep 2013 20:51:21 +0200

> This was originally reported in [1] and posted by Neil Horman [2], he said:
> 
>   Fix up a missed null pointer check in the asconf code. If we don't find
>   a local address, but we pass in an address length of more than 1, we may
>   dereference a NULL laddr pointer. Currently this can't happen, as the only
>   users of the function pass in the value 1 as the addrcnt parameter, but
>   its not hot path, and it doesn't hurt to check for NULL should that ever
>   be the case.
> 
> The callpath from sctp_asconf_mgmt() looks okay. But this could be triggered
> from sctp_setsockopt_bindx() call with SCTP_BINDX_REM_ADDR and addrcnt > 1
> while passing all possible addresses from the bind list to SCTP_BINDX_REM_ADDR
> so that we do *not* find a single address in the association's bind address
> list that is not in the packed array of addresses. If this happens when we
> have an established association with ASCONF-capable peers, then we could get
> a NULL pointer dereference as we only check for laddr == NULL && addrcnt == 1
> and call later sctp_make_asconf_update_ip() with NULL laddr.
> 
> BUT: this actually won't happen as sctp_bindx_rem() will catch such a case
> and return with an error earlier. As this is incredably unintuitive and error
> prone, add a check to catch at least future bugs here. As Neil says, its not
> hot path. Introduced by 8a07eb0a5 ("sctp: Add ASCONF operation on the
> single-homed host").
> 
>  [1] http://www.spinics.net/lists/linux-sctp/msg02132.html
>  [2] http://www.spinics.net/lists/linux-sctp/msg02133.html
> 
> Reported-by: Dan Carpenter <dan.carpenter@oracle.com>
> Signed-off-by: Neil Horman <nhorman@tuxdriver.com>
> Signed-off-by: Daniel Borkmann <dborkman@redhat.com>

Applied and queued up for -stable.

^ permalink raw reply

* Re: [PATCH net] net: sctp: fix bug in sctp_poll for SOCK_SELECT_ERR_QUEUE
From: David Miller @ 2013-09-11 20:14 UTC (permalink / raw)
  To: dborkman; +Cc: netdev, linux-sctp, jacob.e.keller
In-Reply-To: <1378565099-20987-1-git-send-email-dborkman@redhat.com>

From: Daniel Borkmann <dborkman@redhat.com>
Date: Sat,  7 Sep 2013 16:44:59 +0200

> If we do not add braces around ...
> 
>   mask |= POLLERR |
>           sock_flag(sk, SOCK_SELECT_ERR_QUEUE) ? POLLPRI : 0;
> 
> ... then this condition always evaluates to true as POLLERR is
> defined as 8 and binary or'd with whatever result comes out of
> sock_flag(). Hence instead of (X | Y) ? A : B, transform it into
> X | (Y ? A : B). Unfortunatelty, commit 8facd5fb73 ("net: fix
> smatch warnings inside datagram_poll") forgot about SCTP. :-(
> 
> Introduced by 7d4c04fc170 ("net: add option to enable error queue
> packets waking select").
> 
> Signed-off-by: Daniel Borkmann <dborkman@redhat.com>

Applied and queued up for -stable.

^ permalink raw reply

* Re: [PATCH] net: fix multiqueue selection
From: David Miller @ 2013-09-11 20:13 UTC (permalink / raw)
  To: alexander.duyck; +Cc: eric.dumazet, netdev, alexander.h.duyck
In-Reply-To: <522BF85B.3000909@gmail.com>

From: Alexander Duyck <alexander.duyck@gmail.com>
Date: Sat, 07 Sep 2013 21:08:59 -0700

> On 09/07/2013 12:02 PM, Eric Dumazet wrote:
>> From: Eric Dumazet <edumazet@google.com>
>> 
>> commit 416186fbf8c5b4e4465 ("net: Split core bits of netdev_pick_tx
>> into __netdev_pick_tx") added a bug that disables caching of queue
>> index in the socket.
>> 
>> This is the source of packet reorders for TCP flows, and
>> again this is happening more often when using FQ pacing.
>> 
>> Old code was doing 
>> 
>> if (queue_index != old_index)
>> 	sk_tx_queue_set(sk, queue_index);
>> 
>> Alexander renamed the variables but forgot to change sk_tx_queue_set()
>> 2nd parameter.
>> 
>> if (queue_index != new_index)
>> 	sk_tx_queue_set(sk, queue_index);
>> 
>> This means we store -1 over and over in sk->sk_tx_queue_mapping
>> 
>> Signed-off-by: Eric Dumazet <edumazet@google.com>
 ...
> Ugh, my bad.  This is a nasty one too since the behaviour appeared to be
> correct for most cases.
> 
> It looks like this needs to go into stable for 3.9 - 3.11.
> 
> Acked-by: Alexander Duyck <alexander.h.duyck@intel.com>
> 

Applied and queued up for -stable, thanks.

^ permalink raw reply

* Re: [PATCH 2/2] irda: vlsi_ir: Remove casting the return value which is a void pointer
From: David Miller @ 2013-09-11 20:13 UTC (permalink / raw)
  To: jg1.han; +Cc: netdev, samuel
In-Reply-To: <004c01cead1c$d899f120$89cdd360$%han@samsung.com>

From: Jingoo Han <jg1.han@samsung.com>
Date: Mon, 09 Sep 2013 14:24:24 +0900

> Casting the return value which is a void pointer is redundant.
> The conversion from void pointer to any other pointer type is
> guaranteed by the C programming language.
> 
> Signed-off-by: Jingoo Han <jg1.han@samsung.com>

Applied.

^ permalink raw reply

* Re: [PATCH 1/2] irda: donauboe: Remove casting the return value which is a void pointer
From: David Miller @ 2013-09-11 20:13 UTC (permalink / raw)
  To: jg1.han; +Cc: netdev, samuel
In-Reply-To: <004b01cead1c$8e1678d0$aa436a70$%han@samsung.com>

From: Jingoo Han <jg1.han@samsung.com>
Date: Mon, 09 Sep 2013 14:22:19 +0900

> Casting the return value which is a void pointer is redundant.
> The conversion from void pointer to any other pointer type is
> guaranteed by the C programming language.
> 
> Signed-off-by: Jingoo Han <jg1.han@samsung.com>

Applied.

^ permalink raw reply

* Re: macvlan: Move skb_clone check closer to call
From: David Miller @ 2013-09-11 20:04 UTC (permalink / raw)
  To: horms; +Cc: herbert, netdev
In-Reply-To: <20130910013810.GA28966@verge.net.au>

From: Simon Horman <horms@verge.net.au>
Date: Tue, 10 Sep 2013 10:38:10 +0900

> On Sat, Sep 07, 2013 at 12:27:11PM +1000, Herbert Xu wrote:
>> Currently macvlan calls skb_clone in macvlan_broadcast but checks
>> for a NULL return in macvlan_broadcast_one instead.  This is
>> needlessly confusing and may lead to bugs introduced later.
>> 
>> This patch moves the error check to where the skb_clone call is.
>> 
>> The only other caller of macvlan_broadcast_one never passes in a
>> NULL value so it doesn't need the check either.
>> 
>> Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
> 
> This seems good to me as macvlan_handle_frame(), which is
> the only other caller of macvlan_broadcast_one(), already checks
> that skb is non-NULL before calling macvlan_handle_frame().
> 
> Reviewed-by: Simon Horman <horms@verge.net.au>

Applied, thanks everyone.

^ permalink raw reply

* Re: [PATCH net 1/1] qlcnic: Fix warning reported by kbuild test robot.
From: David Miller @ 2013-09-11 20:00 UTC (permalink / raw)
  To: jitendra.kalsaria; +Cc: netdev, sony.chacko, shahed.shaikh, Dept-HSGLinuxNICDev
In-Reply-To: <1378505072-7879-1-git-send-email-jitendra.kalsaria@qlogic.com>

From: Jitendra Kalsaria <jitendra.kalsaria@qlogic.com>
Date: Fri, 6 Sep 2013 18:04:32 -0400

> From: Jitendra Kalsaria <jitendra.kalsaria@qlogic.com>
> 
> drivers/net/ethernet/qlogic/qlcnic/qlcnic_io.c: In function 'qlcnic_handle_fw_message':
> drivers/net/ethernet/qlogic/qlcnic/qlcnic_io.c:922:4: warning: overflow in implicit constant conversion [-Woverflow]
> 
> Signed-off-by: Jitendra Kalsaria <jitendra.kalsaria@qlogic.com>

Applied, thanks.

^ permalink raw reply

* Re: [PATCH -net v2 0/2] bonding: fix arp_validate desync state & race
From: David Miller @ 2013-09-11 19:55 UTC (permalink / raw)
  To: nikolay; +Cc: netdev, fubar, andy
In-Reply-To: <1378504826-18855-1-git-send-email-nikolay@redhat.com>

From: Nikolay Aleksandrov <nikolay@redhat.com>
Date: Sat,  7 Sep 2013 00:00:24 +0200

> Hello all,
> These two patches aim to fix the possible de-sync state which the bond
> can enter if we have arp_validate without arp_interval or the other way
> around. They also fix a race condition between arp_validate setting and
> mode changing.
> 
> Patch 01 - fixes the race condition between store_arp_validate and bond
> mode change by using rtnl for sync
> Patch 02 - fixes the possible de-sync state by setting/unsetting recv_probe
> if arp_interval is set/unset and also if arp_validate is set/unset
> 
> v2: Fix the mode check in store_arp_validate

Series applied, thank you.

^ permalink raw reply

* Re: [patch net/stable] ipv6/exthdrs: accept tlv which includes only padding
From: David Miller @ 2013-09-11 19:53 UTC (permalink / raw)
  To: jiri; +Cc: netdev, kuznet, jmorris, yoshfuji, kaber, eldad
In-Reply-To: <1378476145-6282-1-git-send-email-jiri@resnulli.us>

From: Jiri Pirko <jiri@resnulli.us>
Date: Fri,  6 Sep 2013 16:02:25 +0200

> In rfc4942 and rfc2460 I cannot find anything which would implicate to
> drop packets which have only padding in tlv.
> 
> Current behaviour breaks TAHI Test v6LC.1.2.6.
> 
> Problem was intruduced in:
> 9b905fe6843 "ipv6/exthdrs: strict Pad1 and PadN check"
> 
> Signed-off-by: Jiri Pirko <jiri@resnulli.us>

Ok I've changed my position, applied and queued up for -stable.

Thanks.

^ permalink raw reply

* [PATCH v2 net 1/1] RFC: drivers/net/phy: Fix for a BCM5482S auto-negotiation problem
From: Corey Ashford @ 2013-09-11 19:52 UTC (permalink / raw)
  To: netdev; +Cc: Corey Ashford

Differences from v1 of this patch:
- Added description of the patch remedy for the problem
- Added configurations tested
- Corrected spelling of "negotiation" in the subject line

When a 1Gb network interface is used in SGMII mode off, and then
a Broadcom 5482S is used to redrive SGMII (SGMII to SGMII mode)
to a Broadcom 54616 PHY, the standard PHY registers do not appear to
be updated correctly after auto-negotiation.  This causes the
kernel to get confused about the state of the link and also
causes the MAC layer driver to inappropriately configure the MAC.

By 'standard' registers I mean those that are read by genphy_read_link
(MII_BMSR, 0x01) and genphy_read_status (MII_STAT1000, 0x0a; MII_CTRL1000,
0x09; MII_LPA, 0x05).

Below you can find register dumps for the various configurations.

The patch uses the Operating Mode Register in the BCM5482S that appears to be
updated correctly with the speed / duplex / link status upon all
configurations of the PHY. The general registers are not always updated
correctly but this OMR register always had correct values for the various
configurations that were tested.

That said, I've only tested two of the configurations:
SGMII to SGMII
SGMII to serdes


SGMII-to-SGMII mode, 1Gb, full duplex:

# /var/dump1GPhy
Shadow register '11111'=0x00007E5C
Dumping registers for PHY at port e:
PHY register 0=0x00001140
PHY register 1=0x00007949
PHY register 2=0x00000143
PHY register 3=0x0000BCB2
PHY register 4=0x000001E1
PHY register 5=0x00000000
PHY register 6=0x00000064
PHY register 7=0x00002001
PHY register 8=0x00000000
PHY register 9=0x00000200
PHY register A=0x00000000
PHY register B=0x00000000
PHY register C=0x00000000
PHY register D=0x00000000
PHY register E=0x00000000
PHY register F=0x00003000
PHY register 10=0x00001000
PHY register 11=0x00002000
PHY register 12=0x00000000
PHY register 13=0x00000C00
PHY register 14=0x00000000
PHY register 15=0x00000000
PHY register 16=0x00000000
PHY register 17=0x00000000
PHY register 18=0x00000400
PHY register 19=0x00001000
PHY register 1A=0x00000000
PHY register 1B=0x0000FFF1
PHY register 1C=0x00007E5C
PHY register 1D=0x00000000
PHY register 1E=0x00000000
PHY register 1F=0x00000000
PHY expansion register E00=0x00001140
PHY expansion register E01=0x0000016D
PHY expansion register E02=0x00000143
PHY expansion register E03=0x0000BCB2
PHY expansion register E04=0x00000001
PHY expansion register E05=0x0000D801
PHY expansion register E06=0x00000064
PHY expansion register E07=0x00002001
PHY expansion register E08=0x00000000
PHY expansion register E09=0x00000000
PHY expansion register E0A=0x00000000
PHY expansion register E0B=0x00000000
PHY expansion register E0C=0x00000000
PHY expansion register E0D=0x00000000
PHY expansion register E0E=0x00000000
PHY expansion register E0F=0x0000C000
PHY expansion register E10=0x00000000
PHY expansion register E11=0x00000000
PHY expansion register E12=0x00000080
PHY expansion register E13=0x00000089
PHY expansion register E14=0x00000000
PHY expansion register E15=0x0000038A
PHY expansion register E16=0x0000002E
Mode status register = 0x0000D072
Successfully completed!


SGMII-to-SGMII mode, 100Mb, half duplex:

# /var/dump1GPhy
Shadow register '11111'=0x00007E5C
Dumping registers for PHY at port e:
PHY register 0=0x00001140
PHY register 1=0x00007949
PHY register 2=0x00000143
PHY register 3=0x0000BCB2
PHY register 4=0x000001E1
PHY register 5=0x00000000
PHY register 6=0x00000064
PHY register 7=0x00002001
PHY register 8=0x00000000
PHY register 9=0x00000200
PHY register A=0x00000000
PHY register B=0x00000000
PHY register C=0x00000000
PHY register D=0x00000000
PHY register E=0x00000000
PHY register F=0x00003000
PHY register 10=0x00001000
PHY register 11=0x00002000
PHY register 12=0x00000000
PHY register 13=0x00000C00
PHY register 14=0x00000000
PHY register 15=0x00000000
PHY register 16=0x00000000
PHY register 17=0x00000000
PHY register 18=0x00000400
PHY register 19=0x00001000
PHY register 1A=0x00000000
PHY register 1B=0x0000FFF1
PHY register 1C=0x00007E5C
PHY register 1D=0x00000000
PHY register 1E=0x00000000
PHY register 1F=0x00000000
PHY expansion register E00=0x00001140
PHY expansion register E01=0x00000169
PHY expansion register E02=0x00000143
PHY expansion register E03=0x0000BCB2
PHY expansion register E04=0x00000001
PHY expansion register E05=0x0000C401
PHY expansion register E06=0x00000066
PHY expansion register E07=0x00002001
PHY expansion register E08=0x00000000
PHY expansion register E09=0x00000000
PHY expansion register E0A=0x00000000
PHY expansion register E0B=0x00000000
PHY expansion register E0C=0x00000000
PHY expansion register E0D=0x00000000
PHY expansion register E0E=0x00000000
PHY expansion register E0F=0x0000C000
PHY expansion register E10=0x00000000
PHY expansion register E11=0x00000000
PHY expansion register E12=0x00000080
PHY expansion register E13=0x00000058
PHY expansion register E14=0x00000000
PHY expansion register E15=0x0000026A
PHY expansion register E16=0x0000002E
Mode status register = 0x0000A072
Successfully completed!


SGMII-to-serdes, 1Gb, full duplex:

# /var/dump1GPhy
Shadow register '11111'=0x00007E5C
Dumping registers for PHY at port e:
PHY register 0=0x00001140
PHY register 1=0x00007949
PHY register 2=0x00000143
PHY register 3=0x0000BCB2
PHY register 4=0x000001E1
PHY register 5=0x00000000
PHY register 6=0x00000064
PHY register 7=0x00002001
PHY register 8=0x00000000
PHY register 9=0x00000200
PHY register A=0x00000000
PHY register B=0x00000000
PHY register C=0x00000000
PHY register D=0x00000000
PHY register E=0x00000000
PHY register F=0x00003000
PHY register 10=0x00001000
PHY register 11=0x00000000
PHY register 12=0x00000000
PHY register 13=0x00000C00
PHY register 14=0x00000000
PHY register 15=0x0000D072
PHY register 16=0x00000000
PHY register 17=0x00000F42
PHY register 18=0x00000400
PHY register 19=0x00001000
PHY register 1A=0x00000000
PHY register 1B=0x0000FFF1
PHY register 1C=0x00007E5C
PHY register 1D=0x00000000
PHY register 1E=0x00000000
PHY register 1F=0x00000000
PHY expansion register E00=0x00001140
PHY expansion register E01=0x0000014D
PHY expansion register E02=0x00000143
PHY expansion register E03=0x0000BCB2
PHY expansion register E04=0x00000060
PHY expansion register E05=0x00000000
PHY expansion register E06=0x00000064
PHY expansion register E07=0x00002001
PHY expansion register E08=0x00000000
PHY expansion register E09=0x00000000
PHY expansion register E0A=0x00000000
PHY expansion register E0B=0x00000000
PHY expansion register E0C=0x00000000
PHY expansion register E0D=0x00000000
PHY expansion register E0E=0x00000000
PHY expansion register E0F=0x0000C000
PHY expansion register E10=0x00000000
PHY expansion register E11=0x00000000
PHY expansion register E12=0x00000080
PHY expansion register E13=0x000002D3
PHY expansion register E14=0x00000000
PHY expansion register E15=0x00000388
PHY expansion register E16=0x0000002E
Mode status register = 0x0000D072
Successfully completed!

Signed-off-by: Corey Ashford <cjashfor@linux.vnet.ibm.com>
---
 drivers/net/phy/broadcom.c | 37 +++++++++++++++++++++++++++----------
 1 file changed, 27 insertions(+), 10 deletions(-)

diff --git a/drivers/net/phy/broadcom.c b/drivers/net/phy/broadcom.c
index f8c90ea..9f5d076 100644
--- a/drivers/net/phy/broadcom.c
+++ b/drivers/net/phy/broadcom.c
@@ -142,6 +142,13 @@
 #define  MII_BCM54XX_EXP_EXP96_MYST		0x0010
 #define MII_BCM54XX_EXP_EXP97			0x0f97
 #define  MII_BCM54XX_EXP_EXP97_MYST		0x0c0c
+#define MII_BCM54XX_EXP_OPER_MODE		(MII_BCM54XX_EXP_SEL_ER | 0x42)
+#define MII_BCM54XX_EXP_OPER_MODE_SERDES_LINK		0x8000
+#define MII_BCM54XX_EXP_OPER_MODE_SERDES_SPEED_MASK	0x6000
+#define MII_BCM54XX_EXP_OPER_MODE_SERDES_SPEED_1000	0x4000
+#define MII_BCM54XX_EXP_OPER_MODE_SERDES_SPEED_100	0x2000
+#define MII_BCM54XX_EXP_OPER_MODE_SERDES_SPEED_10	0x0000
+#define MII_BCM54XX_EXP_OPER_MODE_SERDES_DUPLEX		0x1000
 
 /*
  * BCM5482: Secondary SerDes registers
@@ -491,21 +498,31 @@ static int bcm5482_config_init(struct phy_device *phydev)
 static int bcm5482_read_status(struct phy_device *phydev)
 {
 	int err;
+	err = bcm54xx_exp_read(phydev, MII_BCM54XX_EXP_OPER_MODE);
+	if (err < 0)
+		return err;
 
-	err = genphy_read_status(phydev);
+	phydev->link = ((err & MII_BCM54XX_EXP_OPER_MODE_SERDES_LINK) ==
+		MII_BCM54XX_EXP_OPER_MODE_SERDES_LINK);
 
-	if (phydev->dev_flags & PHY_BCM_FLAGS_MODE_1000BX) {
-		/*
-		 * Only link status matters for 1000Base-X mode, so force
-		 * 1000 Mbit/s full-duplex status
-		 */
-		if (phydev->link) {
+	if (phydev->link) {
+		switch (err & MII_BCM54XX_EXP_OPER_MODE_SERDES_SPEED_MASK) {
+		case MII_BCM54XX_EXP_OPER_MODE_SERDES_SPEED_1000:
 			phydev->speed = SPEED_1000;
-			phydev->duplex = DUPLEX_FULL;
+			break;
+		case MII_BCM54XX_EXP_OPER_MODE_SERDES_SPEED_100:
+			phydev->speed = SPEED_100;
+			break;
+		default:
+			phydev->speed = SPEED_10;
+			break;
 		}
+		if (err & MII_BCM54XX_EXP_OPER_MODE_SERDES_DUPLEX)
+			phydev->duplex = DUPLEX_FULL;
+		else
+			phydev->duplex = DUPLEX_HALF;
 	}
-
-	return err;
+	return 0;
 }
 
 static int bcm54xx_ack_interrupt(struct phy_device *phydev)
-- 
1.8.1.4

^ permalink raw reply related

* Re: [PATCH] cxgb4: remove workqueue when driver registration fails
From: David Miller @ 2013-09-11 19:52 UTC (permalink / raw)
  To: weiyang; +Cc: dm, netdev
In-Reply-To: <1378431145-7203-1-git-send-email-weiyang@linux.vnet.ibm.com>

From: Wei Yang <weiyang@linux.vnet.ibm.com>
Date: Fri,  6 Sep 2013 09:32:25 +0800

> When driver registration fails, we need to clean up the resources allocated
> before. cxgb4 missed to destroy the workqueue allocated at the very beginning.
> 
> This patch destroies the workqueue when registration fails.
> 
> Signed-off-by: Wei Yang <weiyang@linux.vnet.ibm.com>

This patch was corrupted by your email client, please email the patch
to yourself, make sure the patch you receive in the email applies
cleanly to the current 'net' tree, and then resubmit.

Thanks.

^ permalink raw reply

* Re: [PATCH] bnx2x: avoid atomic allocations during initialization
From: David Miller @ 2013-09-11 19:44 UTC (permalink / raw)
  To: mschmidt; +Cc: netdev, ariele, eilong
In-Reply-To: <1378411989-19775-1-git-send-email-mschmidt@redhat.com>

From: Michal Schmidt <mschmidt@redhat.com>
Date: Thu,  5 Sep 2013 22:13:09 +0200

> During initialization bnx2x allocates significant amounts of memory
> (for rx data, rx SGEs, TPA pool) using atomic allocations.
> 
> I received a report where bnx2x failed to allocate SGEs and it had
> to fall back to TPA-less operation.
> 
> Let's use GFP_KERNEL allocations during initialization, which runs
> in process context. Add gfp_t parameters to functions that are used
> both in initialization and in the receive path.
> 
> Use an unlikely branch in bnx2x_frag_alloc() to avoid atomic allocation
> by netdev_alloc_frag(). The branch is taken several thousands of times
> during initialization, but then never more. Note that fp->rx_frag_size
> is never greater than PAGE_SIZE, so __get_free_page() can be used here.
> 
> Signed-off-by: Michal Schmidt <mschmidt@redhat.com>

I've applied this, the voiced objections were completely unreasonable
and absolutely do not match the established basic approaches to memory
allocation taken in every other major networking driver.

Thanks Michal.

^ 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