1. 14 5月, 2015 2 次提交
  2. 13 5月, 2015 13 次提交
  3. 02 5月, 2015 1 次提交
  4. 30 4月, 2015 1 次提交
    • N
      bridge/nl: remove wrong use of NLM_F_MULTI · 46c264da
      Nicolas Dichtel 提交于
      NLM_F_MULTI must be used only when a NLMSG_DONE message is sent. In fact,
      it is sent only at the end of a dump.
      
      Libraries like libnl will wait forever for NLMSG_DONE.
      
      Fixes: e5a55a89 ("net: create generic bridge ops")
      Fixes: 815cccbf ("ixgbe: add setlink, getlink support to ixgbe and ixgbevf")
      CC: John Fastabend <john.r.fastabend@intel.com>
      CC: Sathya Perla <sathya.perla@emulex.com>
      CC: Subbu Seetharaman <subbu.seetharaman@emulex.com>
      CC: Ajit Khaparde <ajit.khaparde@emulex.com>
      CC: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
      CC: intel-wired-lan@lists.osuosl.org
      CC: Jiri Pirko <jiri@resnulli.us>
      CC: Scott Feldman <sfeldma@gmail.com>
      CC: Stephen Hemminger <stephen@networkplumber.org>
      CC: bridge@lists.linux-foundation.org
      Signed-off-by: NNicolas Dichtel <nicolas.dichtel@6wind.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      46c264da
  5. 17 4月, 2015 1 次提交
  6. 25 3月, 2015 1 次提交
  7. 19 3月, 2015 1 次提交
  8. 17 3月, 2015 1 次提交
  9. 16 3月, 2015 1 次提交
  10. 10 3月, 2015 1 次提交
  11. 07 3月, 2015 3 次提交
  12. 06 3月, 2015 1 次提交
    • S
      rocker: implement IPv4 fib offloading · c1beeef7
      Scott Feldman 提交于
      The driver implements ndo_switch_fib_ipv4_add/del ops to add/del/mod IPv4
      routes to/from switchdev device.  Once a route is added to the device, and the
      route's nexthops are resolved to neighbor MAC address, the device will forward
      matching pkts rather than the kernel.  This offloads the L3 forwarding path
      from the kernel to the device.  Note that control and management planes are
      still mananged by Linux; only the data plane is offloaded.  Standard routing
      control protocols such as OSPF and BGP run on Linux and manage the kernel's FIB
      via standard rtm netlink msgs...nothing changes here.
      
      A new hash table is added to rocker to track neighbors.  The driver listens for
      neighbor updates events using netevent notifier NETEVENT_NEIGH_UPDATE.  Any ARP
      table updates for ports on this device are recorded in this table.  Routes
      installed to the device with nexthops that reference neighbors in this table
      are "qualified".  In the case of a route with nexthops not resolved in the
      table, the kernel is asked to resolve the nexthop.
      
      The driver uses fib_info->fib_priority for the priority field in rocker's
      unicast routing table.
      
      The device can only forward to pkts matching route dst to resolved nexthops.
      Currently, the device only supports single-path routes (i.e. routes with one
      nexthop).  Equal Cost Multipath (ECMP) route support will be added in followup
      patches.
      
      This patch is driver support for unicast IPv4 routing only.  Followup patches
      will add driver and infrastructure for IPv6 routing and multicast routing.
      Signed-off-by: NScott Feldman <sfeldma@gmail.com>
      Signed-off-by: NJiri Pirko <jiri@resnulli.us>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      c1beeef7
  13. 28 2月, 2015 2 次提交
  14. 27 2月, 2015 3 次提交
  15. 02 2月, 2015 3 次提交
  16. 18 1月, 2015 3 次提交
    • D
      net: rocker: Add basic netdev counters - v2 · f2bbca51
      David Ahern 提交于
      Add packet and byte counters for RX and TX paths.
      
      $ ifconfig eth1
      eth1: flags=4163<UP,BROADCAST,RUNNING,MULTICAST>  mtu 1500
              inet6 fe80::5054:ff:fe12:3501  prefixlen 64  scopeid 0x20<link>
              ether 52:54:00:12:35:01  txqueuelen 1000  (Ethernet)
              RX packets 63  bytes 15813 (15.4 KiB)
              RX errors 1  dropped 0  overruns 0  frame 0
              TX packets 79  bytes 17991 (17.5 KiB)
              TX errors 7  dropped 0 overruns 0  carrier 0  collisions 0
      
      Rx / Tx errors tested by injecting faults in qemu's hardware model for Rocker.
      
      v2:
      - moved counter locations to avoid potential use after free per Florian's comment
      Signed-off-by: NDavid Ahern <dsahern@gmail.com>
      Cc: Scott Feldman <sfeldma@gmail.com>
      Cc: Jiri Pirko <jiri@resnulli.us>
      Signed-off-by: NScott Feldman <sfeldma@gmail.com>
      Acked-by: NJiri Pirko <jiri@resnulli.us>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      f2bbca51
    • J
      netlink: make nlmsg_end() and genlmsg_end() void · 053c095a
      Johannes Berg 提交于
      Contrary to common expectations for an "int" return, these functions
      return only a positive value -- if used correctly they cannot even
      return 0 because the message header will necessarily be in the skb.
      
      This makes the very common pattern of
      
        if (genlmsg_end(...) < 0) { ... }
      
      be a whole bunch of dead code. Many places also simply do
      
        return nlmsg_end(...);
      
      and the caller is expected to deal with it.
      
      This also commonly (at least for me) causes errors, because it is very
      common to write
      
        if (my_function(...))
          /* error condition */
      
      and if my_function() does "return nlmsg_end()" this is of course wrong.
      
      Additionally, there's not a single place in the kernel that actually
      needs the message length returned, and if anyone needs it later then
      it'll be very easy to just use skb->len there.
      
      Remove this, and make the functions void. This removes a bunch of dead
      code as described above. The patch adds lines because I did
      
      -	return nlmsg_end(...);
      +	nlmsg_end(...);
      +	return 0;
      
      I could have preserved all the function's return values by returning
      skb->len, but instead I've audited all the places calling the affected
      functions and found that none cared. A few places actually compared
      the return value with <= 0 in dump functionality, but that could just
      be changed to < 0 with no change in behaviour, so I opted for the more
      efficient version.
      
      One instance of the error I've made numerous times now is also present
      in net/phonet/pn_netlink.c in the route_dumpit() function - it didn't
      check for <0 or <=0 and thus broke out of the loop every single time.
      I've preserved this since it will (I think) have caused the messages to
      userspace to be formatted differently with just a single message for
      every SKB returned to userspace. It's possible that this isn't needed
      for the tools that actually use this, but I don't even know what they
      are so couldn't test that changing this behaviour would be acceptable.
      Signed-off-by: NJohannes Berg <johannes.berg@intel.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      053c095a
    • J
      net: replace br_fdb_external_learn_* calls with switchdev notifier events · 3aeb6617
      Jiri Pirko 提交于
      This patch benefits from newly introduced switchdev notifier and uses it
      to propagate fdb learn events from rocker driver to bridge. That avoids
      direct function calls and possible use by other listeners (ovs).
      Suggested-by: NThomas Graf <tgraf@suug.ch>
      Signed-off-by: NJiri Pirko <jiri@resnulli.us>
      Signed-off-by: NScott Feldman <sfeldma@gmail.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      3aeb6617
  17. 14 1月, 2015 1 次提交
  18. 10 12月, 2014 1 次提交