Skip to content
  1. Jan 12, 2016
  2. Jan 11, 2016
    • Alexander Kuleshov's avatar
      net/rtnetlink: remove unused sz_idx variable · 617cfc75
      Alexander Kuleshov authored
      
      
      The sz_idx variable is defined in the rtnetlink_rcv_msg(), but
      not used anywhere. Let's remove it.
      
      Signed-off-by: default avatarAlexander Kuleshov <kuleshovmail@gmail.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      617cfc75
    • Guenter Roeck's avatar
      net: bfin_mac: Use phy_find_first() instead of open-coding it · 713d4024
      Guenter Roeck authored
      
      
      Use phy_find_first() to find the first phy device instead of
      open-coding it.
      
      Cc: Andrew Lunn <andrew@lunn.ch>
      Signed-off-by: default avatarGuenter Roeck <linux@roeck-us.net>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      713d4024
    • David S. Miller's avatar
      Merge branch 'ovs-cleanups' · 50ee6382
      David S. Miller authored
      
      
      Jean Sacren says:
      
      ====================
      Trivial fix-ups for openvswitch
      
      This series does trivial fix-ups for openvswitch as follows:
      
      1) Clean up the leftover of the unused function.
      
      2) Fix up the twisted struct geneve_port member name.
      
      3) Update the kernel doc to reflect the changes in struct vport.
      ====================
      
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      50ee6382
    • Jean Sacren's avatar
      openvswitch: update kernel doc for struct vport · c5420eb1
      Jean Sacren authored
      commit be4ace6e
      
       ("openvswitch: Move dev pointer into vport itself")
      
      The commit above added @dev and moved @rcu to the bottom of struct
      vport, but the change was not reflected in the kernel doc. So let's
      update the kernel doc as well.
      
      Signed-off-by: default avatarJean Sacren <sakiwit@gmail.com>
      Cc: Thomas Graf <tgraf@suug.ch>
      Acked-by: default avatarThomas Graf <tgraf@suug.ch>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      c5420eb1
    • Jean Sacren's avatar
      openvswitch: fix struct geneve_port member name · 2f7066ad
      Jean Sacren authored
      commit 6b001e68
      
       ("openvswitch: Use Geneve device.")
      
      The commit above introduced 'port_no' as the name for the member of
      struct geneve_port. The correct name should be 'dst_port' as described
      in the kernel doc. Let's fix that member name and all the pertinent
      instances so that both doc and code would be consistent.
      
      Signed-off-by: default avatarJean Sacren <sakiwit@gmail.com>
      Acked-by: default avatarThomas Graf <tgraf@suug.ch>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      2f7066ad
    • Jean Sacren's avatar
      openvswitch: clean up unused function · 5ea03042
      Jean Sacren authored
      commit 6b001e68
      
       ("openvswitch: Use Geneve device.")
      
      The commit above deleted the only call site of ovs_tunnel_route_lookup()
      and now that function is not used any more. So let's delete the function
      definition as well.
      
      Signed-off-by: default avatarJean Sacren <sakiwit@gmail.com>
      Acked-by: default avatarThomas Graf <tgraf@suug.ch>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      5ea03042
    • Guenter Roeck's avatar
      net: ti: cpmac: Fix build error due to missed API change · 3c6396d6
      Guenter Roeck authored
      Commit 7f854420 ("phy: Add API for {un}registering an mdio device to
      a bus") introduces an API to access mii_bus structures, but missed to
      update the TI cpamc driver. This results in the following error message.
      
      drivers/net/ethernet/ti/cpmac.c: In function 'cpmac_probe':
      drivers/net/ethernet/ti/cpmac.c:1119:18: error:
      	'struct mii_bus' has no member named 'phy_map'
      
      Fixes: 7f854420
      
       ("phy: Add API for {un}registering an mdio device to a bus")
      Cc: Andrew Lunn <andrew@lunn.ch>
      Signed-off-by: default avatarGuenter Roeck <linux@roeck-us.net>
      Acked-by: default avatarAndrew Lunn <andrew@lunn.ch>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      3c6396d6
    • Guenter Roeck's avatar
      net: tc35815: Drop unused variable · e253e8fb
      Guenter Roeck authored
      Commit e7f4dc35 ("mdio: Move allocation of interrupts into core")
      removes some code from tc_mii_init(), but does not remove a now unused
      variable. This results in the following build warning.
      
      drivers/net/ethernet/toshiba/tc35815.c: In function 'tc_mii_init':
      drivers/net/ethernet/toshiba/tc35815.c:670:6: warning: unused variable 'i'
      
      Fixes: e7f4dc35
      
       ("mdio: Move allocation of interrupts into core")
      Cc: Andrew Lunn <andrew@lunn.ch>
      Acked-by: default avatarAndrew Lunn <andrew@lunn.ch>
      Signed-off-by: default avatarGuenter Roeck <linux@roeck-us.net>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      e253e8fb
    • Guenter Roeck's avatar
      net: tc35815: Fix build error due to missed API change · a05876b3
      Guenter Roeck authored
      Commit 7f854420 ("phy: Add API for {un}registering an mdio device to
      a bus") introduces an API to access mii_bus structures, but missed to
      update the tc35815 driver. This results in the following error message.
      
      drivers/net/ethernet/toshiba/tc35815.c: In function 'tc_mii_probe':
      drivers/net/ethernet/toshiba/tc35815.c:617:18: error:
      	'struct mii_bus' has no member named 'phy_map'
      drivers/net/ethernet/toshiba/tc35815.c:623:24: error:
      	'struct mii_bus' has no member named 'phy_map'
      
      Instead of looping over the list of phy addresses to find a phy chip,
      use phy_find_first(). While the intent of the original code was to return
      an error if more than one phy was specified, this code path was never
      executed because the loop aborted after finding the first phy. The
      original code is therefore semantically identical to phy_find_first(),
      thus it is simpler and more straightforward to use phy_find_first()
      directly.
      
      Fixes: 7f854420
      
       ("phy: Add API for {un}registering an mdio device to a bus")
      Cc: Andrew Lunn <andrew@lunn.ch>
      Signed-off-by: default avatarGuenter Roeck <linux@roeck-us.net>
      Acked-by: default avatarAndrew Lunn <andrew@lunn.ch>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      a05876b3
    • Joshua Henderson's avatar
      net: phy: Add support for SMSC LAN8740 PHY · 26706d43
      Joshua Henderson authored
      
      
      LAN8740 has a different phy_id than LAN8710/LAN8720.
      
      Signed-off-by: default avatarJoshua Henderson <joshua.henderson@microchip.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      26706d43
    • David S. Miller's avatar
      Merge tag 'wireless-drivers-next-for-davem-2016-01-09' of... · 7d7f5d04
      David S. Miller authored
      Merge tag 'wireless-drivers-next-for-davem-2016-01-09' of git://git.kernel.org/pub/scm/linux/kernel/git/kvalo/wireless-drivers-next
      
      
      
      Kalle Valo says:
      
      ====================
      brcmfmac
      
      * query features through firmware command
      * ARP offload through inet notifier
      * force probe to succeed for debugging purposes
      * random mac support for scheduled scan
      * support wowl upon net detect
      
      iwlwifi
      
      * bug fixes and improvements for firmware debug system
      * advertise support for Rx A-MSDU in A-MPDU
      * support -20.ucode
      * fix WoWLAN for iwldvm
      * preparations towards multiple Rx queues
      * platform power improvements for GO mode when no clients are associated
      ====================
      
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      7d7f5d04
    • Eric Dumazet's avatar
      net: add scheduling point in recvmmsg/sendmmsg · a78cb84c
      Eric Dumazet authored
      
      
      Applications often have to reduce number of datagrams
      they receive or send per system call to avoid starvation problems.
      
      Really the kernel should take care of this by using cond_resched(),
      so that applications can experiment bigger batch sizes.
      
      Signed-off-by: default avatarEric Dumazet <edumazet@google.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      a78cb84c
    • Lubomir Rintel's avatar
      ipv6: always add flag an address that failed DAD with DADFAILED · 3d171f39
      Lubomir Rintel authored
      
      
      The userspace needs to know why is the address being removed so that it can
      perhaps obtain a new address.
      
      Without the DADFAILED flag it's impossible to distinguish removal of a
      temporary and tentative address due to DAD failure from other reasons (device
      removed, manual address removal).
      
      Signed-off-by: default avatarLubomir Rintel <lkundrak@v3.sk>
      Acked-by: default avatarHannes Frederic Sowa <hannes@stressinduktion.org>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      3d171f39
    • Fabio Estevam's avatar
      net: lpc_eth: Remove unused variables · 541b8e29
      Fabio Estevam authored
      Commit e7f4dc35
      
       ("mdio: Move allocation of interrupts into core")
      introduced the following build warnings:
      
      drivers/net/ethernet/nxp/lpc_eth.c: In function 'lpc_mii_init':
      drivers/net/ethernet/nxp/lpc_eth.c:865:1: warning: label 'err_out_1' defined but not used [-Wunused-label]
      drivers/net/ethernet/nxp/lpc_eth.c:826:20: warning: unused variable 'i' [-Wunused-variable]
      
      Remove the unused variables to fix them.
      
      Reported-by: default avatarOlof's autobuilder <build@lixom.net>
      Signed-off-by: default avatarFabio Estevam <fabio.estevam@nxp.com>
      Acked-by: default avatarAndrew Lunn <andrew@lunn.ch>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      541b8e29
    • Sudip Mukherjee's avatar
      bfin_mac: fix error path · fdffd2e8
      Sudip Mukherjee authored
      While building blackfin defconfig we were getting a build warning:
      warning: label 'out_err_irq_alloc' defined but not used.
      
      Commit e7f4dc35 ("mdio: Move allocation of interrupts into core")
      removed the label out_err_mdiobus_register but then mistakenly jumped to
      out_err_alloc. But it was actually supposed to jump to out_err_irq_alloc.
      
      Fixes: e7f4dc35
      
       ("mdio: Move allocation of interrupts into core")
      Cc: Andrew Lunn <andrew@lunn.ch>
      Signed-off-by: default avatarSudip Mukherjee <sudip@vectorindia.org>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      fdffd2e8
    • Sudip Mukherjee's avatar
      phy: fix blackfin build failure · 053842a8
      Sudip Mukherjee authored
      The build of blackfin defconfig is failing with the error:
      error: 'struct mii_bus' has no member named 'phy_map'
      
      A new API mdiobus_get_phy() was introduced and phy_map was removed but
      it was not changed here.
      
      Fixes: 7f854420
      
       ("phy: Add API for {un}registering an mdio device to a bus.")
      Cc: Andrew Lunn <andrew@lunn.ch>
      Signed-off-by: default avatarSudip Mukherjee <sudip@vectorindia.org>
      Acked-by: default avatarAndrew Lunn <andrew@lunn.ch>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      053842a8
    • Hariprasad Shenai's avatar
      cxgb4: Fixes static checker warning in mps_tcam_show() · 89e7a154
      Hariprasad Shenai authored
      The commit 115b56af
      
       ("cxgb4: Update mps_tcam output to include T6
      fields") from Dec 23, 2015, leads to the following static checker
      warning:
      
              drivers/net/ethernet/chelsio/cxgb4/cxgb4_debugfs.c:1735
      mps_tcam_show()
              warn: we tested 'lookup_type' before and it was 'true'
      
      Fixing it.
      
      Reported-by: default avatarDan Carpenter <dan.carpenter@oracle.com>
      Signed-off-by: default avatarHariprasad Shenai <hariprasad@chelsio.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      89e7a154
    • David S. Miller's avatar
      Merge branch 'emac-RK3036' · 1f76f731
      David S. Miller authored
      
      
      Xing Zheng says:
      
      ====================
      Add support emac for the RK3036 SoC platform
      
        We have supported the emac for RK3066/RK3188, but the RK3036 have
      some configuration different with them. We should let the driver of
      emac_rockchip compatible with other Rockchip SoCs.
      
      Changes in v2:
      - Separate DTS from patch series.
      ====================
      
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      1f76f731
    • Xing Zheng's avatar
      net: ethernet: arc: Add support emac for RK3036 · af72261f
      Xing Zheng authored
      
      
      The RK3036's GRFs offset are different with RK3066/RK3188, and need to set
      mac TX/RX clock before probe emac.
      
      Signed-off-by: default avatarXing Zheng <zhengxing@rock-chips.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      af72261f
    • Xing Zheng's avatar
      net: ethernet: arc: Keep emac compatibility for more Rockchip SoCs · f4c9d3ee
      Xing Zheng authored
      
      
      On the RK3066/RK3188, there was fixed GRF offset configuration to set emac
      and fixed DIV2 mac TX/RX clock. So, we need to easily set and fit to other
      SoCs (RK3036) which maybe have different GRF offset, and need adjust mac
      TX/RX clock.
      
      Signed-off-by: default avatarXing Zheng <zhengxing@rock-chips.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      f4c9d3ee
    • Xing Zheng's avatar
      net: ethernet: arc: Probe emac after set RMII clock · c9bca2fe
      Xing Zheng authored
      
      
      After enter arc_emac_probe, emac will get_phy_id, phy_poll_reset and
      other connecting PHY via mdiobus_read, so we need to set correct
      ref clock rate for emac before probe emac.
      
      Signed-off-by: default avatarXing Zheng <zhengxing@rock-chips.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      c9bca2fe
    • David S. Miller's avatar
      Merge branch 'bnxt_en-zeropad-fw-and-reset' · 0652cb5b
      David S. Miller authored
      
      
      Michael Chan says:
      
      ====================
      bnxt_en: Zero pad fw messages and add fw reset.
      
      2 patches related to firmware for net-next.
      ====================
      
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      0652cb5b
    • Rob Swindell's avatar
      bnxt_en: Reset embedded processor after applying firmware upgrade · d2d6318c
      Rob Swindell authored
      
      
      Use HWRM_FW_RESET command to request a self-reset of the embedded
      processor(s) after successfully applying a firmware update. For boot
      processor, the self-reset is currently deferred until the next PCIe reset.
      
      Signed-off-by: default avatarRob Swindell <swindell@broadcom.com>
      Signed-off-by: default avatarMichael Chan <mchan@broadcom.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      d2d6318c
    • Michael Chan's avatar
      bnxt_en: Zero pad firmware messages to 128 bytes. · d79979a1
      Michael Chan authored
      
      
      For future compatibility, zero pad all messages that the driver sends
      to the firmware to 128 bytes.  If these messages are extended in the
      future with new byte enables, zero padding these messages now will
      guarantee future compatibility.
      
      Signed-off-by: default avatarMichael Chan <mchan@broadcom.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      d79979a1
    • Daniel Borkmann's avatar
      net, sched: add clsact qdisc · 1f211a1b
      Daniel Borkmann authored
      This work adds a generalization of the ingress qdisc as a qdisc holding
      only classifiers. The clsact qdisc works on ingress, but also on egress.
      In both cases, it's execution happens without taking the qdisc lock, and
      the main difference for the egress part compared to prior version of [1]
      is that this can be applied with _any_ underlying real egress qdisc (also
      classless ones).
      
      Besides solving the use-case of [1], that is, allowing for more programmability
      on assigning skb->priority for the mqprio case that is supported by most
      popular 10G+ NICs, it also opens up a lot more flexibility for other tc
      applications. The main work on classification can already be done at clsact
      egress time if the use-case allows and state stored for later retrieval
      f.e. again in skb->priority with major/minors (which is checked by most
      classful qdiscs before consulting tc_classify()) and/or in other skb fields
      like skb->tc_index for some light-weight post-processing to get to the
      eventual classid in case of a classful qdisc. Another use case is that
      the clsact egress part allows to have a central egress counterpart to
      the ingress classifiers, so that classifiers can easily share state (e.g.
      in cls_bpf via eBPF maps) for ingress and egress.
      
      Currently, default setups like mq + pfifo_fast would require for this to
      use, for example, prio qdisc instead (to get a tc_classify() run) and to
      duplicate the egress classifier for each queue. With clsact, it allows
      for leaving the setup as is, it can additionally assign skb->priority to
      put the skb in one of pfifo_fast's bands and it can share state with maps.
      Moreover, we can access the skb's dst entry (f.e. to retrieve tclassid)
      w/o the need to perform a skb_dst_force() to hold on to it any longer. In
      lwt case, we can also use this facility to setup dst metadata via cls_bpf
      (bpf_skb_set_tunnel_key()) without needing a real egress qdisc just for
      that (case of IFF_NO_QUEUE devices, for example).
      
      The realization can be done without any changes to the scheduler core
      framework. All it takes is that we have two a-priori defined minors/child
      classes, where we can mux between ingress and egress classifier list
      (dev->ingress_cl_list and dev->egress_cl_list, latter stored close to
      dev->_tx to avoid extra cacheline miss for moderate loads). The egress
      part is a bit similar modelled to handle_ing() and patched to a noop in
      case the functionality is not used. Both handlers are now called
      sch_handle_ingress() and sch_handle_egress(), code sharing among the two
      doesn't seem practical as there are various minor differences in both
      paths, so that making them conditional in a single handler would rather
      slow things down.
      
      Full compatibility to ingress qdisc is provided as well. Since both
      piggyback on TC_H_CLSACT, only one of them (ingress/clsact) can exist
      per netdevice, and thus ingress qdisc specific behaviour can be retained
      for user space. This means, either a user does 'tc qdisc add dev foo ingress'
      and configures ingress qdisc as usual, or the 'tc qdisc add dev foo clsact'
      alternative, where both, ingress and egress classifier can be configured
      as in the below example. ingress qdisc supports attaching classifier to any
      minor number whereas clsact has two fixed minors for muxing between the
      lists, therefore to not break user space setups, they are better done as
      two separate qdiscs.
      
      I decided to extend the sch_ingress module with clsact functionality so
      that commonly used code can be reused, the module is being aliased with
      sch_clsact so that it can be auto-loaded properly. Alternative would have been
      to add a flag when initializing ingress to alter its behaviour plus aliasing
      to a different name (as it's more than just ingress). However, the first would
      end up, based on the flag, choosing the new/old behaviour by calling different
      function implementations to handle each anyway, the latter would require to
      register ingress qdisc once again under different alias. So, this really begs
      to provide a minimal, cleaner approach to have Qdisc_ops and Qdisc_class_ops
      by its own that share callbacks used by both.
      
      Example, adding qdisc:
      
         # tc qdisc add dev foo clsact
         # tc qdisc show dev foo
         qdisc mq 0: root
         qdisc pfifo_fast 0: parent :1 bands 3 priomap  1 2 2 2 1 2 0 0 1 1 1 1 1 1 1 1
         qdisc pfifo_fast 0: parent :2 bands 3 priomap  1 2 2 2 1 2 0 0 1 1 1 1 1 1 1 1
         qdisc pfifo_fast 0: parent :3 bands 3 priomap  1 2 2 2 1 2 0 0 1 1 1 1 1 1 1 1
         qdisc pfifo_fast 0: parent :4 bands 3 priomap  1 2 2 2 1 2 0 0 1 1 1 1 1 1 1 1
         qdisc clsact ffff: parent ffff:fff1
      
      Adding filters (deleting, etc works analogous by specifying ingress/egress):
      
         # tc filter add dev foo ingress bpf da obj bar.o sec ingress
         # tc filter add dev foo egress  bpf da obj bar.o sec egress
         # tc filter show dev foo ingress
         filter protocol all pref 49152 bpf
         filter protocol all pref 49152 bpf handle 0x1 bar.o:[ingress] direct-action
         # tc filter show dev foo egress
         filter protocol all pref 49152 bpf
         filter protocol all pref 49152 bpf handle 0x1 bar.o:[egress] direct-action
      
      A 'tc filter show dev foo' or 'tc filter show dev foo parent ffff:' will
      show an empty list for clsact. Either using the parent names (ingress/egress)
      or specifying the full major/minor will then show the related filter lists.
      
      Prior work on a mqprio prequeue() facility [1] was done mainly by John Fastabend.
      
        [1] http://patchwork.ozlabs.org/patch/512949/
      
      
      
      Signed-off-by: default avatarDaniel Borkmann <daniel@iogearbox.net>
      Acked-by: default avatarJohn Fastabend <john.r.fastabend@intel.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      1f211a1b