1. 01 Jul, 2020 8 commits
    • Hulk Robot's avatar
      qed: Make symbol 'qed_hw_err_type_descr' static · 4f195d28
      Hulk Robot authored
      Fix sparse build warning:
      
      drivers/net/ethernet/qlogic/qed/qed_main.c:2480:6: warning:
       symbol 'qed_hw_err_type_descr' was not declared. Should it be static?
      Signed-off-by: default avatarHulk Robot <hulkci@huawei.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      4f195d28
    • Colin Ian King's avatar
      net/packet: remove redundant initialization of variable err · 2a6d6c31
      Colin Ian King authored
      The variable err is being initialized with a value that is never read
      and it is being updated later with a new value.  The initialization is
      redundant and can be removed.
      
      Addresses-Coverity: ("Unused value")
      Signed-off-by: default avatarColin Ian King <colin.king@canonical.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      2a6d6c31
    • David S. Miller's avatar
      Merge branch 'cxgb4-add-mirror-action-support-for-TC-MATCHALL' · 2b04a661
      David S. Miller authored
      Rahul Lakkireddy says:
      
      ====================
      cxgb4: add mirror action support for TC-MATCHALL
      
      This series of patches add support to mirror all ingress traffic
      for TC-MATCHALL ingress offload.
      
      Patch 1 adds support to dynamically create a mirror Virtual Interface
      (VI) that accepts all mirror ingress traffic when mirror action is
      set in TC-MATCHALL offload.
      
      Patch 2 adds support to allocate mirror Rxqs and setup RSS for the
      mirror VI.
      
      Patch 3 adds support to replicate all the main VI configuration to
      mirror VI. This includes replicating MTU, promiscuous mode,
      all-multicast mode, and enabled netdev Rx feature offloads.
      
      v3:
      - Replace mirror VI refcount_t with normal u32 variable in all patches.
      - Add back calling cxgb4_port_mirror_start() in cxgb_open(), which
        was there in v1, but got missed in v2 during refactoring, in patch
        3.
      
      v2:
      - Add mutex to protect all mirror VI data, instead of just
        mirror Rxqs, in patch 1 and 2.
      - Remove the un-needed mirror Rxq mutex in patch 2.
      - Simplify the replication code by refactoring t4_set_rxmode()
        to handle mirror VI, instead of duplicating the t4_set_rxmode()
        calls in multiple places in patch 3.
      ====================
      Reviewed-by: default avatarJakub Kicinski <kuba@kernel.org>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      2b04a661
    • Rahul Lakkireddy's avatar
      cxgb4: add main VI to mirror VI config replication · 696c278f
      Rahul Lakkireddy authored
      When mirror VI is enabled, replicate various VI config params
      enabled on main VI to mirror VI. These include replicating MTU,
      promiscuous mode, all-multicast mode, and enabled netdev Rx
      feature offloads.
      
      v3:
      - Replace mirror VI refcount_t with normal u32 variable.
      - Add back calling cxgb4_port_mirror_start() in cxgb_open(), which
        was there in v1, but got missed in v2 during refactoring.
      
      v2:
      - Simplify the replication code by refactoring t4_set_rxmode()
        to handle mirror VI, instead of duplicating the t4_set_rxmode()
        calls in multiple places.
      Signed-off-by: default avatarRahul Lakkireddy <rahul.lakkireddy@chelsio.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      696c278f
    • Rahul Lakkireddy's avatar
      cxgb4: add support for mirror Rxqs · 2b465ed0
      Rahul Lakkireddy authored
      When mirror VI is enabled, allocate the mirror Rxqs and setup the
      mirror VI RSS table. The mirror Rxqs are allocated/freed when
      the mirror VI is created/destroyed or when underlying port is
      brought up/down, respectively.
      
      v3:
      - Replace mirror VI refcount_t with normal u32 variable.
      
      v2:
      - Use mutex to protect all mirror VI data, instead of just
        mirror Rxqs.
      - Remove the un-needed mirror Rxq mutex.
      Signed-off-by: default avatarRahul Lakkireddy <rahul.lakkireddy@chelsio.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      2b465ed0
    • Rahul Lakkireddy's avatar
      cxgb4: add mirror action to TC-MATCHALL offload · fd2261d8
      Rahul Lakkireddy authored
      Add mirror Virtual Interface (VI) support to receive all ingress
      mirror traffic from the underlying device. The mirror VI is
      created dynamically, if the TC-MATCHALL rule has a corresponding
      mirror action. Also request MSI-X vectors needed for the mirror VI
      Rxqs. If no vectors are available, then disable mirror VI support.
      
      v3:
      - Replace mirror VI refcount_t with normal u32 variable.
      
      v2:
      - Add mutex to protect all mirror VI data, instead of just
        mirror Rxqs.
      Signed-off-by: default avatarRahul Lakkireddy <rahul.lakkireddy@chelsio.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      fd2261d8
    • Nathan Chancellor's avatar
      pcnet32: Mark PM functions as __maybe_unused · 75603a31
      Nathan Chancellor authored
      In certain configurations without power management support, the
      following warnings happen:
      
      ../drivers/net/ethernet/amd/pcnet32.c:2928:12: warning:
      'pcnet32_pm_resume' defined but not used [-Wunused-function]
       2928 | static int pcnet32_pm_resume(struct device *device_d)
            |            ^~~~~~~~~~~~~~~~~
      ../drivers/net/ethernet/amd/pcnet32.c:2916:12: warning:
      'pcnet32_pm_suspend' defined but not used [-Wunused-function]
       2916 | static int pcnet32_pm_suspend(struct device *device_d)
            |            ^~~~~~~~~~~~~~~~~~
      
      Mark these functions as __maybe_unused to make it clear to the compiler
      that this is going to happen based on the configuration, which is the
      standard for these types of functions.
      
      Fixes: a86688fb ("pcnet32: Convert to generic power management")
      Signed-off-by: default avatarNathan Chancellor <natechancellor@gmail.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      75603a31
    • Nathan Chancellor's avatar
      amd8111e: Mark PM functions as __maybe_unused · 0adcd298
      Nathan Chancellor authored
      In certain configurations without power management support, the
      following warnings happen:
      
      ../drivers/net/ethernet/amd/amd8111e.c:1623:12: warning:
      'amd8111e_resume' defined but not used [-Wunused-function]
       1623 | static int amd8111e_resume(struct device *dev_d)
            |            ^~~~~~~~~~~~~~~
      ../drivers/net/ethernet/amd/amd8111e.c:1584:12: warning:
      'amd8111e_suspend' defined but not used [-Wunused-function]
       1584 | static int amd8111e_suspend(struct device *dev_d)
            |            ^~~~~~~~~~~~~~~~
      
      Mark these functions as __maybe_unused to make it clear to the compiler
      that this is going to happen based on the configuration, which is the
      standard for these types of functions.
      
      Fixes: 2caf751f ("amd8111e: Convert to generic power management")
      Signed-off-by: default avatarNathan Chancellor <natechancellor@gmail.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      0adcd298
  2. 30 Jun, 2020 32 commits