02 May, 2013

4 commits

  • Currently, in menuconfig, Netlink's new mmaped IO is the very first
    entry under the ``Networking support'' item and comes even before
    ``Networking options'':

    [ ] Netlink: mmaped IO
    Networking options --->
    ...

    Lets move this into ``Networking options'' under netlink's Kconfig,
    since this might be more appropriate. Introduced by commit ccdfcc398
    (``netlink: mmaped netlink: ring setup'').

    Signed-off-by: Daniel Borkmann
    Signed-off-by: David S. Miller

    Daniel Borkmann
     
  • Bart Van Assche recently reported a warning to me:

    [] warn_slowpath_common+0x7f/0xc0
    [] warn_slowpath_null+0x1a/0x20
    [] mutex_trylock+0x16d/0x180
    [] netpoll_poll_dev+0x49/0xc30
    [] ? __alloc_skb+0x82/0x2a0
    [] netpoll_send_skb_on_dev+0x265/0x410
    [] netpoll_send_udp+0x28a/0x3a0
    [] ? write_msg+0x53/0x110 [netconsole]
    [] write_msg+0xcf/0x110 [netconsole]
    [] call_console_drivers.constprop.17+0xa1/0x1c0
    [] console_unlock+0x2d6/0x450
    [] vprintk_emit+0x1ee/0x510
    [] printk+0x4d/0x4f
    [] scsi_print_command+0x7d/0xe0 [scsi_mod]

    This resulted from my commit ca99ca14c which introduced a mutex_trylock
    operation in a path that could execute in interrupt context. When mutex
    debugging is enabled, the above warns the user when we are in fact
    exectuting in interrupt context
    interrupt context.

    After some discussion, It seems that a semaphore is the proper mechanism to use
    here. While mutexes are defined to be unusable in interrupt context, no such
    condition exists for semaphores (save for the fact that the non blocking api
    calls, like up and down_trylock must be used when in irq context).

    Signed-off-by: Neil Horman
    Reported-by: Bart Van Assche
    CC: Bart Van Assche
    CC: David Miller
    CC: netdev@vger.kernel.org
    Signed-off-by: David S. Miller

    Neil Horman
     
  • Commit f9c2288837ba072b21dba955f04a4c97eaa77b1e (netlink:
    implement memory mapped recvmsg) increamented skb->users
    ref count twice for a dump op which does not look right.

    Following patch fixes that.

    CC: Patrick McHardy
    Signed-off-by: Pravin B Shelar
    Signed-off-by: David S. Miller

    Pravin B Shelar
     
  • Deal with changes in newer xtables while maintaining backward
    compatibility. Thanks to Jan Engelhardt for suggestions.

    Signed-off-by: Jamal Hadi Salim
    Signed-off-by: David S. Miller

    Jamal Hadi Salim
     

01 May, 2013

