1. 26 1月, 2018 3 次提交
    • M
      sfc: handle TX timestamps in the normal data path · b9b603d4
      Martin Habets 提交于
      Before this work, TX timestamping is done by sending each SKB to the MC.
      On the 8000 series (Medford1) we have high speed timestamping via the
       MAC, which means we can use normal TX queues for this without a
       significant drop in bandwidth.  On the X2000 series (Medford2) support
       for transmitting via the MC is removed, so the new way must be used.
      
      This patch enables timestamping on a TX queue, if requested.
      It also enhances TX event handling to process the extra completion events,
       and puts the time in the SKB.
      Signed-off-by: NMartin Habets <mhabets@solarflare.com>
      Signed-off-by: NEdward Cree <ecree@solarflare.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      b9b603d4
    • B
      sfc: remove tx and MCDI handling from NAPI budget consideration · 5227eccc
      Bert Kenward 提交于
      The NAPI budget is only for RX processing work, not other work such as
       TX or MCDI completion handling.
      Signed-off-by: NBert Kenward <bkenward@solarflare.com>
      Signed-off-by: NEdward Cree <ecree@solarflare.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      5227eccc
    • K
      net: Move net:netns_ids destruction out of rtnl_lock() and document locking scheme · fb07a820
      Kirill Tkhai 提交于
      Currently, we unhash a dying net from netns_ids lists
      under rtnl_lock(). It's a leftover from the time when
      net::netns_ids was introduced. There was no net::nsid_lock,
      and rtnl_lock() was mostly need to order modification
      of alive nets nsid idr, i.e. for:
      	for_each_net(tmp) {
      		...
      		id = __peernet2id(tmp, net);
      		idr_remove(&tmp->netns_ids, id);
      		...
      	}
      
      Since we have net::nsid_lock, the modifications are
      protected by this local lock, and now we may introduce
      better scheme of netns_ids destruction.
      
      Let's look at the functions peernet2id_alloc() and
      get_net_ns_by_id(). Previous commits taught these
      functions to work well with dying net acquired from
      rtnl unlocked lists. And they are the only functions
      which can hash a net to netns_ids or obtain from there.
      And as easy to check, other netns_ids operating functions
      works with id, not with net pointers. So, we do not
      need rtnl_lock to synchronize cleanup_net() with all them.
      
      The another property, which is used in the patch,
      is that net is unhashed from net_namespace_list
      in the only place and by the only process. So,
      we avoid excess rcu_read_lock() or rtnl_lock(),
      when we'are iterating over the list in unhash_nsid().
      
      All the above makes possible to keep rtnl_lock() locked
      only for net->list deletion, and completely avoid it
      for netns_ids unhashing and destruction. As these two
      doings may take long time (e.g., memory allocation
      to send skb), the patch should positively act on
      the scalability and signify decrease the time, which
      rtnl_lock() is held in cleanup_net().
      Signed-off-by: NKirill Tkhai <ktkhai@virtuozzo.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      fb07a820
  2. 25 1月, 2018 37 次提交