1. 26 Mar, 2014 1 commit
  2. 12 Mar, 2014 1 commit
  3. 17 Feb, 2014 2 commits
  4. 10 Jan, 2014 1 commit
    • Jason Wang's avatar
      net: core: explicitly select a txq before doing l2 forwarding · f663dd9a
      Jason Wang authored
      
      
      Currently, the tx queue were selected implicitly in ndo_dfwd_start_xmit(). The
      will cause several issues:
      
      - NETIF_F_LLTX were removed for macvlan, so txq lock were done for macvlan
        instead of lower device which misses the necessary txq synchronization for
        lower device such as txq stopping or frozen required by dev watchdog or
        control path.
      - dev_hard_start_xmit() was called with NULL txq which bypasses the net device
        watchdog.
      - dev_hard_start_xmit() does not check txq everywhere which will lead a crash
        when tso is disabled for lower device.
      
      Fix this by explicitly introducing a new param for .ndo_select_queue() for just
      selecting queues in the case of l2 forwarding offload. netdev_pick_tx() was also
      extended to accept this parameter and dev_queue_xmit_accel() was used to do l2
      forwarding transmission.
      
      With this fixes, NETIF_F_LLTX could be preserved for macvlan and there's no need
      to check txq against NULL in dev_hard_start_xmit(). Also there's no need to keep
      a dedicated ndo_dfwd_start_xmit() and we can just reuse the code of
      dev_queue_xmit() to do the transmission.
      
      In the future, it was also required for macvtap l2 forwarding support since it
      provides a necessary synchronization method.
      
      Cc: John Fastabend <john.r.fastabend@intel.com>
      Cc: Neil Horman <nhorman@tuxdriver.com>
      Cc: e1000-devel@lists.sourceforge.net
      Signed-off-by: default avatarJason Wang <jasowang@redhat.com>
      Acked-by: default avatarNeil Horman <nhorman@tuxdriver.com>
      Acked-by: default avatarJohn Fastabend <john.r.fastabend@intel.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      f663dd9a
  5. 17 Dec, 2013 1 commit
  6. 08 Nov, 2013 1 commit
  7. 02 Nov, 2013 1 commit
  8. 25 Oct, 2013 1 commit
  9. 03 Oct, 2013 1 commit
  10. 30 Sep, 2013 1 commit
  11. 11 Sep, 2013 1 commit
    • Eric Dumazet's avatar
      net: fix multiqueue selection · 50d1784e
      Eric Dumazet authored
      commit 416186fb
      
       ("net: Split core bits of netdev_pick_tx
      into __netdev_pick_tx") added a bug that disables caching of queue
      index in the socket.
      
      This is the source of packet reorders for TCP flows, and
      again this is happening more often when using FQ pacing.
      
      Old code was doing
      
      if (queue_index != old_index)
      	sk_tx_queue_set(sk, queue_index);
      
      Alexander renamed the variables but forgot to change sk_tx_queue_set()
      2nd parameter.
      
      if (queue_index != new_index)
      	sk_tx_queue_set(sk, queue_index);
      
      This means we store -1 over and over in sk->sk_tx_queue_mapping
      Signed-off-by: default avatarEric Dumazet <edumazet@google.com>
      Cc: Alexander Duyck <alexander.h.duyck@intel.com>
      Acked-by: default avatarAlexander Duyck <alexander.h.duyck@intel.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      50d1784e
  12. 30 Aug, 2013 1 commit
    • Eric Dumazet's avatar
      net: revert 8728c544 ("net: dev_pick_tx() fix") · 702821f4
      Eric Dumazet authored
      commit 8728c544 ("net: dev_pick_tx() fix") and commit
      b6fe83e9 ("bonding: refine IFF_XMIT_DST_RELEASE capability")
      are quite incompatible : Queue selection is disabled because skb
      dst was dropped before entering bonding device.
      
      This causes major performance regression, mainly because TCP packets
      for a given flow can be sent to multiple queues.
      
      This is particularly visible when using the new FQ packet scheduler
      with MQ + FQ setup on the slaves.
      
      We can safely revert the first commit now that 416186fb
      
      
      ("net: Split core bits of netdev_pick_tx into __netdev_pick_tx")
      properly caps the queue_index.
      Reported-by: default avatarXi Wang <xii@google.com>
      Diagnosed-by: default avatarXi Wang <xii@google.com>
      Signed-off-by: default avatarEric Dumazet <edumazet@google.com>
      Cc: Tom Herbert <therbert@google.com>
      Cc: Alexander Duyck <alexander.h.duyck@intel.com>
      Cc: Denys Fedorysychenko <nuclearcat@nuclearcat.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      702821f4
  13. 09 Aug, 2013 1 commit
  14. 31 Jul, 2013 2 commits
  15. 20 Mar, 2013 2 commits
  16. 12 Mar, 2013 1 commit
  17. 21 Jan, 2013 1 commit
  18. 18 Jul, 2012 1 commit
    • Eric Dumazet's avatar
      ipv6: add ipv6_addr_hash() helper · ddbe5032
      Eric Dumazet authored
      
      
      Introduce ipv6_addr_hash() helper doing a XOR on all bits
      of an IPv6 address, with an optimized x86_64 version.
      
      Use it in flow dissector, as suggested by Andrew McGregor,
      to reduce hash collision probabilities in fq_codel (and other
      users of flow dissector)
      
      Use it in ip6_tunnel.c and use more bit shuffling, as suggested
      by David Laight, as existing hash was ignoring most of them.
      
      Use it in sunrpc and use more bit shuffling, using hash_32().
      
      Use it in net/ipv6/addrconf.c, using hash_32() as well.
      
      As a cleanup, use it in net/ipv4/tcp_metrics.c
      Signed-off-by: default avatarEric Dumazet <edumazet@google.com>
      Reported-by: default avatarAndrew McGregor <andrewmcgr@gmail.com>
      Cc: Dave Taht <dave.taht@gmail.com>
      Cc: Tom Herbert <therbert@google.com>
      Cc: David Laight <David.Laight@ACULAB.COM>
      Cc: Joe Perches <joe@perches.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      ddbe5032
  19. 24 Jan, 2012 1 commit
  20. 29 Nov, 2011 2 commits
    • Eric Dumazet's avatar
      flow_dissector: use a 64bit load/store · 4d77d2b5
      Eric Dumazet authored
      
      
      Le lundi 28 novembre 2011 à 19:06 -0500, David Miller a écrit :
      > From: Dimitris Michailidis <dm@chelsio.com>
      > Date: Mon, 28 Nov 2011 08:25:39 -0800
      >
      > >> +bool skb_flow_dissect(const struct sk_buff *skb, struct flow_keys
      > >> *flow)
      > >> +{
      > >> +	int poff, nhoff = skb_network_offset(skb);
      > >> +	u8 ip_proto;
      > >> +	u16 proto = skb->protocol;
      > >
      > > __be16 instead of u16 for proto?
      >
      > I'll take care of this when I apply these patches.
      
      ( CC trimmed )
      
      Thanks David !
      
      Here is a small patch to use one 64bit load/store on x86_64 instead of
      two 32bit load/stores.
      
      [PATCH net-next] flow_dissector: use a 64bit load/store
      
      gcc compiler is smart enough to use a single load/store if we
      memcpy(dptr, sptr, 8) on x86_64, regardless of
      CONFIG_CC_OPTIMIZE_FOR_SIZE
      
      In IP header, daddr immediately follows saddr, this wont change in the
      future. We only need to make sure our flow_keys (src,dst) fields wont
      break the rule.
      Signed-off-by: default avatarEric Dumazet <eric.dumazet@gmail.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      4d77d2b5
    • Eric Dumazet's avatar
      net: introduce skb_flow_dissect() · 0744dd00
      Eric Dumazet authored
      
      
      We use at least two flow dissectors in network stack, with known
      limitations and code duplication.
      
      Introduce skb_flow_dissect() to factorize this, highly inspired from
      existing dissector from __skb_get_rxhash()
      
      Note : We extensively use skb_header_pointer(), this permits us to not
      touch skb at all.
      Signed-off-by: default avatarEric Dumazet <eric.dumazet@gmail.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      0744dd00