7 commits

  • commit b6c39bfcf1d7d63 ("net/mlx4_en: Add a service task")
    added a build error on 32bit arches.

    ERROR: "__udivdi3" [drivers/net/ethernet/mellanox/mlx4/mlx4_en.ko]
    undefined!

    Fix this problem by using do_div()

    Reported-by: Randy Dunlap
    Signed-off-by: Eric Dumazet
    Acked-by: Randy Dunlap
    Cc: Amir Vadai
    Signed-off-by: David S. Miller

    Eric Dumazet
     
  • This reverts commit d2d2d87dfd1a25ee270994c5b9e3eb4690428d32
    ("bnx2x: allow nvram test to run when device is down").

    Since it makes access to the device in D3 state possible.
    More work is required to make sure device is not set to D3
    during ifdown. Until this is done the nvram-test should simply
    exit if device is down like it did before.

    Signed-off-by: Dmitry Kravkov
    Signed-off-by: Eilon Greenstein
    Signed-off-by: David S. Miller

    Dmitry Kravkov
     
  • Bridge can crash while trying to send topology change packet.
    This happens if root port can't be found. This was reported by user
    but currently unable to reproduce it easily. The STP conditions that cause
    this are not known yet, but the problem doesn't have to be fatal.

    Signed-off-by: Stephen Hemminger
    Signed-off-by: David S. Miller

    stephen hemminger
     
  • With the commit a11fbba (net/cpsw: fix irq_disable() with threaded interrupts)
    from Sebastian Siewior, a kernel warning is generated as below. This warning
    is generated as the irq_enabled is not initialized for the primary interface
    and in probe it is initialized for the second interface. This patch moves
    irq_enabled initialization from second interface to primary interface.

    [ 3.049173] net eth0: phy found : id is : 0x4dd074
    [ 3.054552] net eth0: phy found : id is : 0x4dd074
    [ 3.070421] ------------[ cut here ]------------
    [ 3.075308] WARNING: at kernel/irq/manage.c:437 enable_irq+0x3c/0x74()
    [ 3.082173] Unbalanced enable for IRQ 56
    [ 3.086299] Modules linked in:
    [ 3.089557] [] (unwind_backtrace+0x0/0xf0) from [] (warn_slowpath_common+0x4c/0x68)
    [ 3.099450] [] (warn_slowpath_common+0x4c/0x68) from [] (warn_slowpath_fmt+0x30/0x40)
    [ 3.109521] [] (warn_slowpath_fmt+0x30/0x40) from [] (enable_irq+0x3c/0x74)
    [ 3.118681] [] (enable_irq+0x3c/0x74) from [] (cpsw_ndo_open+0x61c/0x684)
    [ 3.127669] [] (cpsw_ndo_open+0x61c/0x684) from [] (__dev_open+0x9c/0xf8)
    [ 3.136646] [] (__dev_open+0x9c/0xf8) from [] (__dev_change_flags+0x78/0x13c)
    [ 3.145988] [] (__dev_change_flags+0x78/0x13c) from [] (dev_change_flags+0x10/0x48)
    [ 3.155884] [] (dev_change_flags+0x10/0x48) from [] (ip_auto_config+0x198/0x111c)
    [ 3.165592] [] (ip_auto_config+0x198/0x111c) from [] (do_one_initcall+0x34/0x180)
    [ 3.175309] [] (do_one_initcall+0x34/0x180) from [] (kernel_init_freeable+0xfc/0x1c8)
    [ 3.185393] [] (kernel_init_freeable+0xfc/0x1c8) from [] (kernel_init+0x8/0xe4)
    [ 3.194929] [] (kernel_init+0x8/0xe4) from [] (ret_from_fork+0x14/0x24)
    [ 3.203712] ---[ end trace d6f979da080bc391 ]---

    Cc: Sebastian Siewior
    Signed-off-by: Mugunthan V N
    Signed-off-by: David S. Miller

    Mugunthan V N
     
  • On Renesas R-Car based development boards, although a MAC address is printed on
    all the Ethernet port labels, U-Boot doesn't write a valid MAC address to the
    Ether MAHR/MALR registers (there's no storage provided for the Ether MAC address
    either), so we have to resort to using a random MAC address...

    Signed-off-by: Sergei Shtylyov
    Acked-by: Laurent Pinchart
    Acked-by: Simon Horman
    Signed-off-by: David S. Miller

    Sergei Shtylyov
     
  • The venerable 3c509 driver only sets its device parent in one case, the ISAPnP one.
    It does this with the SET_NETDEV_DEV function. It should register with the device
    hierarchy in two additional cases: standard (non-PnP) ISA and EISA.

    - Currently they appear here:
    /sys/devices/virtual/net/eth0 (standard ISA)
    /sys/devices/virtual/net/eth1 (EISA)

    - Rather, they should instead be here:
    /sys/devices/isa/3c509.0/net/eth0 (standard ISA)
    /sys/devices/pci0000:00/0000:00:07.0/00:04/net/eth1 (EISA)

    Tested on ISA and EISA boards.

    Signed-off-by: Matthew Whitehead
    Signed-off-by: David S. Miller

    Matthew Whitehead
     
  • The commit f233a976ad15c3b8c54c0157f3c41d23f7514279 (tg3: shows
    HW time stamping support only if ptp_capable is present) didn't
    append hardware flags correctly. This patch fixes it.

    Signed-off-by: Flavio Leitner
    Signed-off-by: David S. Miller

    Flavio Leitner
     

