1. 18 10月, 2016 13 次提交
  2. 17 10月, 2016 10 次提交
  3. 16 10月, 2016 4 次提交
    • J
      ipvlan: constify l3mdev_ops structure · ab530f63
      Julia Lawall 提交于
      This l3mdev_ops structure is only stored in the l3mdev_ops field of a
      net_device structure.  This field is declared const, so the l3mdev_ops
      structure can be declared as const also.  Additionally drop the
      __read_mostly annotation.
      
      The semantic patch that adds const is as follows:
      (http://coccinelle.lip6.fr/)
      
      // <smpl>
      @r disable optional_qualifier@
      identifier i;
      position p;
      @@
      static struct l3mdev_ops i@p = { ... };
      
      @ok@
      identifier r.i;
      struct net_device *e;
      position p;
      @@
      e->l3mdev_ops = &i@p;
      
      @bad@
      position p != {r.p,ok.p};
      identifier r.i;
      struct l3mdev_ops e;
      @@
      e@i@p
      
      @depends on !bad disable optional_qualifier@
      identifier r.i;
      @@
      static
      +const
       struct l3mdev_ops i = { ... };
      // </smpl>
      
      The effect on the layout of the .o file is shown by the following output
      of the size command, first before then after the transformation:
      
         text    data     bss     dec     hex filename
         7364     466      52    7882    1eca drivers/net/ipvlan/ipvlan_main.o
         7412     434      52    7898    1eda drivers/net/ipvlan/ipvlan_main.o
      Signed-off-by: NJulia Lawall <Julia.Lawall@lip6.fr>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      ab530f63
    • D
      Merge branch 'ila-cached-route' · f9dbd5a3
      David S. Miller 提交于
      Tom Herbert says:
      
      ====================
      ila: Cache a route in ILA lwt structure
      
      Add a dst_cache to ila_lwt structure. This holds a cached route for the
      translated address. In ila_output we now perform a route lookup after
      translation and if possible (destination in original route is full 128
      bits) we set the dst_cache. Subsequent calls to ila_output can then use
      the cache to avoid the route lookup.
      
      This eliminates the need to set the gateway on ILA routes as previously
      was being done. Now we can do somthing like:
      
      ./ip route add 3333::2000:0:0:2/128 encap ila 2222:0:0:2 \
          csum-mode neutral-map dev eth0  ## No via needed!
      
      Also, add destroy_state to lwt ops. We need this do destroy the
      dst_cache.
      
      - v2
        - Fixed comparisons to fc_dst_len to make comparison against number
          of bits in data structure not bytes.
        - Move destroy_state under build_state (requested by Jiri)
        - Other minor cleanup
      
      Tested:
      
      Running 200 TCP_RR streams:
      
        Baseline, no ILA
      
          1730716 tps
          102/170/313 50/90/99% latencies
          88.11 CPU utilization
      
        Using ILA in both directions
      
          1680428 tps
          105/176/325 50/90/99% latencies
          88.16 CPU utilization
      ====================
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      f9dbd5a3
    • T
      ila: Cache a route to translated address · 79ff2fc3
      Tom Herbert 提交于
      Add a dst_cache to ila_lwt structure. This holds a cached route for the
      translated address. In ila_output we now perform a route lookup after
      translation and if possible (destination in original route is full 128
      bits) we set the dst_cache. Subsequent calls to ila_output can then use
      the cache to avoid the route lookup.
      
      This eliminates the need to set the gateway on ILA routes as previously
      was being done. Now we can do something like:
      
      ./ip route add 3333::2000:0:0:2/128 encap ila 2222:0:0:2 \
          csum-mode neutral-map dev eth0  ## No via needed!
      Signed-off-by: NTom Herbert <tom@herbertland.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      79ff2fc3
    • T
      lwtunnel: Add destroy state operation · 1104d9ba
      Tom Herbert 提交于
      Users of lwt tunnels may set up some secondary state in build_state
      function. Add a corresponding destroy_state function to allow users to
      clean up state. This destroy state function is called from lwstate_free.
      Also, we now free lwstate using kfree_rcu so user can assume structure
      is not freed before rcu.
      Acked-by: NRoopa Prabhu <roopa@cumulusnetworks.com>
      Signed-off-by: NTom Herbert <tom@herbertland.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      1104d9ba
  4. 15 10月, 2016 7 次提交
  5. 14 10月, 2016 6 次提交
    • D
      Merge branch 'qed-next' · 9c7664cb
      David S. Miller 提交于
      Manish Chopra says:
      
      ====================
      qed*: driver updates
      
      There are several new additions in this series;
      Most are connected to either Tx offloading or Rx classifications
      [either fastpath changes or supporting configuration].
      
      In addition, there's a single IOV enhancement.
      
      Please consider applying this series to `net-next'.
      
      V2->V3:
      Fixes below kbuild warning
      call to '__compiletime_assert_60' declared with
      attribute error: Need native word sized stores/loads for atomicity.
      
      V1->V2:
      Added a fix for the race in ramrod handling
      pointed by Eric Dumazet [patch 7].
      ====================
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      9c7664cb
    • M
      qed: Fix possible race when reading firmware return code. · d5df7688
      Manish Chopra 提交于
      While handling SPQ ramrod completion, there is a possible race
      where driver might not read updated fw return code based on
      ramrod completion done. This patch ensures that fw return code
      is written first and then completion done flag is updated
      using appropriate memory barriers.
      Signed-off-by: NManish Chopra <manish.chopra@caviumnetworks.com>
      Signed-off-by: NYuval Mintz <Yuval.Mintz@caviumnetworks.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      d5df7688
    • Y
      qed: Handle malicious VFs events · 7eff82b0
      Yuval Mintz 提交于
      Malicious VFs might be caught in several different methods:
        - Misusing their bar permission and being blocked by hardware.
        - Misusing their fastpath logic and being blocked by firmware.
        - Misusing their interaction with their PF via hw-channel,
          and being blocked by PF driver.
      
      On the first two items, firmware would indicate to driver that
      the VF is to be considered malicious, but would sometime still
      allow the VF to communicate with the PF [depending on the exact
      nature of the malicious activity done by the VF].
      The current existing logic on the PF side lacks handling of such events,
      and might allow the PF to perform some incorrect configuration on behalf
      of a VF that was previously indicated as malicious.
      
      The new scheme is simple -
      Once the PF determines a VF is malicious it would:
       a. Ignore any further requests on behalf of the VF-driver.
       b. Prevent any configurations initiated by the hyperuser for
          the malicious VF, as firmware isn't willing to serve such.
      
      The malicious indication would be cleared upon the VF flr,
      after which it would become usable once again.
      Signed-off-by: NYuval Mintz <Yuval.Mintz@caviumnetworks.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      7eff82b0
    • Y
      qed: Allow chance for fast ramrod completions · c59f5291
      Yuval Mintz 提交于
      Whenever a ramrod is being sent for some device configuration,
      the driver is going to sleep at least 5ms between each iteration
      of polling on the completion of the ramrod.
      
      However, in almost every configuration scenario the firmware
      would be able to comply and complete the ramrod in a manner of
      several usecs. This is especially important in cases where there
      might be a lot of sequential configurations applying to the hardware
      [e.g., RoCE], in which case the existing scheme might cause some
      visible user delays.
      
      This patch changes the completion scheme - instead of immediately
      starting to sleep for a 'long' period, allow the device to quickly
      poll on the first iteration after a couple of usecs.
      Signed-off-by: NYuval Mintz <Yuval.Mintz@caviumnetworks.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      c59f5291
    • Y
      qed*: Allow unicast filtering · 7b7e70f9
      Yuval Mintz 提交于
      Apparently qede fails to set IFF_UNICAST_FLT, and as a result is not
      actually performing unicast MAC filtering.
      While we're at it - relax a hard-coded limitation that limits each
      interface into using at most 15 unicast MAC addresses before turning
      promiscuous. Instead utilize the HW resources to their limit.
      Signed-off-by: NYuval Mintz <Yuval.Mintz@caviumnetworks.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      7b7e70f9
    • M
      qede: Prevent GSO on long Geneve headers · 25695853
      Manish Chopra 提交于
      Due to hardware limitation, when transmitting a geneve-encapsulated
      packet with more than 32 bytes worth of geneve options the hardware
      would not be able to crack the packet and consider it a regular UDP
      packet.
      
      This implements the ndo_features_check() in qede in order to prevent
      GSO on said transmitted packets.
      Signed-off-by: NManish Chopra <manish.chopra@caviumnetworks.com>
      Signed-off-by: NYuval Mintz <Yuval.Mintz@caviumnetworks.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      25695853