1. 30 6月, 2018 13 次提交
  2. 29 6月, 2018 5 次提交
  3. 28 6月, 2018 15 次提交
  4. 27 6月, 2018 7 次提交
    • C
      nfp: cast sizeof() to int when comparing with error code · 2d259571
      Chengguang Xu 提交于
      sizeof() will return unsigned value so in the error check
      negative error code will be always larger than sizeof().
      
      Fixes: a0d8e02c ("nfp: add support for reading nffw info")
      Signed-off-by: NChengguang Xu <cgxu519@gmx.com>
      Acked-by: NJakub Kicinski <jakub.kicinski@netronome.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      2d259571
    • D
      Merge branch 'nfp-MPLS-and-shared-blocks-TC-offload-fixes' · f3c2c5eb
      David S. Miller 提交于
      Jakub Kicinski says:
      
      ====================
      nfp: MPLS and shared blocks TC offload fixes
      
      This series brings two fixes to TC filter/action offload code.
      Pieter fixes matching MPLS packets when the match is purely on
      the MPLS ethertype and none of the MPLS fields are used.
      John provides a fix for offload of shared blocks.  Unfortunately,
      with shared blocks there is currently no guarantee that filters
      which were added by the core will be removed before block unbind.
      Our simple fix is to not support offload of rules on shared blocks
      at all, a revert of this fix will be send for -next once the
      reoffload infrastructure lands.  The shared blocks became important
      as we are trying to use them for bonding offload (managed from user
      space) and lack of remove calls leads to resource leaks.
      
      v2:
       - fix build error reported by kbuild bot due to missing
         tcf_block_shared() helper.
      ====================
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      f3c2c5eb
    • J
      nfp: reject binding to shared blocks · 951a8ee6
      John Hurley 提交于
      TC shared blocks allow multiple qdiscs to be grouped together and filters
      shared between them. Currently the chains of filters attached to a block
      are only flushed when the block is removed. If a qdisc is removed from a
      block but the block still exists, flow del messages are not passed to the
      callback registered for that qdisc. For the NFP, this presents the
      possibility of rules still existing in hw when they should be removed.
      
      Prevent binding to shared blocks until the kernel can send per qdisc del
      messages when block unbinds occur.
      
      tcf_block_shared() was not used outside of the core until now, so also
      add an empty implementation for builds with CONFIG_NET_CLS=n.
      
      Fixes: 48617387 ("net: sched: introduce shared filter blocks infrastructure")
      Signed-off-by: NJohn Hurley <john.hurley@netronome.com>
      Signed-off-by: NJakub Kicinski <jakub.kicinski@netronome.com>
      Reviewed-by: NSimon Horman <simon.horman@netronome.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      951a8ee6
    • P
      nfp: flower: fix mpls ether type detection · a6411941
      Pieter Jansen van Vuuren 提交于
      Previously it was not possible to distinguish between mpls ether types and
      other ether types. This leads to incorrect classification of offloaded
      filters that match on mpls ether type. For example the following two
      filters overlap:
      
       # tc filter add dev eth0 parent ffff: \
          protocol 0x8847 flower \
          action mirred egress redirect dev eth1
      
       # tc filter add dev eth0 parent ffff: \
          protocol 0x0800 flower \
          action mirred egress redirect dev eth2
      
      The driver now correctly includes the mac_mpls layer where HW stores mpls
      fields, when it detects an mpls ether type. It also sets the MPLS_Q bit to
      indicate that the filter should match mpls packets.
      
      Fixes: bb055c19 ("nfp: add mpls match offloading support")
      Signed-off-by: NPieter Jansen van Vuuren <pieter.jansenvanvuuren@netronome.com>
      Reviewed-by: NSimon Horman <simon.horman@netronome.com>
      Reviewed-by: NJakub Kicinski <jakub.kicinski@netronome.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      a6411941
    • J
      fib_rules: match rules based on suppress_* properties too · 7c8f4e6d
      Jason A. Donenfeld 提交于
      Two rules with different values of suppress_prefix or suppress_ifgroup
      are not the same. This fixes an -EEXIST when running:
      
         $ ip -4 rule add table main suppress_prefixlength 0
      Signed-off-by: NJason A. Donenfeld <Jason@zx2c4.com>
      Fixes: f9d4b0c1 ("fib_rules: move common handling of newrule delrule msgs into fib_nl2rule")
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      7c8f4e6d
    • S
      rds: clean up loopback rds_connections on netns deletion · c809195f
      Sowmini Varadhan 提交于
      The RDS core module creates rds_connections based on callbacks
      from rds_loop_transport when sending/receiving packets to local
      addresses.
      
      These connections will need to be cleaned up when they are
      created from a netns that is not init_net, and that netns is deleted.
      
      Add the changes aligned with the changes from
      commit ebeeb1ad ("rds: tcp: use rds_destroy_pending() to synchronize
      netns/module teardown and rds connection/workq management") for
      rds_loop_transport
      
      Reported-and-tested-by: syzbot+4c20b3866171ce8441d2@syzkaller.appspotmail.com
      Acked-by: NSantosh Shilimkar <santosh.shilimkar@oracle.com>
      Signed-off-by: NSowmini Varadhan <sowmini.varadhan@oracle.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      c809195f
    • A
      net/mlx5: Fix command interface race in polling mode · d412c31d
      Alex Vesker 提交于
      The command interface can work in two modes: Events and Polling.
      In the general case, each time we invoke a command, a work is
      queued to handle it.
      
      When working in events, the interrupt handler completes the
      command execution. On the other hand, when working in polling
      mode, the work itself completes it.
      
      Due to a bug in the work handler, a command could have been
      completed by the interrupt handler, while the work handler
      hasn't finished yet, causing the it to complete once again
      if the command interface mode was changed from Events to
      polling after the interrupt handler was called.
      
      mlx5_unload_one()
              mlx5_stop_eqs()
                      // Destroy the EQ before cmd EQ
                      ...cmd_work_handler()
                              write_doorbell()
                              --> EVENT_TYPE_CMD
                                      mlx5_cmd_comp_handler() // First free
                                              free_ent(cmd, ent->idx)
                                              complete(&ent->done)
      
              <-- mlx5_stop_eqs //cmd was complete
                      // move to polling before destroying the last cmd EQ
                      mlx5_cmd_use_polling()
                              cmd->mode = POLL;
      
                      --> cmd_work_handler (continues)
                              if (cmd->mode == POLL)
                                      mlx5_cmd_comp_handler() // Double free
      
      The solution is to store the cmd->mode before writing the doorbell.
      
      Fixes: e126ba97 ("mlx5: Add driver for Mellanox Connect-IB adapters")
      Signed-off-by: NAlex Vesker <valex@mellanox.com>
      Signed-off-by: NSaeed Mahameed <saeedm@mellanox.com>
      d412c31d