1. 26 Jul, 2018 18 commits
    • Vakul Garg's avatar
      net/tls: Removed redundant checks for non-NULL · 201876b3
      Vakul Garg authored
      Removed checks against non-NULL before calling kfree_skb() and
      crypto_free_aead(). These functions are safe to be called with NULL
      as an argument.
      Signed-off-by: default avatarVakul Garg <vakul.garg@nxp.com>
      Acked-by: default avatarDave Watson <davejwatson@fb.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      201876b3
    • Vinicius Costa Gomes's avatar
      cbs: Add support for the graft function · 990e35ec
      Vinicius Costa Gomes authored
      This will allow to install a child qdisc under cbs. The main use case
      is to install ETF (Earliest TxTime First) qdisc under cbs, so there's
      another level of control for time-sensitive traffic.
      Signed-off-by: default avatarVinicius Costa Gomes <vinicius.gomes@intel.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      990e35ec
    • YueHaibing's avatar
      net: hns: Make many functions static · 336a443b
      YueHaibing authored
      Fixes the following sparse warning:
      
      drivers/net/ethernet/hisilicon/hns/hns_ae_adapt.c:73:20: warning: symbol 'hns_ae_get_handle' was not declared. Should it be static?
      drivers/net/ethernet/hisilicon/hns/hns_ae_adapt.c:332:6: warning: symbol 'hns_ae_stop' was not declared. Should it be static?
      drivers/net/ethernet/hisilicon/hns/hns_ae_adapt.c:360:6: warning: symbol 'hns_ae_toggle_ring_irq' was not declared. Should it be static?
      drivers/net/ethernet/hisilicon/hns/hns_ae_adapt.c:580:6: warning: symbol 'hns_ae_update_stats' was not declared. Should it be static?
      drivers/net/ethernet/hisilicon/hns/hns_ae_adapt.c:663:6: warning: symbol 'hns_ae_get_stats' was not declared. Should it be static?
      drivers/net/ethernet/hisilicon/hns/hns_ae_adapt.c:695:6: warning: symbol 'hns_ae_get_strings' was not declared. Should it be static?
      drivers/net/ethernet/hisilicon/hns/hns_ae_adapt.c:728:5: warning: symbol 'hns_ae_get_sset_count' was not declared. Should it be static?
      drivers/net/ethernet/hisilicon/hns/hns_ae_adapt.c:774:6: warning: symbol 'hns_ae_update_led_status' was not declared. Should it be static?
      drivers/net/ethernet/hisilicon/hns/hns_ae_adapt.c:786:5: warning: symbol 'hns_ae_cpld_set_led_id' was not declared. Should it be static?
      drivers/net/ethernet/hisilicon/hns/hns_ae_adapt.c:798:6: warning: symbol 'hns_ae_get_regs' was not declared. Should it be static?
      drivers/net/ethernet/hisilicon/hns/hns_ae_adapt.c:823:5: warning: symbol 'hns_ae_get_regs_len' was not declared. Should it be static?
      drivers/net/ethernet/hisilicon/hns/hns_dsaf_gmac.c:342:6: warning: symbol 'hns_gmac_update_stats' was not declared. Should it be static?
      drivers/net/ethernet/hisilicon/hns/hns_dsaf_mac.c:934:12: warning: symbol 'hns_mac_get_vaddr' was not declared. Should it be static?
      drivers/net/ethernet/hisilicon/hns/hns_dsaf_mac.c:953:5: warning: symbol 'hns_mac_get_cfg' was not declared. Should it be static?
      drivers/net/ethernet/hisilicon/hns/hns_dsaf_misc.c:343:6: warning: symbol 'hns_dsaf_srst_chns' was not declared. Should it be static?
      drivers/net/ethernet/hisilicon/hns/hns_dsaf_misc.c:366:1: warning: symbol 'hns_dsaf_srst_chns_acpi' was not declared. Should it be static?
      drivers/net/ethernet/hisilicon/hns/hns_dsaf_misc.c:373:6: warning: symbol 'hns_dsaf_roce_srst' was not declared. Should it be static?
      drivers/net/ethernet/hisilicon/hns/hns_dsaf_misc.c:387:6: warning: symbol 'hns_dsaf_roce_srst_acpi' was not declared. Should it be static?
      drivers/net/ethernet/hisilicon/hns/hns_dsaf_misc.c:571:5: warning: symbol 'hns_mac_get_sfp_prsnt' was not declared. Should it be static?
      drivers/net/ethernet/hisilicon/hns/hns_dsaf_misc.c:589:5: warning: symbol 'hns_mac_get_sfp_prsnt_acpi' was not declared. Should it be static?
      drivers/net/ethernet/hisilicon/hns/hns_dsaf_main.c:31:12: warning: symbol 'g_dsaf_mode_match' was not declared. Should it be static?
      drivers/net/ethernet/hisilicon/hns/hns_dsaf_main.c:45:5: warning: symbol 'hns_dsaf_get_cfg' was not declared. Should it be static?
      drivers/net/ethernet/hisilicon/hns/hns_dsaf_main.c:962:6: warning: symbol 'hns_dsaf_tcam_addr_get' was not declared. Should it be static?
      drivers/net/ethernet/hisilicon/hns/hns_dsaf_main.c:2087:6: warning: symbol 'hns_dsaf_port_work_rate_cfg' was not declared. Should it be static?
      drivers/net/ethernet/hisilicon/hns/hns_dsaf_main.c:2837:5: warning: symbol 'hns_dsaf_roce_reset' was not declared. Should it be static?
      drivers/net/ethernet/hisilicon/hns/hns_dsaf_ppe.c:76:5: warning: symbol 'hns_ppe_common_get_cfg' was not declared. Should it be static?
      drivers/net/ethernet/hisilicon/hns/hns_dsaf_ppe.c:107:6: warning: symbol 'hns_ppe_common_free_cfg' was not declared. Should it be static?
      drivers/net/ethernet/hisilicon/hns/hns_dsaf_ppe.c:340:6: warning: symbol 'hns_ppe_uninit_ex' was not declared. Should it be static?
      drivers/net/ethernet/hisilicon/hns/hns_dsaf_rcb.c:708:5: warning: symbol 'hns_rcb_get_ring_num' was not declared. Should it be static?
      drivers/net/ethernet/hisilicon/hns/hns_dsaf_rcb.c:744:14: warning: symbol 'hns_rcb_common_get_vaddr' was not declared. Should it be static?
      drivers/net/ethernet/hisilicon/hns/hns_dsaf_xgmac.c:314:6: warning: symbol 'hns_xgmac_update_stats' was not declared. Should it be static?
      drivers/net/ethernet/hisilicon/hns/hns_enet.c:1303:6: warning: symbol 'hns_nic_update_stats' was not declared. Should it be static?
      drivers/net/ethernet/hisilicon/hns/hns_enet.c:1585:6: warning: symbol 'hns_nic_poll_controller' was not declared. Should it be static?
      drivers/net/ethernet/hisilicon/hns/hns_enet.c:1938:6: warning: symbol 'hns_set_multicast_list' was not declared. Should it be static?
      drivers/net/ethernet/hisilicon/hns/hns_enet.c:1960:6: warning: symbol 'hns_nic_set_rx_mode' was not declared. Should it be static?
      drivers/net/ethernet/hisilicon/hns/hns_ethtool.c:661:6: warning: symbol 'hns_get_ringparam' was not declared. Should it be static?
      drivers/net/ethernet/hisilicon/hns/hns_ethtool.c:811:6: warning: symbol 'hns_get_channels' was not declared. Should it be static?
      drivers/net/ethernet/hisilicon/hns/hns_ethtool.c:828:6: warning: symbol 'hns_get_ethtool_stats' was not declared. Should it be static?
      drivers/net/ethernet/hisilicon/hns/hns_ethtool.c:886:6: warning: symbol 'hns_get_strings' was not declared. Should it be static?
      drivers/net/ethernet/hisilicon/hns/hns_ethtool.c:976:5: warning: symbol 'hns_get_sset_count' was not declared. Should it be static?
      drivers/net/ethernet/hisilicon/hns/hns_ethtool.c:1010:5: warning: symbol 'hns_phy_led_set' was not declared. Should it be static?
      drivers/net/ethernet/hisilicon/hns/hns_ethtool.c:1032:5: warning: symbol 'hns_set_phys_id' was not declared. Should it be static?
      drivers/net/ethernet/hisilicon/hns/hns_ethtool.c:1106:6: warning: symbol 'hns_get_regs' was not declared. Should it be static?
      Signed-off-by: default avatarYueHaibing <yuehaibing@huawei.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      336a443b
    • Anders Roxell's avatar
      selftests/net: add tls to .gitignore · eb91f42e
      Anders Roxell authored
      Add the tls binary to .gitignore
      
      Fixes: 7f657d5b ("selftests: tls: add selftests for TLS sockets")
      Signed-off-by: default avatarAnders Roxell <anders.roxell@linaro.org>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      eb91f42e
    • Jiri Pirko's avatar
    • Gustavo A. R. Silva's avatar
      rds: send: Fix dead code in rds_sendmsg · dc66fe43
      Gustavo A. R. Silva authored
      Currently, code at label *out* is unreachable. Fix this by updating
      variable *ret* with -EINVAL, so the jump to *out* can be properly
      executed instead of directly returning from function.
      
      Addresses-Coverity-ID: 1472059 ("Structurally dead code")
      Fixes: 1e2b44e7 ("rds: Enable RDS IPv6 support")
      Signed-off-by: default avatarGustavo A. R. Silva <gustavo@embeddedor.com>
      Acked-by: default avatarSowmini Varadhan <sowmini.varadhan@oracle.com>
      Acked-by: default avatarSantosh Shilimkar <santosh.shilimkar@oracle.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      dc66fe43
    • Anders Roxell's avatar
      net/rds/Kconfig: RDS should depend on IPV6 · ba7d7e26
      Anders Roxell authored
      Build error, implicit declaration of function __inet6_ehashfn shows up
      When RDS is enabled but not IPV6.
      net/rds/connection.c: In function ‘rds_conn_bucket’:
      net/rds/connection.c:67:9: error: implicit declaration of function ‘__inet6_ehashfn’; did you mean ‘__inet_ehashfn’? [-Werror=implicit-function-declaration]
        hash = __inet6_ehashfn(lhash, 0, fhash, 0, rds_hash_secret);
               ^~~~~~~~~~~~~~~
               __inet_ehashfn
      
      Current code adds IPV6 as a depends on in config RDS.
      
      Fixes: eee2fa6a ("rds: Changing IP address internal representation to struct in6_addr")
      Signed-off-by: default avatarAnders Roxell <anders.roxell@linaro.org>
      Acked-by: default avatarSantosh Shilimkar <santosh.shilimkar@oracle.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      ba7d7e26
    • David S. Miller's avatar
      Merge branch 'smc-next' · b9a9ad78
      David S. Miller authored
      Ursula Braun says:
      
      ====================
      net/smc: patches 2018-07-25
      
      here are 4 more patches for SMC: The first one is just a small
      code cleanup in preparation for patch 2. Patch 2 switches to the
      use of the vlan-gid for VLAN traffic. Patch 3 improves diagnosis
      when creating SMC connections. Patch 4 improves synchronization
      between local and remote link groups.
      ====================
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      b9a9ad78
    • Karsten Graul's avatar
      net/smc: improve delete link processing · 0d18a0cb
      Karsten Graul authored
      Send an orderly DELETE LINK request before termination of a link group,
      add support for client triggered DELETE LINK processing. And send a
      disorderly DELETE LINK before module is unloaded.
      Signed-off-by: default avatarKarsten Graul <kgraul@linux.ibm.com>
      Signed-off-by: default avatarUrsula Braun <ubraun@linux.ibm.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      0d18a0cb
    • Karsten Graul's avatar
      net/smc: provide fallback reason code · 603cc149
      Karsten Graul authored
      Remember the fallback reason code and the peer diagnosis code for
      smc sockets, and provide them in smc_diag.c to the netlink interface.
      And add more detailed reason codes.
      Signed-off-by: default avatarKarsten Graul <kgraul@linux.ibm.com>
      Signed-off-by: default avatarUrsula Braun <ubraun@linux.ibm.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      603cc149
    • Ursula Braun's avatar
      net/smc: use correct vlan gid of RoCE device · 7005ada6
      Ursula Braun authored
      SMC code uses the base gid for VLAN traffic. The gids exchanged in
      the CLC handshake and the gid index used for the QP have to switch
      from the base gid to the appropriate vlan gid.
      
      When searching for a matching IB device port for a certain vlan
      device, it does not make sense to return an IB device port, which
      is not enabled for the used vlan_id. Add another check whether a
      vlan gid exists for a certain IB device port.
      Signed-off-by: default avatarUrsula Braun <ubraun@linux.ibm.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      7005ada6
    • Ursula Braun's avatar
      net/smc: fewer parameters for smc_llc_send_confirm_link() · 947541f3
      Ursula Braun authored
      Link confirmation will always be sent across the new link being
      confirmed. This allows to shrink the parameter list.
      No functional change.
      Signed-off-by: default avatarUrsula Braun <ubraun@linux.ibm.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      947541f3
    • David S. Miller's avatar
      Merge branch 'nfp-protect-from-theoretical-size-overflows-and-SR-IOV-errors' · f5375305
      David S. Miller authored
      Jakub Kicinski says:
      
      ====================
      nfp: protect from theoretical size overflows and SR-IOV errors
      
      This small set changes the handling of pci_sriov_set_totalvfs() errors.
      nfp is the only driver which fails probe on pci_sriov_set_totalvfs()
      errors.  It turns out some BIOS configurations may break SR-IOV and
      users who don't use that feature should not suffer.
      
      Remaining patches makes sure we use overflow-safe function for ring
      allocation, even though ring sizes are limited.  It won't hurt and
      we can also enable fallback to vmalloc() if memory is tight while
      at it.
      ====================
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      f5375305
    • Jakub Kicinski's avatar
      nfp: protect from theoretical size overflows on HW descriptor ring · 5ea14712
      Jakub Kicinski authored
      Use array_size() and store the size as full size_t to protect from
      theoretical size overflow when handling HW descriptor rings.
      Signed-off-by: default avatarJakub Kicinski <jakub.kicinski@netronome.com>
      Reviewed-by: default avatarDirk van der Merwe <dirk.vandermerwe@netronome.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      5ea14712
    • Jakub Kicinski's avatar
      nfp: restore correct ordering of fields in rx ring structure · e76c1d3d
      Jakub Kicinski authored
      Commit 7f1c684a ("nfp: setup xdp_rxq_info") mixed the cache
      cold and cache hot data in the nfp_net_rx_ring structure (ignoring
      the feedback), to try to fit the structure into 2 cache lines
      after struct xdp_rxq_info was added.  Now that we are about to add
      a new field the structure will grow back to 3 cache lines, so
      order the members correctly.
      Signed-off-by: default avatarJakub Kicinski <jakub.kicinski@netronome.com>
      Reviewed-by: default avatarDirk van der Merwe <dirk.vandermerwe@netronome.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      e76c1d3d
    • Jakub Kicinski's avatar
      nfp: use kvcalloc() to allocate SW buffer descriptor arrays · 46627170
      Jakub Kicinski authored
      Use kvcalloc() instead of tmp variable + kzalloc() when allocating
      SW buffer information to allow falling back to vmalloc and to protect
      from theoretical integer overflow.
      Signed-off-by: default avatarJakub Kicinski <jakub.kicinski@netronome.com>
      Reviewed-by: default avatarDirk van der Merwe <dirk.vandermerwe@netronome.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      46627170
    • Jakub Kicinski's avatar
      nfp: don't fail probe on pci_sriov_set_totalvfs() errors · 5b0ced17
      Jakub Kicinski authored
      On machines with buggy ACPI tables or when SR-IOV is already enabled
      we may not be able to set the SR-IOV VF limit in sysfs, it's not fatal
      because the limit is imposed by the driver anyway.  Only the sysfs
      'sriov_totalvfs' attribute will be too high.  Print an error to inform
      user about the failure but allow probe to continue.
      Signed-off-by: default avatarJakub Kicinski <jakub.kicinski@netronome.com>
      Reviewed-by: default avatarDirk van der Merwe <dirk.vandermerwe@netronome.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      5b0ced17
    • YueHaibing's avatar
      amd-xgbe: use dma_mapping_error to check map errors · b24dbfe9
      YueHaibing authored
      The dma_mapping_error() returns true or false, but we want
      to return -ENOMEM if there was an error.
      
      Fixes: 174fd259 ("amd-xgbe: Implement split header receive support")
      Signed-off-by: default avatarYueHaibing <yuehaibing@huawei.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      b24dbfe9
  2. 25 Jul, 2018 22 commits