30 Apr, 2013

29 commits

  • Conflicts:
    drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c
    drivers/net/ethernet/emulex/benet/be.h
    include/net/tcp.h
    net/mac802154/mac802154.h

    Most conflicts were minor overlapping stuff.

    The be2net driver brought in some fixes that added __vlan_put_tag
    calls, which in net-next take an additional argument.

    Signed-off-by: David S. Miller

    David S. Miller
     
  • Currently, peeking on a unix stream socket with an offset larger than len of
    the data in the sk receive queue returns immediately with bogus data.

    This patch fixes this so that the behavior is the same as peeking with no
    offset on an empty queue: the caller blocks.

    Signed-off-by: Benjamin Poirier
    Acked-by: Eric Dumazet
    Signed-off-by: David S. Miller

    Benjamin Poirier
     
  • Currently, peeking on a unix datagram socket with an offset larger than len of
    the data in the sk receive queue returns immediately with bogus data. That's
    because *off is not reset between each skb_queue_walk().

    This patch fixes this so that the behavior is the same as peeking with no
    offset on an empty queue: the caller blocks.

    Signed-off-by: Benjamin Poirier
    Acked-by: Eric Dumazet
    Signed-off-by: David S. Miller

    Benjamin Poirier
     
  • "77c1090 net: fix infinite loop in __skb_recv_datagram()" (v3.8) introduced a
    regression:
    After that commit, recv can no longer peek beyond a 0-sized skb in the queue.
    __skb_recv_datagram() instead stops at the first skb with len == 0 and results
    in the system call failing with -EFAULT via skb_copy_datagram_iovec().

    When peeking at an offset with 0-sized skb(s), each one of those is received
    only once, in sequence. The offset starts moving forward again after receiving
    datagrams with len > 0.

    Signed-off-by: Benjamin Poirier
    Acked-by: Eric Dumazet
    Signed-off-by: David S. Miller

    Benjamin Poirier
     
  • The only user is get_dpifindex(), no need to redirect via the port
    operations.

    Signed-off-by: Thomas Graf
    Signed-off-by: David S. Miller

    Thomas Graf
     
  • Use consume_skb() to free the original skb that is successfully transmitted
    as gso segmented skbs so that it is not treated as a drop due to an error.

    Signed-off-by: Sridhar Samudrala
    Acked-by: Eric Dumazet
    Signed-off-by: David S. Miller

    Sridhar Samudrala
     
  • John W. Linville says:

    ====================
    A few more stragglers intended for 3.10...

    For the Bluetooth bits, Gustavo says:

    "A few more patches intended for 3.10, the most important one is the support in
    btusb for fw loading for the Intel Bluetooth device. Other than that we have
    only fixes and clean ups."

    For the iwlwifi bits, Johannes says:

    "Here are a few more changes for the 3.10 stream, some bugfixes,
    adjustments to some powersave parameters and a new device ID."

    For the NFC bits, Samuel says:

    "This pull request includes Marcel's Kconfig dependency fix on top of the LLCP
    code move to net/nfc."

    On top of that...Yogesh Ashok Powar provides a few PCI-related mwifiex
    updates, Hauke Mehrtens provides a small ssb feature for spurious
    tone avoidance on a specific chip, and Larry Finger provides a small
    rtlwifi fix related to avoiding false detection of AP loss.
    ====================

    Signed-off-by: David S. Miller

    David S. Miller
     
  • …wireless-next into for-davem

    John W. Linville
     
  • Dmitry Kravkov says:

    ====================
    The series fixes GSO flags in vxlan xmit code and
    adds appropriate code for bnx2x driver to utilize
    fw support for UDP tunneling protocols offload.

    Netperf's results below show improvement in throughput
    between two vxlan interfaces:
    before:
    MIGRATED TCP STREAM TEST from 0.0.0.0 (0.0.0.0) port 0 AF_INET to 9.0.0.2 (9.0.0.2) port 0 AF_INET
    Recv Send Send
    Socket Socket Message Elapsed
    Size Size Size Time Throughput
    bytes bytes bytes secs. 10^6bits/sec

    87380 16384 16384 10.20 228.73

    after:
    MIGRATED TCP STREAM TEST from 0.0.0.0 (0.0.0.0) port 0 AF_INET to 9.0.0.2 (9.0.0.2) port 0 AF_INET
    Recv Send Send
    Socket Socket Message Elapsed
    Size Size Size Time Throughput
    bytes bytes bytes secs. 10^6bits/sec

    87380 16384 16384 10.00 3314.75
    ====================

    Signed-off-by: David S. Miller

    David S. Miller
     
  • CC: Pravin B Shelar
    Signed-off-by: Dmitry Kravkov
    Signed-off-by: Eilon Greenstein
    Signed-off-by: David S. Miller

    Dmitry Kravkov
     
  • Since SKB_GSO_* flags are set by appropriate gso_segment callback
    in TCP/UDP layer.

    CC: Pravin B Shelar
    Signed-off-by: Dmitry Kravkov
    Signed-off-by: Eilon Greenstein
    Acked-by: Pravin B Shelar
    Signed-off-by: David S. Miller

    Dmitry Kravkov
     
  • Newer firmware can post CPL_SGE_EGR_UPDATE message encapsulated in a
    CPL_FW4_MSG as follows

    flit0 rss_header (if DropRSS == 0 in IQ context)
    flit1 CPL_FW4_MSG cpl
    flit2 rss_header w/opcode CPL_SGE_EGR_UPDATE
    flit3 CPL_SGE_EGR_UPDATE cpl

    So FW4_MSG CPLs with a newly created type of FW_TYPE_RSSCPL have the
    CPL_SGE_EGR_UPDATE CPL message in flit 2 of the FW4_MSG. Firmware can still
    post regular CPL_SGE_EGR_UPDATE messages, so the drivers need to handle
    both.

    This patch also writes a new parameter to firmware requesting encapsulated
    EGR_UPDATE. This allows firmware with this support to not break older drivers.

    Signed-off-by: Vipul Pandya
    Signed-off-by: David S. Miller

    Vipul Pandya
     
  • Newer firmware can post CPL_SGE_EGR_UPDATE message encapsulated in a
    CPL_FW4_MSG as follows

    flit0 rss_header (if DropRSS == 0 in IQ context)
    flit1 CPL_FW4_MSG cpl
    flit2 rss_header w/opcode CPL_SGE_EGR_UPDATE
    flit3 CPL_SGE_EGR_UPDATE cpl

    So FW4_MSG CPLs with a newly created type of FW_TYPE_RSSCPL have the
    CPL_SGE_EGR_UPDATE CPL message in flit 2 of the FW4_MSG. Firmware can still
    post regular CPL_SGE_EGR_UPDATE messages, so the drivers need to handle
    both.

    This patch also writes a new parameter to firmware requesting encapsulated
    EGR_UPDATE. This allows firmware with this support to not break older drivers.

    Signed-off-by: Vipul Pandya
    Signed-off-by: David S. Miller

    Vipul Pandya
     
  • Signed-off-by: Vipul Pandya
    Signed-off-by: David S. Miller

    Vipul Pandya
     
  • Linux immediately returns SYNACK on (spurious) SYN retransmits, but
    keeps the SYNACK timer running independently. Thus the timer may
    fire right after the SYNACK retransmit and causes a SYN-SYNACK
    cross-fire burst.

    Adopt the fast retransmit/recovery idea in established state by
    re-arming the SYNACK timer after the fast (SYNACK) retransmit. The
    timer may fire late up to 500ms due to the current SYNACK timer wheel,
    but it's OK to be conservative when network is congested. Eric's new
    listener design should address this issue.

    Signed-off-by: Yuchung Cheng
    Acked-by: Eric Dumazet
    Acked-by: Neal Cardwell
    Signed-off-by: David S. Miller

    Yuchung Cheng
     
  • Add MIB counters for checksum errors in IP layer,
    and TCP/UDP/ICMP layers, to help diagnose problems.

    $ nstat -a | grep Csum
    IcmpInCsumErrors 72 0.0
    TcpInCsumErrors 382 0.0
    UdpInCsumErrors 463221 0.0
    Icmp6InCsumErrors 75 0.0
    Udp6InCsumErrors 173442 0.0
    IpExtInCsumErrors 10884 0.0

    Signed-off-by: Eric Dumazet
    Signed-off-by: David S. Miller

    Eric Dumazet
     
  • Current tg3 shows hardware timestamping support for all devices
    when that is true only for the hardware with PTP_CAPABLE flag
    present.

    Signed-off-by: Flavio Leitner
    Acked-by: Nithin Nayak Sujir
    Signed-off-by: David S. Miller

    Flavio Leitner
     
  • Instead of feeding net_secret[] at boot time, defer the init
    at the point first socket is created.

    This permits some platforms to use better entropy sources than
    the ones available at boot time.

    Signed-off-by: Eric Dumazet
    Signed-off-by: David S. Miller

    Eric Dumazet
     
  • Lancer FW requires that the first cmd issued by the host-driver be an FLR.
    So, re-order be_probe() to move be_cmd_function_reset() ahead of
    be_cmd_fw_init().

    Signed-off-by: Kalesh AP
    Signed-off-by: Somnath Kotur
    Signed-off-by: David S. Miller

    Kalesh AP
     
  • Skyhawk-R requires V1 version of GET_FUNCTION_CONFIG cmd to be used for
    querrying resources available per function.

    Signed-off-by: Kalesh AP
    Signed-off-by: Somnath Kotur
    Signed-off-by: David S. Miller

    Kalesh AP
     
  • Samuel Ortiz says:

    "With this one we have:

    - One patch for moving the LLCP code into net/nfc.
    It fixes a build annoyance reported by Dave Miller caused by the fact
    that the LLCP code object targets are not in the same directory as the
    Makefile trying to build them is. It prevents us from doing e.g.

    make net/nfc/llcp/sock.o

    Moving the LLCP code into net/nfc and not making it optional anymore
    makes sense as LLCP is a fundamental piece of the NFC specifications
    and thus should be in the core NFC directory.

    - One patch that fixes the missing dependency against RFKILL. Without it NFC
    fails to properly build when it's builtin and CONFIG_RFKILL=m."

    Signed-off-by: John W. Linville

    John W. Linville
     
  • Pablo Neira Ayuso says:

    ====================
    The following patchset contains relevant updates for the Netfilter
    tree, they are:

    * Enhancements for ipset: Add the counter extension for sets, this
    information can be used from the iptables set match, to change
    the matching behaviour. Jozsef required to add the extension
    infrastructure and moved the existing timeout support upon it.
    This also includes a change in net/sched/em_ipset to adapt it to
    the new extension structure.

    * Enhancements for performance boosting in nfnetlink_queue: Add new
    configuration flags that allows user-space to receive big packets (GRO)
    and to disable checksumming calculation. This were proposed by Eric
    Dumazet during the Netfilter Workshop 2013 in Copenhagen. Florian
    Westphal was kind enough to find the time to materialize the proposal.

    * A sparse fix from Simon, he noticed it in the SCTP NAT helper, the fix
    required a change in the interface of sctp_end_cksum.
    ====================

    Signed-off-by: David S. Miller

    David S. Miller
     
  • Add support for another ARM member of the R-Car family, R-Car M1A, also known as
    R8A77781 -- it will share the code with previously added R8A77790.

    Signed-off-by: Sergei Shtylyov
    Signed-off-by: David S. Miller

    Sergei Shtylyov
     
  • Signed-off-by: Stefan Bader
    Acked-by: Francois Romieu
    Cc: hayeswang
    Signed-off-by: David S. Miller

    Stefan Bader
     
  • Change the type of the crc32 parameter of sctp_end_cksum()
    from __be32 to __u32 to reflect that fact that it is passed
    to cpu_to_le32().

    There are five in-tree users of sctp_end_cksum().
    The following four had warnings flagged by sparse which are
    no longer present with this change.

    net/netfilter/ipvs/ip_vs_proto_sctp.c:sctp_nat_csum()
    net/netfilter/ipvs/ip_vs_proto_sctp.c:sctp_csum_check()
    net/sctp/input.c:sctp_rcv_checksum()
    net/sctp/output.c:sctp_packet_transmit()

    The fifth user is net/netfilter/nf_nat_proto_sctp.c:sctp_manip_pkt().
    It has been updated to pass a __u32 instead of a __be32,
    the value in question was already calculated in cpu byte-order.

    net/netfilter/nf_nat_proto_sctp.c:sctp_manip_pkt() has also
    been updated to assign the return value of sctp_end_cksum()
    directly to a variable of type __le32, matching the
    type of the return value. Previously the return value
    was assigned to a variable of type __be32 and then that variable
    was finally assigned to another variable of type __le32.

    Problems flagged by sparse.
    Compile and sparse tested only.

    Signed-off-by: Simon Horman
    Signed-off-by: Pablo Neira Ayuso

    Simon Horman
     
  • Userspace can now indicate that it can cope with larger-than-mtu sized
    packets and packets that have invalid ipv4/tcp checksums.

    Signed-off-by: Florian Westphal
    Signed-off-by: Pablo Neira Ayuso

    Florian Westphal
     
  • Once we allow userspace to receive gso/gro packets, userspace
    needs to be able to determine when checksums appear to be
    broken, but are not.

    NFQA_SKB_CSUMNOTREADY means 'checksums will be fixed in kernel
    later, pretend they are ok'.

    NFQA_SKB_GSO could be used for statistics, or to determine when
    packet size exceeds mtu.

    Signed-off-by: Florian Westphal
    Signed-off-by: Pablo Neira Ayuso

    Florian Westphal
     
  • skb_gso_segment is expensive, so it would be nice if we could
    avoid it in the future. However, userspace needs to be prepared
    to receive larger-than-mtu-packets (which will also have incorrect
    l3/l4 checksums), so we cannot simply remove it.

    The plan is to add a per-queue feature flag that userspace can
    set when binding the queue.

    The problem is that in nf_queue, we only have a queue number,
    not the queue context/configuration settings.

    This patch should have no impact other than the skb_gso_segment
    call now being in a function that has access to the queue config
    data.

    A new size attribute in nf_queue_entry is needed so
    nfnetlink_queue can duplicate the entry of the gso skb
    when segmenting the skb while also copying the route key.

    The follow up patch adds switch to disable skb_gso_segment when
    queue config says so.

    Signed-off-by: Florian Westphal
    Signed-off-by: Pablo Neira Ayuso

    Florian Westphal
     
  • required by future patch that will need to duplicate the
    nf_queue_entry, bumping refcounts of the copy.

    Signed-off-by: Florian Westphal
    Signed-off-by: Pablo Neira Ayuso

    Florian Westphal