1. 31 Aug, 2016 14 commits
    • Julia Lawall's avatar
      dwc_eth_qos: constify ethtool_ops structures · 777065e5
      Julia Lawall authored
      Check for ethtool_ops structures that are only stored in the ethtool_ops
      field of a net_device structure or passed as the second argument to
      netdev_set_default_ethtool_ops.  These contexts are declared const, so
      ethtool_ops structures that have these properties can be declared as const
      also.
      
      The semantic patch that makes this change is as follows:
      (http://coccinelle.lip6.fr/)
      
      // <smpl>
      @r disable optional_qualifier@
      identifier i;
      position p;
      @@
      static struct ethtool_ops i@p = { ... };
      
      @ok1@
      identifier r.i;
      struct net_device e;
      position p;
      @@
      e.ethtool_ops = &i@p;
      
      @ok2@
      identifier r.i;
      expression e;
      position p;
      @@
      netdev_set_default_ethtool_ops(e, &i@p)
      
      @bad@
      position p != {r.p,ok1.p,ok2.p};
      identifier r.i;
      @@
      i@p
      
      @depends on !bad disable optional_qualifier@
      identifier r.i;
      @@
      static
      +const
       struct ethtool_ops i = { ... };
      // </smpl>
      Signed-off-by: default avatarJulia Lawall <Julia.Lawall@lip6.fr>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      777065e5
    • Julia Lawall's avatar
      net: hisilicon: constify ethtool_ops structures · bc6f0136
      Julia Lawall authored
      Check for ethtool_ops structures that are only stored in the ethtool_ops
      field of a net_device structure or passed as the second argument to
      netdev_set_default_ethtool_ops.  These contexts are declared const, so
      ethtool_ops structures that have these properties can be declared as const
      also.
      
      The semantic patch that makes this change is as follows:
      (http://coccinelle.lip6.fr/)
      
      // <smpl>
      @r disable optional_qualifier@
      identifier i;
      position p;
      @@
      static struct ethtool_ops i@p = { ... };
      
      @ok1@
      identifier r.i;
      struct net_device e;
      position p;
      @@
      e.ethtool_ops = &i@p;
      
      @ok2@
      identifier r.i;
      expression e;
      position p;
      @@
      netdev_set_default_ethtool_ops(e, &i@p)
      
      @bad@
      position p != {r.p,ok1.p,ok2.p};
      identifier r.i;
      @@
      i@p
      
      @depends on !bad disable optional_qualifier@
      identifier r.i;
      @@
      static
      +const
       struct ethtool_ops i = { ... };
      // </smpl>
      Signed-off-by: default avatarJulia Lawall <Julia.Lawall@lip6.fr>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      bc6f0136
    • Julia Lawall's avatar
      net: bcmgenet: constify ethtool_ops structures · 70591ab9
      Julia Lawall authored
      Check for ethtool_ops structures that are only stored in the ethtool_ops
      field of a net_device structure or passed as the second argument to
      netdev_set_default_ethtool_ops.  These contexts are declared const, so
      ethtool_ops structures that have these properties can be declared as const
      also.
      
      The semantic patch that makes this change is as follows:
      (http://coccinelle.lip6.fr/)
      
      // <smpl>
      @r disable optional_qualifier@
      identifier i;
      position p;
      @@
      static struct ethtool_ops i@p = { ... };
      
      @ok1@
      identifier r.i;
      struct net_device e;
      position p;
      @@
      e.ethtool_ops = &i@p;
      
      @ok2@
      identifier r.i;
      expression e;
      position p;
      @@
      netdev_set_default_ethtool_ops(e, &i@p)
      
      @bad@
      position p != {r.p,ok1.p,ok2.p};
      identifier r.i;
      @@
      i@p
      
      @depends on !bad disable optional_qualifier@
      identifier r.i;
      @@
      static
      +const
       struct ethtool_ops i = { ... };
      // </smpl>
      Signed-off-by: default avatarJulia Lawall <Julia.Lawall@lip6.fr>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      70591ab9
    • Julia Lawall's avatar
      net: ethernet: et131x: constify ethtool_ops structures · 1eff7002
      Julia Lawall authored
      Check for ethtool_ops structures that are only stored in the ethtool_ops
      field of a net_device structure or passed as the second argument to
      netdev_set_default_ethtool_ops.  These contexts are declared const, so
      ethtool_ops structures that have these properties can be declared as const
      also.
      
      The semantic patch that makes this change is as follows:
      (http://coccinelle.lip6.fr/)
      
      // <smpl>
      @r disable optional_qualifier@
      identifier i;
      position p;
      @@
      static struct ethtool_ops i@p = { ... };
      
      @ok1@
      identifier r.i;
      struct net_device e;
      position p;
      @@
      e.ethtool_ops = &i@p;
      
      @ok2@
      identifier r.i;
      expression e;
      position p;
      @@
      netdev_set_default_ethtool_ops(e, &i@p)
      
      @bad@
      position p != {r.p,ok1.p,ok2.p};
      identifier r.i;
      @@
      i@p
      
      @depends on !bad disable optional_qualifier@
      identifier r.i;
      @@
      static
      +const
       struct ethtool_ops i = { ... };
      // </smpl>
      Signed-off-by: default avatarJulia Lawall <Julia.Lawall@lip6.fr>
      Acked-by: default avatarMark Einon <mark.einon@gmail.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      1eff7002
    • Arnd Bergmann's avatar
      qede: hide 32-bit compile warning · 84fd1b19
      Arnd Bergmann authored
      The addition of the per-queue statistics introduced a harmless warning
      on all 32-bit architectures:
      
      drivers/net/ethernet/qlogic/qede/qede_ethtool.c: In function 'qede_get_ethtool_stats':
      drivers/net/ethernet/qlogic/qede/qede_ethtool.c:244:31: error: cast from pointer to integer of different size [-Werror=pointer-to-int-cast]
            buf[cnt++] = QEDE_TQSTATS_DATA(edev,
                                     ^
      drivers/net/ethernet/qlogic/qede/qede_ethtool.c:244:22: error: cast to pointer from integer of different size [-Werror=int-to-pointer-cast]
            buf[cnt++] = QEDE_TQSTATS_DATA(edev,
                            ^
      This changes the cast to 'void *' to shut up the warning, which
      avoids the assumptions on the size of the pointer type.
      Signed-off-by: default avatarArnd Bergmann <arnd@arndb.de>
      Fixes: 68db9ec2 ("qede: Add support for per-queue stats.")
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      84fd1b19
    • Arnd Bergmann's avatar
      ravb: avoid unused function warnings · 1ddcf41f
      Arnd Bergmann authored
      When CONFIG_PM_SLEEP is disabled, we get a couple of harmless warnings:
      
      drivers/net/ethernet/renesas/ravb_main.c:2117:12: error: 'ravb_resume' defined but not used [-Werror=unused-function]
      drivers/net/ethernet/renesas/ravb_main.c:2104:12: error: 'ravb_suspend' defined but not used [-Werror=unused-function]
      
      The simplest solution here is to replace the #ifdef with __maybe_unused
      annotations, which lets the compiler do the right thing by itself.
      Signed-off-by: default avatarArnd Bergmann <arnd@arndb.de>
      Fixes: 0184165b ("ravb: add sleep PM suspend/resume support")
      Acked-by: default avatarSergei Shtylyov <sergei.shtylyov@cogentembedded.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      1ddcf41f
    • David S. Miller's avatar
      Merge branch 'mpls-fragmentation-and-gso-fixes' · 7ba9d103
      David S. Miller authored
      David Ahern says:
      
      ====================
      net: mpls: fragmentation and gso fixes for locally originated traffic
      
      This series fixes mtu and fragmentation for tunnels using lwtunnel
      output redirect, and fixes GSO for MPLS for locally originated traffic
      reported by Lennert Buytenhek.
      
      A follow on series will address fragmentation and GSO for forwarded
      MPLS traffic. Hardware offload of GSO with MPLS also needs to be
      addressed.
      
      Simon: Can you verify this works with OVS for single and multiple
             labels?
      
      v4
      - more updates to mpls_gso_segment per Alex's comments (thanks, Alex)
      - updates to teaching OVS about marking MPLS labels as the network header
      
      v3
      - updates to mpls_gso_segment per Alex's comments
      - dropped skb->encapsulation = 1 from mpls_xmit per Alex's comment
      
      v2
      - consistent use of network_header in skb to fix GSO for MPLS
      - update MPLS code in OVS to network_header and inner_network_header
      ====================
      Tested-by: default avatarSimon Horman <simon.horman@netronome.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      7ba9d103
    • David Ahern's avatar
      net: veth: Set features for MPLS · 607fca9a
      David Ahern authored
      veth does not really transmit packets only moves the skb from one
      netdev to another so gso and checksum is not really needed. Add
      the features to mpls_features to get the same benefit and performance
      with MPLS as without it.
      Reported-by: default avatarLennert Buytenhek <buytenh@wantstofly.org>
      Signed-off-by: default avatarDavid Ahern <dsa@cumulusnetworks.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      607fca9a
    • David Ahern's avatar
      net: mpls: Fixups for GSO · 48d2ab60
      David Ahern authored
      As reported by Lennert the MPLS GSO code is failing to properly segment
      large packets. There are a couple of problems:
      
      1. the inner protocol is not set so the gso segment functions for inner
         protocol layers are not getting run, and
      
      2  MPLS labels for packets that use the "native" (non-OVS) MPLS code
         are not properly accounted for in mpls_gso_segment.
      
      The MPLS GSO code was added for OVS. It is re-using skb_mac_gso_segment
      to call the gso segment functions for the higher layer protocols. That
      means skb_mac_gso_segment is called twice -- once with the network
      protocol set to MPLS and again with the network protocol set to the
      inner protocol.
      
      This patch sets the inner skb protocol addressing item 1 above and sets
      the network_header and inner_network_header to mark where the MPLS labels
      start and end. The MPLS code in OVS is also updated to set the two
      network markers.
      
      >From there the MPLS GSO code uses the difference between the network
      header and the inner network header to know the size of the MPLS header
      that was pushed. It then pulls the MPLS header, resets the mac_len and
      protocol for the inner protocol and then calls skb_mac_gso_segment
      to segment the skb.
      
      Afterward the inner protocol segmentation is done the skb protocol
      is set to mpls for each segment and the network and mac headers
      restored.
      Reported-by: default avatarLennert Buytenhek <buytenh@wantstofly.org>
      Signed-off-by: default avatarDavid Ahern <dsa@cumulusnetworks.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      48d2ab60
    • Roopa Prabhu's avatar
      net: lwtunnel: Handle fragmentation · 14972cbd
      Roopa Prabhu authored
      Today mpls iptunnel lwtunnel_output redirect expects the tunnel
      output function to handle fragmentation. This is ok but can be
      avoided if we did not do the mpls output redirect too early.
      ie we could wait until ip fragmentation is done and then call
      mpls output for each ip fragment.
      
      To make this work we will need,
      1) the lwtunnel state to carry encap headroom
      2) and do the redirect to the encap output handler on the ip fragment
      (essentially do the output redirect after fragmentation)
      
      This patch adds tunnel headroom in lwtstate to make sure we
      account for tunnel data in mtu calculations during fragmentation
      and adds new xmit redirect handler to redirect to lwtunnel xmit func
      after ip fragmentation.
      
      This includes IPV6 and some mtu fixes and testing from David Ahern.
      Signed-off-by: default avatarRoopa Prabhu <roopa@cumulusnetworks.com>
      Signed-off-by: default avatarDavid Ahern <dsa@cumulusnetworks.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      14972cbd
    • Eric Dumazet's avatar
      net: batch calls to flush_all_backlogs() · 41852497
      Eric Dumazet authored
      After commit 145dd5f9 ("net: flush the softnet backlog in process
      context"), we can easily batch calls to flush_all_backlogs() for all
      devices processed in rollback_registered_many()
      
      Tested:
      
      Before patch, on an idle host.
      
      modprobe dummy numdummies=10000
      perf stat -e context-switches -a rmmod dummy
      
       Performance counter stats for 'system wide':
      
               1,211,798      context-switches
      
             1.302137465 seconds time elapsed
      
      After patch:
      
      perf stat -e context-switches -a rmmod dummy
      
       Performance counter stats for 'system wide':
      
                 225,523      context-switches
      
             0.721623566 seconds time elapsed
      Signed-off-by: default avatarEric Dumazet <edumazet@google.com>
      Acked-by: default avatarHannes Frederic Sowa <hannes@stressinduktion.org>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      41852497
    • Mark Rustad's avatar
      ixgbe: Eliminate useless message and improve logic · ae3cb8cb
      Mark Rustad authored
      Remove a useless log message and improve the logic for setting
      a PHY address from the contents of the MNG_IF_SEL register.
      Signed-off-by: default avatarMark Rustad <mark.d.rustad@intel.com>
      Tested-by: default avatarAndrew Bowers <andrewx.bowers@intel.com>
      Signed-off-by: default avatarJeff Kirsher <jeffrey.t.kirsher@intel.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      ae3cb8cb
    • David S. Miller's avatar
      Merge tag 'rxrpc-rewrite-20160830-1' of... · 792438e5
      David S. Miller authored
      Merge tag 'rxrpc-rewrite-20160830-1' of git://git.kernel.org/pub/scm/linux/kernel/git/dhowells/linux-fs
      
      David Howells says:
      
      ====================
      rxrpc: Preparation for removal of use of skbs from AFS
      
      Here's a set of patches that prepare the way for the removal of the use of
      sk_buffs from fs/afs (they'll be entirely retained within net/rxrpc):
      
       (1) Fix a potential NULL-pointer deref in rxrpc_abort_calls().
      
       (2) Condense all the terminal call state machine states to a single one
           plus supplementary info.
      
       (3) Add a trace point for rxrpc call usage debugging.
      
       (4) Cleanups and missing headers.
      
       (5) Provide a way for AFS to ask about a call's peer address without
           having an sk_buff to query.
      
       (6) Use call->peer directly rather than going via call->conn (which might
           be NULL).
      
       (7) Pass struct socket * to various rxrpc kernel interface functions so
           they can use that directly rather than getting it from the rxrpc_call
           struct.
      ====================
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      792438e5
    • Colin Ian King's avatar
      drivers: net: stmmac: fix spelling mistake "mulitcast" -> "multicast" · cf4d13fe
      Colin Ian King authored
      Trivial fix to spelling mistake in dev_warn message.
      Signed-off-by: default avatarColin Ian King <colin.king@canonical.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      cf4d13fe
  2. 30 Aug, 2016 11 commits
  3. 29 Aug, 2016 15 commits