1. 24 Mar, 2015 3 commits
    • Alexander Drozdov's avatar
      af_packet: pass checksum validation status to the user · 682f048b
      Alexander Drozdov authored
      Introduce TP_STATUS_CSUM_VALID tp_status flag to tell the
      af_packet user that at least the transport header checksum
      has been already validated.
      
      For now, the flag may be set for incoming packets only.
      Signed-off-by: default avatarAlexander Drozdov <al.drozdov@gmail.com>
      Cc: Willem de Bruijn <willemb@google.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      682f048b
    • Alexander Drozdov's avatar
      af_packet: make tpacket_rcv to not set status value before run_filter · 68c2e5de
      Alexander Drozdov authored
      It is just an optimization. We don't need the value of status variable
      if the packet is filtered.
      Signed-off-by: default avatarAlexander Drozdov <al.drozdov@gmail.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      68c2e5de
    • Fan Du's avatar
      inet: fix double request socket freeing · c6973669
      Fan Du authored
      Eric Hugne reported following error :
      
      I'm hitting this warning on latest net-next when i try to SSH into a machine
      with eth0 added to a bridge (but i think the problem is older than that)
      
      Steps to reproduce:
      node2 ~ # brctl addif br0 eth0
      [  223.758785] device eth0 entered promiscuous mode
      node2 ~ # ip link set br0 up
      [  244.503614] br0: port 1(eth0) entered forwarding state
      [  244.505108] br0: port 1(eth0) entered forwarding state
      node2 ~ # [  251.160159] ------------[ cut here ]------------
      [  251.160831] WARNING: CPU: 0 PID: 3 at include/net/request_sock.h:102 tcp_v4_err+0x6b1/0x720()
      [  251.162077] Modules linked in:
      [  251.162496] CPU: 0 PID: 3 Comm: ksoftirqd/0 Not tainted 4.0.0-rc3+ #18
      [  251.163334] Hardware name: Bochs Bochs, BIOS Bochs 01/01/2011
      [  251.164078]  ffffffff81a8365c ffff880038a6ba18 ffffffff8162ace4 0000000000009898
      [  251.165084]  0000000000000000 ffff880038a6ba58 ffffffff8104da85 ffff88003fa437c0
      [  251.166195]  ffff88003fa437c0 ffff88003fa74e00 ffff88003fa43bb8 ffff88003fad99a0
      [  251.167203] Call Trace:
      [  251.167533]  [<ffffffff8162ace4>] dump_stack+0x45/0x57
      [  251.168206]  [<ffffffff8104da85>] warn_slowpath_common+0x85/0xc0
      [  251.169239]  [<ffffffff8104db65>] warn_slowpath_null+0x15/0x20
      [  251.170271]  [<ffffffff81559d51>] tcp_v4_err+0x6b1/0x720
      [  251.171408]  [<ffffffff81630d03>] ? _raw_read_lock_irq+0x3/0x10
      [  251.172589]  [<ffffffff81534e20>] ? inet_del_offload+0x40/0x40
      [  251.173366]  [<ffffffff81569295>] icmp_socket_deliver+0x65/0xb0
      [  251.174134]  [<ffffffff815693a2>] icmp_unreach+0xc2/0x280
      [  251.174820]  [<ffffffff8156a82d>] icmp_rcv+0x2bd/0x3a0
      [  251.175473]  [<ffffffff81534ea2>] ip_local_deliver_finish+0x82/0x1e0
      [  251.176282]  [<ffffffff815354d8>] ip_local_deliver+0x88/0x90
      [  251.177004]  [<ffffffff815350f0>] ip_rcv_finish+0xf0/0x310
      [  251.177693]  [<ffffffff815357bc>] ip_rcv+0x2dc/0x390
      [  251.178336]  [<ffffffff814f5da3>] __netif_receive_skb_core+0x713/0xa20
      [  251.179170]  [<ffffffff814f7fca>] __netif_receive_skb+0x1a/0x80
      [  251.179922]  [<ffffffff814f97d4>] process_backlog+0x94/0x120
      [  251.180639]  [<ffffffff814f9612>] net_rx_action+0x1e2/0x310
      [  251.181356]  [<ffffffff81051267>] __do_softirq+0xa7/0x290
      [  251.182046]  [<ffffffff81051469>] run_ksoftirqd+0x19/0x30
      [  251.182726]  [<ffffffff8106cc23>] smpboot_thread_fn+0x153/0x1d0
      [  251.183485]  [<ffffffff8106cad0>] ? SyS_setgroups+0x130/0x130
      [  251.184228]  [<ffffffff8106935e>] kthread+0xee/0x110
      [  251.184871]  [<ffffffff81069270>] ? kthread_create_on_node+0x1b0/0x1b0
      [  251.185690]  [<ffffffff81631108>] ret_from_fork+0x58/0x90
      [  251.186385]  [<ffffffff81069270>] ? kthread_create_on_node+0x1b0/0x1b0
      [  251.187216] ---[ end trace c947fc7b24e42ea1 ]---
      [  259.542268] br0: port 1(eth0) entered forwarding state
      
      Remove the double calls to reqsk_put()
      
      [edumazet] :
      
      I got confused because reqsk_timer_handler() _has_ to call
      reqsk_put(req) after calling inet_csk_reqsk_queue_drop(), as
      the timer handler holds a reference on req.
      Signed-off-by: default avatarFan Du <fan.du@intel.com>
      Signed-off-by: default avatarEric Dumazet <edumazet@google.com>
      Reported-by: default avatarErik Hugne <erik.hugne@ericsson.com>
      Fixes: fa76ce73 ("inet: get rid of central tcp/dccp listener timer")
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      c6973669
  2. 23 Mar, 2015 26 commits
  3. 21 Mar, 2015 11 commits
    • Herbert Xu's avatar
      netlink: Remove netlink_compare_arg.trailer · 8f2ddaac
      Herbert Xu authored
      Instead of computing the offset from trailer, this patch computes
      netlink_compare_arg_len from the offset of portid and then adds 4
      to it.  This allows trailer to be removed.
      Reported-by: default avatarDavid Miller <davem@davemloft.net>
      Signed-off-by: default avatarHerbert Xu <herbert@gondor.apana.org.au>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      8f2ddaac
    • David S. Miller's avatar
      Merge branch 'netcp-next' · 69a3b16f
      David S. Miller authored
      Murali Karicheri says:
      
      ====================
      NetCP: Add support for version 1.5
      
      NetCP 1.5 is used in newer K2 SoCs from Texas Instruments
      such as K2E, K2L etc. This patch series add support for Ethss
      driver for this version of NetCP. While at it, fix couple of
      bugs in the original driver.
      
      One of the earlier patch "net: netcp: select davinci_mdio driver
      by default" is folded onto this series.
      
      Please review and let me know your comments.
      ====================
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      69a3b16f
    • WingMan Kwok's avatar
      net: netcp: ethss: enhancement to support NetCP 1.5 ethss · 9a391c7b
      WingMan Kwok authored
      NetCP 1.5 available on newer K2 SoCs such as K2E and K2L introduced 3
      variants of the ethss subsystem, 9 port, 5 port and 2 port. These have
      one host port towards the CPU and N external slave ports.
      
      To customize the driver for these new ethss sub systems, multiple
      compatibility strings are introduced. Currently some of parameters that
      are different on different variants such as number of ALE ports, stats
      modules and number of ports are defined through constants. These are now
      changed to variables in gbe_priv data that get set based on the
      compatibility string. This is required as there are no hardware
      identification registers available to distinguish among the variants
      of NetCP 1.5 ethss. However there is identification register available
      to differentiate between NetCP 1.4 vs NetCP 1.5 and the same is made use
      of in the code to differentiate them.
      
      For more reading on the details of this peripheral, please refer to the
      User Guide available at http://www.ti.com/lit/pdf/spruhz3Signed-off-by: default avatarMurali Karicheri <m-karicheri2@ti.com>
      Signed-off-by: default avatarWingMan Kwok <w-kwok2@ti.com>
      CC: "David S. Miller" <davem@davemloft.net>
      CC: Mugunthan V N <mugunthanvnm@ti.com>
      CC: "Lad, Prabhakar" <prabhakar.csengg@gmail.com>
      CC: Grygorii Strashko <grygorii.strashko@ti.com>
      CC: Christoph Jaeger <cj@linux.com>
      CC: Lokesh Vutla <lokeshvutla@ti.com>
      CC: Markus Pargmann <mpa@pengutronix.de>
      CC: Kumar Gala <galak@codeaurora.org>
      CC: Ian Campbell <ijc+devicetree@hellion.org.uk>
      CC: Mark Rutland <mark.rutland@arm.com>
      CC: Pawel Moll <pawel.moll@arm.com>
      CC: Rob Herring <robh+dt@kernel.org>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      9a391c7b
    • Karicheri, Muralidharan's avatar
      net: netcp: enclose macros in parentheses · da866ba0
      Karicheri, Muralidharan authored
      Fix following checkpatch error. It seems to have passed checkpatch
      last time when original code was introduced.
      
       ERROR: Macros with complex values should be enclosed in parentheses
       #172: FILE: drivers/net/ethernet/ti/netcp_ethss.c:869:
      Signed-off-by: default avatarMurali Karicheri <m-karicheri2@ti.com>
      Signed-off-by: default avatarWingMan Kwok <w-kwok2@ti.com>
      CC: "David S. Miller" <davem@davemloft.net>
      CC: Mugunthan V N <mugunthanvnm@ti.com>
      CC: "Lad, Prabhakar" <prabhakar.csengg@gmail.com>
      CC: Grygorii Strashko <grygorii.strashko@ti.com>
      CC: Christoph Jaeger <cj@linux.com>
      CC: Lokesh Vutla <lokeshvutla@ti.com>
      CC: Markus Pargmann <mpa@pengutronix.de>
      CC: Kumar Gala <galak@codeaurora.org>
      CC: Ian Campbell <ijc+devicetree@hellion.org.uk>
      CC: Mark Rutland <mark.rutland@arm.com>
      CC: Pawel Moll <pawel.moll@arm.com>
      CC: Rob Herring <robh+dt@kernel.org>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      da866ba0
    • Karicheri, Muralidharan's avatar
      net: netcp: select davinci_mdio driver by default · f49ae149
      Karicheri, Muralidharan authored
      Keystone netcp driver re-uses davinci mdio driver. So enable it
      by default for keystone netcp driver.
      Signed-off-by: default avatarMurali Karicheri <m-karicheri2@ti.com>
      Signed-off-by: default avatarWingMan Kwok <w-kwok2@ti.com>
      CC: "David S. Miller" <davem@davemloft.net>
      CC: Mugunthan V N <mugunthanvnm@ti.com>
      CC: "Lad, Prabhakar" <prabhakar.csengg@gmail.com>
      CC: Grygorii Strashko <grygorii.strashko@ti.com>
      CC: Christoph Jaeger <cj@linux.com>
      CC: Lokesh Vutla <lokeshvutla@ti.com>
      CC: Markus Pargmann <mpa@pengutronix.de>
      CC: Kumar Gala <galak@codeaurora.org>
      CC: Ian Campbell <ijc+devicetree@hellion.org.uk>
      CC: Mark Rutland <mark.rutland@arm.com>
      CC: Pawel Moll <pawel.moll@arm.com>
      CC: Rob Herring <robh+dt@kernel.org>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      f49ae149
    • Karicheri, Muralidharan's avatar
      net: netcp: use separate reg region for individual ethss modules · 21e0e0dd
      Karicheri, Muralidharan authored
      Ethss has multiple modules within the sub system
       - switch sub system
       - sgmii
       - mdio
       - switch module
      
      NetCP driver re-uses existing davinci mdio driver. It requires to
      have its own register region to map the reg space. So restructure
      the code to use separate reg region for the individual modules it
      manages. Use range property to define register space of NetCP and
      use reg property to define individual reg spaces. So MDIO will have
      its own reg space to map. This is a pre-requisite to enable MDIO
      driver for NetCP.
      Signed-off-by: default avatarMurali Karicheri <m-karicheri2@ti.com>
      Signed-off-by: default avatarWingMan Kwok <w-kwok2@ti.com>
      CC: "David S. Miller" <davem@davemloft.net>
      CC: Mugunthan V N <mugunthanvnm@ti.com>
      CC: "Lad, Prabhakar" <prabhakar.csengg@gmail.com>
      CC: Grygorii Strashko <grygorii.strashko@ti.com>
      CC: Christoph Jaeger <cj@linux.com>
      CC: Lokesh Vutla <lokeshvutla@ti.com>
      CC: Markus Pargmann <mpa@pengutronix.de>
      CC: Kumar Gala <galak@codeaurora.org>
      CC: Ian Campbell <ijc+devicetree@hellion.org.uk>
      CC: Mark Rutland <mark.rutland@arm.com>
      CC: Pawel Moll <pawel.moll@arm.com>
      CC: Rob Herring <robh+dt@kernel.org>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      21e0e0dd
    • Karicheri, Muralidharan's avatar
      net: netcp: fix forward port number usage for 10G ethss · e170f409
      Karicheri, Muralidharan authored
      10G switch requires forward port number in the taginfo field,
      where as it should be in packet_info field for necp 1.4 Ethss. So
      fill this value correctly in the knav dma descriptor.
      
      Also rename dma_psflags field in struct netcp_tx_pipe to switch_to_port
      as it contain no flag, but the switch port number for forwarding the
      packet. Add a flag to hold the new flag,  SWITCH_TO_PORT_IN_TAGINFO which
      will be set for 10G. This can also used in the future for other flags for
      the tx_pipe.
      Signed-off-by: default avatarMurali Karicheri <m-karicheri2@ti.com>
      Signed-off-by: default avatarWingMan Kwok <w-kwok2@ti.com>
      CC: "David S. Miller" <davem@davemloft.net>
      CC: Mugunthan V N <mugunthanvnm@ti.com>
      CC: "Lad, Prabhakar" <prabhakar.csengg@gmail.com>
      CC: Grygorii Strashko <grygorii.strashko@ti.com>
      CC: Christoph Jaeger <cj@linux.com>
      CC: Lokesh Vutla <lokeshvutla@ti.com>
      CC: Markus Pargmann <mpa@pengutronix.de>
      CC: Kumar Gala <galak@codeaurora.org>
      CC: Ian Campbell <ijc+devicetree@hellion.org.uk>
      CC: Mark Rutland <mark.rutland@arm.com>
      CC: Pawel Moll <pawel.moll@arm.com>
      CC: Rob Herring <robh+dt@kernel.org>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      e170f409
    • YOSHIFUJI Hideaki/吉藤英明's avatar
    • YOSHIFUJI Hideaki/吉藤英明's avatar
      net: neighbour: Add mcast_resolicit to configure the number of multicast... · 8da86466
      YOSHIFUJI Hideaki/吉藤英明 authored
      net: neighbour: Add mcast_resolicit to configure the number of multicast resolicitations in PROBE state.
      
      We send unicast neighbor (ARP or NDP) solicitations ucast_probes
      times in PROBE state.  Zhu Yanjun reported that some implementation
      does not reply against them and the entry will become FAILED, which
      is undesirable.
      
      We had been dealt with such nodes by sending multicast probes mcast_
      solicit times after unicast probes in PROBE state.  In 2003, I made
      a change not to send them to improve compatibility with IPv6 NDP.
      
      Let's introduce per-protocol per-interface sysctl knob "mcast_
      reprobe" to configure the number of multicast (re)solicitation for
      reconfirmation in PROBE state.  The default is 0, since we have
      been doing so for 10+ years.
      Reported-by: default avatarZhu Yanjun <Yanjun.Zhu@windriver.com>
      CC: Ulf Samuelsson <ulf.samuelsson@ericsson.com>
      Signed-off-by: default avatarYOSHIFUJI Hideaki <hideaki.yoshifuji@miraclelinux.com>
      Signed-off-by: default avatarYOSHIFUJI Hideaki <yoshfuji@linux-ipv6.org>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      8da86466
    • Rafał Miłecki's avatar
      bgmac: allow enabling on ARCH_BCM_5301X · fc300dc3
      Rafał Miłecki authored
      Home routers based on ARM SoCs like BCM4708 also have bcma bus with core
      supported by bgmac.
      Signed-off-by: default avatarRafał Miłecki <zajec5@gmail.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      fc300dc3
    • Rafał Miłecki's avatar
      bgmac: register fixed PHY for ARM BCM470X / BCM5301X chipsets · c25b23b8
      Rafał Miłecki authored
      On ARM SoCs with bgmac Ethernet hardware we don't have any normal PHY.
      There is always a switch attached but it's not even controlled over MDIO
      like in case of MIPS devices.
      We need a fixed PHY to be able to send/receive packets from the switch.
      Signed-off-by: default avatarRafał Miłecki <zajec5@gmail.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      c25b23b8