1. 21 9月, 2016 25 次提交
  2. 20 9月, 2016 15 次提交
    • J
      mlx4: add missed recycle opportunity for XDP_TX on TX failure · 5737f6c9
      Jesper Dangaard Brouer 提交于
      Correct drop handling for XDP_TX on TX failure, were recently added in
      commit 95357907 ("mlx4: fix XDP_TX is acting like XDP_PASS on TX
      ring full").
      
      The change missed an opportunity for recycling the RX page, instead of
      going through the page allocator, like the regular XDP_DROP action does.
      This patch cease the opportunity, by going through the XDP_DROP case.
      
      Fixes: 95357907 ("mlx4: fix XDP_TX is acting like XDP_PASS on TX ring full")
      Signed-off-by: NJesper Dangaard Brouer <brouer@redhat.com>
      Reviewed-by: NTariq Toukan <tariqt@mellanox.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      5737f6c9
    • D
      Merge branch 'dsa-set_addr-optional' · 1860e688
      David S. Miller 提交于
      John Crispin says:
      
      ====================
      net-next: dsa: set_addr should be optional
      
      The Marvell driver is the only one that actually sets the switches HW
      address. All other drivers have an empty stub. fix this by making the
      callback optional.
      ====================
      Reviewed-by: NFlorian Fainelli <f.fainelli@gmail.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      1860e688
    • J
      net-next: dsa: qca8k: remove empty set_addr() stub · 8941ee36
      John Crispin 提交于
      The set_addr() callback is now optional. Remove the empty stub that qca8k
      has.
      Signed-off-by: NJohn Crispin <john@phrozen.org>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      8941ee36
    • J
      net-next: dsa: b53: remove empty set_addr() stub · 1f449736
      John Crispin 提交于
      The set_addr() callback is now optional. Remove the empty stub that b53
      has.
      Signed-off-by: NJohn Crispin <john@phrozen.org>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      1f449736
    • J
      net-next: dsa: make the set_addr() operation optional · 092183df
      John Crispin 提交于
      Only 1 of the 3 drivers currently has a set_addr() operation. Make the
      set_addr() callback optional to reduce the amount of empty stubs inside
      the drivers.
      Signed-off-by: NJohn Crispin <john@phrozen.org>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      092183df
    • J
      net-next: dsa: fix duplicate invocation of set_addr() · 06f8ec90
      John Crispin 提交于
      commit 83c0afae ("net: dsa: Add new binding implementation")
      has a duplicate invocation of the set_addr() operation callback. Remove one
      of them.
      Signed-off-by: NJohn Crispin <john@phrozen.org>
      Reviewed-by: NAndrew Lunn <andrew@lunn.ch>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      06f8ec90
    • D
      Merge branch 'rhashtable-dups' · f361bdde
      David S. Miller 提交于
      Herbert Xu says:
      
      ====================
      rhashtable: rhashtable with duplicate objects
      
      v3 fixes a bug in the remove path that causes the element count
      to decrease when it shouldn't, leading to a gigantic hash table
      when it underflows.
      
      v2 contains a reworked insertion slowpath to ensure that the
      spinlock for the table we're inserting into is taken.
      
      This series contains two patches.  The first adds the rhlist
      interface and the second converts mac80211 to use it.  If this
      works out I'll then proceed to convert the other insecure_elasticity
      users over to this.
      
      I've tested the rhlist code with test_rhashtable but I haven't
      tested the mac80211 conversion.  So please give it a go and see
      if it still works.
      ====================
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      f361bdde
    • H
      mac80211: Use rhltable instead of rhashtable · 83e7e4ce
      Herbert Xu 提交于
      mac80211 currently uses rhashtable with insecure_elasticity set
      to true.  The latter is because of duplicate objects.  What's
      more, mac80211 walks the rhashtable chains by hand which is broken
      as rhashtable may contain multiple tables due to resizing or
      rehashing.
      
      This patch fixes it by converting it to the newly added rhltable
      interface which is designed for use with duplicate objects.
      
      With rhltable a lookup returns a list of objects instead of a
      single one.  This is then fed into the existing for_each_sta_info
      macro.
      
      This patch also deletes the sta_addr_hash function since rhashtable
      defaults to jhash.
      Signed-off-by: NHerbert Xu <herbert@gondor.apana.org.au>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      83e7e4ce
    • H
      rhashtable: Add rhlist interface · ca26893f
      Herbert Xu 提交于
      The insecure_elasticity setting is an ugly wart brought out by
      users who need to insert duplicate objects (that is, distinct
      objects with identical keys) into the same table.
      
      In fact, those users have a much bigger problem.  Once those
      duplicate objects are inserted, they don't have an interface to
      find them (unless you count the walker interface which walks
      over the entire table).
      
      Some users have resorted to doing a manual walk over the hash
      table which is of course broken because they don't handle the
      potential existence of multiple hash tables.  The result is that
      they will break sporadically when they encounter a hash table
      resize/rehash.
      
      This patch provides a way out for those users, at the expense
      of an extra pointer per object.  Essentially each object is now
      a list of objects carrying the same key.  The hash table will
      only see the lists so nothing changes as far as rhashtable is
      concerned.
      
      To use this new interface, you need to insert a struct rhlist_head
      into your objects instead of struct rhash_head.  While the hash
      table is unchanged, for type-safety you'll need to use struct
      rhltable instead of struct rhashtable.  All the existing interfaces
      have been duplicated for rhlist, including the hash table walker.
      
      One missing feature is nulls marking because AFAIK the only potential
      user of it does not need duplicate objects.  Should anyone need
      this it shouldn't be too hard to add.
      Signed-off-by: NHerbert Xu <herbert@gondor.apana.org.au>
      Acked-by: NThomas Graf <tgraf@suug.ch>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      ca26893f
    • V
      xen-netfront: avoid packet loss when ethernet header crosses page boundary · fd07160b
      Vitaly Kuznetsov 提交于
      Small packet loss is reported on complex multi host network configurations
      including tunnels, NAT, ... My investigation led me to the following check
      in netback which drops packets:
      
              if (unlikely(txreq.size < ETH_HLEN)) {
                      netdev_err(queue->vif->dev,
                                 "Bad packet size: %d\n", txreq.size);
                      xenvif_tx_err(queue, &txreq, extra_count, idx);
                      break;
              }
      
      But this check itself is legitimate. SKBs consist of a linear part (which
      has to have the ethernet header) and (optionally) a number of frags.
      Netfront transmits the head of the linear part up to the page boundary
      as the first request and all the rest becomes frags so when we're
      reconstructing the SKB in netback we can't distinguish between original
      frags and the 'tail' of the linear part. The first SKB needs to be at
      least ETH_HLEN size. So in case we have an SKB with its linear part
      starting too close to the page boundary the packet is lost.
      
      I see two ways to fix the issue:
      - Change the 'wire' protocol between netfront and netback to start keeping
        the original SKB structure. We'll have to add a flag indicating the fact
        that the particular request is a part of the original linear part and not
        a frag. We'll need to know the length of the linear part to pre-allocate
        memory.
      - Avoid transmitting SKBs with linear parts starting too close to the page
        boundary. That seems preferable short-term and shouldn't bring
        significant performance degradation as such packets are rare. That's what
        this patch is trying to achieve with skb_copy().
      Signed-off-by: NVitaly Kuznetsov <vkuznets@redhat.com>
      Acked-by: NDavid Vrabel <david.vrabel@citrix.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      fd07160b
    • R
      net: phy: Add MAC-IF driver for Microsemi PHYs. · 1a21101d
      Raju Lakkaraju 提交于
      All the review comments updated and resending for review.
      
      This is MAC interface feature.
      Microsemi PHY can support RGMII, RMII or GMII/MII interface between MAC and PHY.
      MAC-IF function program the right value based on Device tree configuration.
      
      Tested on Beaglebone Black with VSC 8531 PHY.
      Signed-off-by: NRaju Lakkaraju <Raju.Lakkaraju@microsemi.com>
      Reviewed-by: NAndrew Lunn <andrew@lunn.ch>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      1a21101d
    • I
      mlxsw: spectrum: Fix sparse warnings · 1a9234e6
      Ido Schimmel 提交于
      drivers/net/ethernet/mellanox/mlxsw//spectrum.c:251:28: warning: symbol
      'mlxsw_sp_span_entry_find' was not declared. Should it be static?
      drivers/net/ethernet/mellanox/mlxsw//spectrum.c:265:28: warning: symbol
      'mlxsw_sp_span_entry_get' was not declared. Should it be static?
      drivers/net/ethernet/mellanox/mlxsw//spectrum.c:367:56: warning: mixing
      different enum types
      drivers/net/ethernet/mellanox/mlxsw//spectrum.c:367:56:     int enum
      mlxsw_sp_span_type  versus
      drivers/net/ethernet/mellanox/mlxsw//spectrum.c:367:56:     int enum
      mlxsw_reg_mpar_i_e
      ...
      drivers/net/ethernet/mellanox/mlxsw//spectrum_buffers.c:598:32: warning:
      mixing different enum types
      drivers/net/ethernet/mellanox/mlxsw//spectrum_buffers.c:598:32:     int
      enum mlxsw_reg_sbxx_dir  versus
      drivers/net/ethernet/mellanox/mlxsw//spectrum_buffers.c:598:32:     int
      enum devlink_sb_pool_type
      drivers/net/ethernet/mellanox/mlxsw//spectrum_buffers.c:600:39: warning:
      mixing different enum types
      drivers/net/ethernet/mellanox/mlxsw//spectrum_buffers.c:600:39:     int
      enum mlxsw_reg_sbpr_mode  versus
      drivers/net/ethernet/mellanox/mlxsw//spectrum_buffers.c:600:39:     int
      enum devlink_sb_threshold_type
      ...
      drivers/net/ethernet/mellanox/mlxsw//spectrum_router.c:255:54: warning:
      mixing different enum types
      drivers/net/ethernet/mellanox/mlxsw//spectrum_router.c:255:54:     int
      enum mlxsw_sp_l3proto  versus
      drivers/net/ethernet/mellanox/mlxsw//spectrum_router.c:255:54:     int
      enum mlxsw_reg_ralxx_protocol
      ...
      drivers/net/ethernet/mellanox/mlxsw//spectrum_router.c:1749:6: warning:
      symbol 'mlxsw_sp_fib_entry_put' was not declared. Should it be static?
      Signed-off-by: NIdo Schimmel <idosch@mellanox.com>
      Signed-off-by: NJiri Pirko <jiri@mellanox.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      1a9234e6
    • E
      mlxsw: Change the RX LAG hash function from XOR to CRC · 18c2d2c1
      Elad Raz 提交于
      Change the RX hash function from XOR to CRC in order to have better
      distribution of the traffic.
      Signed-off-by: NElad Raz <eladr@mellanox.com>
      Signed-off-by: NJiri Pirko <jiri@mellanox.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      18c2d2c1
    • R
      bnxt_en: Fix build error for kernesl without RTC-LIB · 878786d9
      Rob Swindell 提交于
      bnxt_hwrm_fw_set_time() now returns -EOPNOTSUPP when built for kernel
      without RTC_LIB.  Setting the firmware time is not critical to the
      successful completion of the firmware update process.
      Signed-off-by: NRob Swindell <Rob.Swindell@broadcom.com>
      Signed-off-by: NMichael Chan <michael.chan@broadcom.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      878786d9
    • J
      net sched: stylistic cleanups · 5a7a5555
      Jamal Hadi Salim 提交于
      Signed-off-by: NJamal Hadi Salim <jhs@mojatatu.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      5a7a5555