summaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
...
| * net/flow_dissector: Save vlan ethertype from headersJianbo Liu2018-07-072-1/+3
|/ | | | | | | | | Change vlan dissector key to save vlan tpid to support both 802.1Q and 802.1AD ethertype. Signed-off-by: Jianbo Liu <jianbol@mellanox.com> Acked-by: Jiri Pirko <jiri@mellanox.com> Signed-off-by: David S. Miller <davem@davemloft.net>
* farsync: remove redundant variable txq_lengthColin Ian King2018-07-071-2/+0Star
| | | | | | | | | | | Variable txq_length is being assigned but is never used hence it is redundant and can be removed. Cleans up clang warning: warning: variable 'txq_length' set but not used [-Wunused-but-set-variable] Signed-off-by: Colin Ian King <colin.king@canonical.com> Signed-off-by: David S. Miller <davem@davemloft.net>
* Merge branch 'Add-a-mlxsw-specific-test-for-mirror-to-gretap'David S. Miller2018-07-073-2/+219
|\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Petr Machata says: ==================== Add a mlxsw-specific test for mirror-to-gretap Some configurations of mirror-to-gretap are impossible for mlxsw to offload. Add a test that checks that these out-of-domain conditions are handled properly by mlxsw. In patch #1, fix mirror_gre_lib.sh and mirror_gre_topo_lib.sh so that they can be imported from directories other than forwarding/. In patch #2, add a test to check handling of several scenarios that mlxsw is expected to fail to offload. ==================== Signed-off-by: David S. Miller <davem@davemloft.net>
| * selftests: mlxsw: Add mlxsw-specific test for mirror to gretapPetr Machata2018-07-071-0/+217
| | | | | | | | | | | | | | | | | | | | Test several aspects of offloading mirror to gretap and ip6gretap netdevices that are specific to mlxsw, such as requirements for TTL and TOS values. Signed-off-by: Petr Machata <petrm@mellanox.com> Reviewed-by: Jiri Pirko <jiri@mellanox.com> Signed-off-by: David S. Miller <davem@davemloft.net>
| * selftests: forwarding: Allow importing dependent librariesPetr Machata2018-07-072-2/+2
|/ | | | | | | | | | | | | | | | The next patch introduces a new mlxsw-specific test that uses mirror_gre_lib.sh and mirror_gre_topo_lib.sh. However when sourcing their own deps, these libraries assume that the test that's running is in the same directory. That's not the case for driver-specific tests. So change the libraries to source their deps through $relative_path. That variable is set up by lib.sh, which should be imported by the test in question in any case. Signed-off-by: Petr Machata <petrm@mellanox.com> Signed-off-by: David S. Miller <davem@davemloft.net>
* Merge branch 'vxlan-fix-default-fdb-entry-user-space-notify-ordering-race'David S. Miller2018-07-072-42/+93
|\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Roopa Prabhu says: ==================== vxlan: fix default fdb entry user-space notify ordering/race Problem: In vxlan_newlink, a default fdb entry is added before register_netdev. The default fdb creation function notifies user-space of the fdb entry on the vxlan device which user-space does not know about yet. (RTM_NEWNEIGH goes before RTM_NEWLINK for the same ifindex). This series fixes the user-space netlink notification ordering issue with the following changes: - decouple fdb notify from fdb create. - Move fdb notify after register_netdev. - modify rtnl_configure_link to allow configuring a link early. - Call rtnl_configure_link in vxlan newlink handler to notify userspace about the newlink before fdb notify and hence avoiding the user-space race. ==================== Fixes: afbd8bae9c79 ("vxlan: add implicit fdb entry for default destination") Signed-off-by: Roopa Prabhu <roopa@cumulusnetworks.com>
| * vxlan: fix default fdb entry netlink notify ordering during netdev createRoopa Prabhu2018-07-071-8/+21
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Problem: In vxlan_newlink, a default fdb entry is added before register_netdev. The default fdb creation function also notifies user-space of the fdb entry on the vxlan device which user-space does not know about yet. (RTM_NEWNEIGH goes before RTM_NEWLINK for the same ifindex). This patch fixes the user-space netlink notification ordering issue with the following changes: - decouple fdb notify from fdb create. - Move fdb notify after register_netdev. - Call rtnl_configure_link in vxlan newlink handler to notify userspace about the newlink before fdb notify and hence avoiding the user-space race. Fixes: afbd8bae9c79 ("vxlan: add implicit fdb entry for default destination") Signed-off-by: Roopa Prabhu <roopa@cumulusnetworks.com> Signed-off-by: David S. Miller <davem@davemloft.net>
| * vxlan: make netlink notify in vxlan_fdb_destroy optionalRoopa Prabhu2018-07-071-6/+8
| | | | | | | | | | | | | | | | Add a new option do_notify to vxlan_fdb_destroy to make sending netlink notify optional. Used by a later patch. Signed-off-by: Roopa Prabhu <roopa@cumulusnetworks.com> Signed-off-by: David S. Miller <davem@davemloft.net>
| * vxlan: add new fdb alloc and create helpersRoopa Prabhu2018-07-071-29/+62
| | | | | | | | | | | | | | | | | | | | | | | | | | | | - Add new vxlan_fdb_alloc helper - rename existing vxlan_fdb_create into vxlan_fdb_update: because it really creates or updates an existing fdb entry - move new fdb creation into a separate vxlan_fdb_create Main motivation for this change is to introduce the ability to decouple vxlan fdb creation and notify, used in a later patch. Signed-off-by: Roopa Prabhu <roopa@cumulusnetworks.com> Signed-off-by: David S. Miller <davem@davemloft.net>
| * rtnetlink: add rtnl_link_state check in rtnl_configure_linkRoopa Prabhu2018-07-071-3/+6
|/ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | rtnl_configure_link sets dev->rtnl_link_state to RTNL_LINK_INITIALIZED and unconditionally calls __dev_notify_flags to notify user-space of dev flags. current call sequence for rtnl_configure_link rtnetlink_newlink rtnl_link_ops->newlink rtnl_configure_link (unconditionally notifies userspace of default and new dev flags) If a newlink handler wants to call rtnl_configure_link early, we will end up with duplicate notifications to user-space. This patch fixes rtnl_configure_link to check rtnl_link_state and call __dev_notify_flags with gchanges = 0 if already RTNL_LINK_INITIALIZED. Later in the series, this patch will help the following sequence where a driver implementing newlink can call rtnl_configure_link to initialize the link early. makes the following call sequence work: rtnetlink_newlink rtnl_link_ops->newlink (vxlan) -> rtnl_configure_link (initializes link and notifies user-space of default dev flags) rtnl_configure_link (updates dev flags if requested by user ifm and notifies user-space of new dev flags) Signed-off-by: Roopa Prabhu <roopa@cumulusnetworks.com> Signed-off-by: David S. Miller <davem@davemloft.net>
* devlink: fix incorrect return statementArnd Bergmann2018-07-071-1/+0Star
| | | | | | | | | | | | | | | | | A newly added dummy helper function tries to return a failure from a "void" function: In file included from include/net/dsa.h:24, from arch/arm/plat-orion/common.c:21: include/net/devlink.h: In function 'devlink_param_value_changed': include/net/devlink.h:771:9: error: 'return' with a value, in function returning void [-Werror] return -EOPNOTSUPP; This fixes it by removing the bogus statement. Fixes: ea601e170988 ("devlink: Add devlink notifications support for params") Signed-off-by: Arnd Bergmann <arnd@arndb.de> Signed-off-by: David S. Miller <davem@davemloft.net>
* mlxsw: spectrum_router: avoid uninitialized variable accessArnd Bergmann2018-07-071-4/+2Star
| | | | | | | | | | | | | | | | | When CONFIG_BRIDGE_VLAN_FILTERING is disabled, gcc correctly points out that the 'vid' variable is uninitialized whenever br_vlan_get_pvid returns an error: drivers/net/ethernet/mellanox/mlxsw/spectrum_router.c: In function 'mlxsw_sp_rif_vlan_fid_get': drivers/net/ethernet/mellanox/mlxsw/spectrum_router.c:6881:6: error: 'vid' may be used uninitialized in this function [-Werror=maybe-uninitialized] This changes the condition check to always return -EINVAL here, which I guess is what the author intended here. Fixes: e6f1960ae6c7 ("mlxsw: spectrum_router: Allocate FID according to PVID") Signed-off-by: Arnd Bergmann <arnd@arndb.de> Reviewed-by: Ido Schimmel <idosch@mellanox.com> Signed-off-by: David S. Miller <davem@davemloft.net>
* Merge branch 'hns3-misc-fixes'David S. Miller2018-07-079-74/+70Star
|\ | | | | | | | | | | | | | | | | | | | | | | | | Salil Mehta says: ==================== Misc. bug fixes & cleanups for HNS3 driver This patch-set presents some miscellaneous bug fixes and cleanups for the HNS3 driver. ==================== Signed-off-by: David S. Miller <davem@davemloft.net>
| * net: hns3: Prevent sending command during global or core resetHuazhong Tan2018-07-073-1/+6
| | | | | | | | | | | | | | | | | | | | According to hardware's description, driver should not send command to IMP while hardware doing global or core reset. Signed-off-by: Huazhong Tan <tanhuazhong@huawei.com> Signed-off-by: Peng Li <lipeng321@huawei.com> Signed-off-by: Salil Mehta <salil.mehta@huawei.com> Signed-off-by: David S. Miller <davem@davemloft.net>
| * net: hns3: Remove the warning when clear reset causePeng Li2018-07-071-2/+0Star
| | | | | | | | | | | | | | | | | | | | Only the core/global/IMP reset need clear cause, other type does not need do it. The warning may be treated as error as it is normal. This patch removes the warning. Signed-off-by: Peng Li <lipeng321@huawei.com> Signed-off-by: Salil Mehta <salil.mehta@huawei.com> Signed-off-by: David S. Miller <davem@davemloft.net>
| * net: hns3: Fix get_vector ops in hclgevf_main moduleYunsheng Lin2018-07-071-1/+10
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The hclgevf_free_vector function expects the caller to pass the vector_id to it, and hclgevf_put_vector pass vector to it now, which will cause vector allocation problem. This patch fixes it by converting vector into vector_id before calling hclgevf_free_vector. Fixes: e2cb1dec9779 ("net: hns3: Add HNS3 VF HCL(Hardware Compatibility Layer) Support") Signed-off-by: Yunsheng Lin <linyunsheng@huawei.com> Signed-off-by: Peng Li <lipeng321@huawei.com> Signed-off-by: Salil Mehta <salil.mehta@huawei.com> Signed-off-by: David S. Miller <davem@davemloft.net>
| * net: hns3: Fix warning bug when doing lp selftestYunsheng Lin2018-07-071-0/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The napi_alloc_skb is excepted to be called under the non-preemptible code path when it is called by hns3_clean_rx_ring during loopback selftest, otherwise the below warning will be logged: [ 92.420780] BUG: using smp_processor_id() in preemptible [00000000] code: ethtool/1873 <SNIP> [ 92.463202] check_preemption_disabled+0xf8/0x100 [ 92.467893] debug_smp_processor_id+0x1c/0x28 [ 92.472239] __napi_alloc_skb+0x30/0x130 [ 92.476158] hns3_clean_rx_ring+0x118/0x5f0 [hns3] [ 92.480941] hns3_self_test+0x32c/0x4d0 [hns3] [ 92.485375] ethtool_self_test+0xdc/0x1e8 [ 92.489372] dev_ethtool+0x1020/0x1da8 [ 92.493109] dev_ioctl+0x188/0x3a0 [ 92.496499] sock_do_ioctl+0xf4/0x208 [ 92.500148] sock_ioctl+0x228/0x3e8 [ 92.503626] do_vfs_ioctl+0xc4/0x880 [ 92.507189] SyS_ioctl+0x94/0xa8 [ 92.510404] el0_svc_naked+0x30/0x34 This patch fix it by disabling preemption when calling hns3_clean_rx_ring during loopback selftest. Fixes: c39c4d98dc65 ("net: hns3: Add mac loopback selftest support in hns3 driver") Signed-off-by: Yunsheng Lin <linyunsheng@huawei.com> Signed-off-by: Peng Li <lipeng321@huawei.com> Signed-off-by: Salil Mehta <salil.mehta@huawei.com> Signed-off-by: David S. Miller <davem@davemloft.net>
| * net: hns3: Add configure for mac minimal frame sizeJian Shen2018-07-072-1/+3
| | | | | | | | | | | | | | | | | | | | | | When change the mtu, the minimal frame size of mac will be set to zero, it is incorrect. This patch fixes it by set it to the default value. Signed-off-by: Jian Shen <shenjian15@huawei.com> Signed-off-by: Peng Li <lipeng321@huawei.com> Signed-off-by: Salil Mehta <salil.mehta@huawei.com> Signed-off-by: David S. Miller <davem@davemloft.net>
| * net: hns3: Fix for mailbox message truncated problemFuyun Liang2018-07-071-1/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | The payload of mailbox message is 16 byte and the value of HCLGE_MBX_MAX_ARQ_MSG_SIZE is 8. A message truncated problem will happen when mailbox message is converted to ARQ message. This patch replaces HCLGE_MBX_MAX_ARQ_MSG_SIZE with the size of ARQ message in hclgevf_mbx_handler to fix this problem. Fixes: b11a0bb231f3 ("net: hns3: Add mailbox support to VF driver") Signed-off-by: Fuyun Liang <liangfuyun1@huawei.com> Signed-off-by: Peng Li <lipeng321@huawei.com> Signed-off-by: Salil Mehta <salil.mehta@huawei.com> Signed-off-by: David S. Miller <davem@davemloft.net>
| * net: hns3: Fix for l4 checksum offload bugYunsheng Lin2018-07-071-3/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Hardware only support tcp/udp/sctp l4 checksum offload, but the driver currently tell hardware to do l4 checksum offlad when l3 is IPv4 or IPv6, which may cause checksumm error. This patch fixes it by only enabling the l4 offload when l4 is tcp/udp/sctp. Fixes: 76ad4f0ee747 ("net: hns3: Add support of HNS3 Ethernet Driver for hip08 SoC") Signed-off-by: Yunsheng Lin <linyunsheng@huawei.com> Signed-off-by: Peng Li <lipeng321@huawei.com> Signed-off-by: Salil Mehta <salil.mehta@huawei.com> Signed-off-by: David S. Miller <davem@davemloft.net>
| * net: hns3: Fix for waterline not setting correctlyYunsheng Lin2018-07-071-16/+6Star
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The HCLGE_RX_PRIV_EN_B is used to tell the firmware whether to update the specific waterline value, if the is not set, the firmware will ignore the value. This patch fixes by setting the HCLGE_RX_PRIV_EN_B even if the updated value is zero. Fixes: 46a3df9f9718 ("net: hns3: Add HNS3 Acceleration Engine & Compatibility Layer Support") Signed-off-by: Yunsheng Lin <linyunsheng@huawei.com> Signed-off-by: Peng Li <lipeng321@huawei.com> Signed-off-by: Salil Mehta <salil.mehta@huawei.com> Signed-off-by: David S. Miller <davem@davemloft.net>
| * net: hns3: Fix for mac pause not disable in pfc modeYunsheng Lin2018-07-071-2/+7
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | When pfc pause mode is enable, the mac pause mode need to be disabled, otherwise the pfc pause packet will not be sent when congestion happens. This patch fixes by disabling the mac pause when pfc pause is enabled. Fixes: 848440544b41 ("net: hns3: Add support of TX Scheduler & Shaper to HNS3 driver") Signed-off-by: Yunsheng Lin <linyunsheng@huawei.com> Signed-off-by: Peng Li <lipeng321@huawei.com> Signed-off-by: Salil Mehta <salil.mehta@huawei.com> Signed-off-by: David S. Miller <davem@davemloft.net>
| * net: hns3: Fix tc setup when netdev is first upYunsheng Lin2018-07-071-47/+31Star
|/ | | | | | | | | | | | | | | Currently, tc related configuration is not setup when the netdev is first up, which cause the stack only using tc 0 problem. This patch fixes it by setting the tc related configuration using the info from NCL_CONFIG when netdev is first up. Fixes: 76ad4f0ee747 ("net: hns3: Add support of HNS3 Ethernet Driver for hip08 SoC") Signed-off-by: Yunsheng Lin <linyunsheng@huawei.com> Signed-off-by: Peng Li <lipeng321@huawei.com> Signed-off-by: Salil Mehta <salil.mehta@huawei.com> Signed-off-by: David S. Miller <davem@davemloft.net>
* liquidio: fix kernel panic when NIC firmware is older than 1.7.2Rick Farrington2018-07-072-2/+33
| | | | | | | | | | | | | | | Pre-1.7.2 NIC firmware does not support (and does not respond to) the "get speed" command which is sent by the 1.7.2 driver (for CN23XX-225 cards only) during modprobe. Due to a bug in older firmware (with respect to unknown commands), this unsupported command causes a cascade of errors that ends in a kernel panic. Fix it by making the sending of the "get speed" command conditional on the firmware version. Signed-off-by: Rick Farrington <ricardo.farrington@cavium.com> Signed-off-by: Felix Manlunas <felix.manlunas@cavium.com> Signed-off-by: David S. Miller <davem@davemloft.net>
* Merge branch 'sock-cookie-initializers'David S. Miller2018-07-0720-134/+98Star
|\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Willem de Bruijn says: ==================== sock cookie initializers Recent UDP GSO and SO_TXTIME features added new fields to cookie structs. When adding a field, all sites where a struct is initialized have to be updated, which is a lot of boilerplate. Alternatively, a field can be initialized selectively, but this is fragile. I introduced a bug in udp gso where an uninitialized field was read. See also fix commit ("9887cba19978 ip: limit use of gso_size to udp"). Introduce initializers for structs ipcm(6)_cookie and sockc_cookie. patch 1..3 do exactly this. patch 4..5 make ipv4 and ipv6 handle cookies the same way and remove some boilerplate in doing so. patch 6 removes the udp gso branch that needed the above fix ==================== Signed-off-by: David S. Miller <davem@davemloft.net>
| * ip: unconditionally set cork gso_sizeWillem de Bruijn2018-07-072-4/+2Star
| | | | | | | | | | | | | | | | | | Now that ipc(6)->gso_size is correctly initialized in all callers of ip(6)_setup_cork, it is safe to unconditionally pass it to the cork. Link: http://lkml.kernel.org/r/20180619164752.143249-1-willemdebruijn.kernel@gmail.com Signed-off-by: Willem de Bruijn <willemb@google.com> Signed-off-by: David S. Miller <davem@davemloft.net>
| * ip: remove tx_flags from ipcm_cookie and use same logic for v4 and v6Willem de Bruijn2018-07-076-18/+10Star
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | skb_shinfo(skb)->tx_flags is derived from sk->sk_tsflags, possibly after modification by __sock_cmsg_send, by calling sock_tx_timestamp. The IPv4 and IPv6 paths do this conversion differently. In IPv4, the individual protocols that support tx timestamps call this function and store the result in ipc.tx_flags. In IPv6, sock_tx_timestamp is called in __ip6_append_data. There is no need to store both tx_flags and ts_flags in the cookie as one is derived from the other. Convert when setting up the cork and remove the redundant field. This is similar to IPv6, only have the conversion happen only once per datagram, in ip(6)_setup_cork. Also change __ip6_append_data to match __ip_append_data. Only update tskey if timestamping is enabled with OPT_ID. The SOCK_.. test is redundant: only valid protocols can have non-zero cork->tx_flags. After this change the IPv4 and IPv6 logic is the same. Signed-off-by: Willem de Bruijn <willemb@google.com> Signed-off-by: David S. Miller <davem@davemloft.net>
| * ipv6: fold sockcm_cookie into ipcm6_cookieWillem de Bruijn2018-07-0711-49/+31Star
| | | | | | | | | | | | | | | | | | | | | | ipcm_cookie includes sockcm_cookie. Do the same for ipcm6_cookie. This reduces the number of arguments that need to be passed around, applies ipcm6_init to all cookie fields at once and reduces code differentiation between ipv4 and ipv6. Signed-off-by: Willem de Bruijn <willemb@google.com> Signed-off-by: David S. Miller <davem@davemloft.net>
| * sock: sockc cookie initializerWillem de Bruijn2018-07-073-7/+10
| | | | | | | | | | | | | | | | | | Initialize the cookie in one location to reduce code duplication and avoid bugs from inconsistent initialization, such as that fixed in commit 9887cba19978 ("ip: limit use of gso_size to udp"). Signed-off-by: Willem de Bruijn <willemb@google.com> Signed-off-by: David S. Miller <davem@davemloft.net>
| * ipv6: ipcm6_cookie initializerWillem de Bruijn2018-07-076-18/+25
| | | | | | | | | | | | | | | | | | Initialize the cookie in one location to reduce code duplication and avoid bugs from inconsistent initialization, such as that fixed in commit 9887cba19978 ("ip: limit use of gso_size to udp"). Signed-off-by: Willem de Bruijn <willemb@google.com> Signed-off-by: David S. Miller <davem@davemloft.net>
| * ipv4: ipcm_cookie initializersWillem de Bruijn2018-07-076-39/+21Star
|/ | | | | | | | | Initialize the cookie in one location to reduce code duplication and avoid bugs from inconsistent initialization, such as that fixed in commit 9887cba19978 ("ip: limit use of gso_size to udp"). Signed-off-by: Willem de Bruijn <willemb@google.com> Signed-off-by: David S. Miller <davem@davemloft.net>
* Merge branch 'IP-listification-follow-ups'David S. Miller2018-07-064-24/+133
|\ | | | | | | | | | | | | | | | | | | | | | | | | | | Edward Cree says: ==================== IP listification follow-ups While working on IPv6 list processing, I found another bug in the IPv4 version. So this patch series has that fix, and the IPv6 version with both fixes incorporated. ==================== Signed-off-by: David S. Miller <davem@davemloft.net>
| * net: ipv6: listify ipv6_rcv() and ip6_rcv_finish()Edward Cree2018-07-063-16/+118
| | | | | | | | | | | | | | Essentially the same as the ipv4 equivalents. Signed-off-by: Edward Cree <ecree@solarflare.com> Signed-off-by: David S. Miller <davem@davemloft.net>
| * net: ipv4: fix list processing on L3 slave devicesEdward Cree2018-07-061-8/+15
|/ | | | | | | | | | | | | If we have an L3 master device, l3mdev_ip_rcv() will steal the skb, but we were returning NET_RX_SUCCESS from ip_rcv_finish_core() which meant that ip_list_rcv_finish() would keep it on the list. Instead let's move the l3mdev_ip_rcv() call into the caller, so that our response to a steal can be different in the single packet path (return NET_RX_SUCCESS) and the list path (forget this packet and continue). Fixes: 5fa12739a53d ("net: ipv4: listify ip_rcv_finish") Signed-off-by: Edward Cree <ecree@solarflare.com> Signed-off-by: David S. Miller <davem@davemloft.net>
* net: core: filter: mark expected switch fall-throughGustavo A. R. Silva2018-07-051-0/+1
| | | | | | | | | | In preparation to enabling -Wimplicit-fallthrough, mark switch cases where we are expecting to fall through. Warning level 2 was used: -Wimplicit-fallthrough=2 Signed-off-by: Gustavo A. R. Silva <gustavo@embeddedor.com> Signed-off-by: David S. Miller <davem@davemloft.net>
* net: decnet: dn_nsp_in: mark expected switch fall-throughGustavo A. R. Silva2018-07-051-0/+1
| | | | | | | | In preparation to enabling -Wimplicit-fallthrough, mark switch cases where we are expecting to fall through. Signed-off-by: Gustavo A. R. Silva <gustavo@embeddedor.com> Signed-off-by: David S. Miller <davem@davemloft.net>
* tipc: mark expected switch fall-throughsGustavo A. R. Silva2018-07-052-0/+2
| | | | | | | | | | | In preparation to enabling -Wimplicit-fallthrough, mark switch cases where we are expecting to fall through. Warning level 2 was used: -Wimplicit-fallthrough=2 Signed-off-by: Gustavo A. R. Silva <gustavo@embeddedor.com> Acked-by: Ying Xue <ying.xue@windriver.com> Signed-off-by: David S. Miller <davem@davemloft.net>
* cxgb4: Fix the condition to check if the card is T5Ganesh Goudar2018-07-051-1/+1
| | | | | | | | | Use 'chip_ver' rather than 'chip' to check if the card is T5. Fixes: e8d452923ae6 ("cxgb4: clean up init_one") Signed-off-by: Ganesh Goudar <ganeshgr@chelsio.com> Signed-off-by: David S. Miller <davem@davemloft.net>
* net: ethernet: sun: remove redundant variables adv and lpa and mii_readsColin Ian King2018-07-051-16/+0Star
| | | | | | | | | | | | | Variables adv and lpa are being assigned but are never used hence they are redundant and can be removed. Also remove the unncessary mii_reads too. Cleans up clang warnings: warning: variable 'lpa' set but not used [-Wunused-but-set-variable] warning: variable 'adv' set but not used [-Wunused-but-set-variable] Signed-off-by: Colin Ian King <colin.king@canonical.com> Signed-off-by: David S. Miller <davem@davemloft.net>
* Merge branch 'net-ethernet-Miscellaneous-Kconfig-and-Makefile-cleanups'David S. Miller2018-07-055-10/+12
|\ | | | | | | | | | | | | | | | | | | | | | | | | Geert Uytterhoeven says: ==================== net: ethernet: Miscellaneous Kconfig and Makefile cleanups This patch series contains a few Kconfig and Makefile cleanups w.r.t. Ethernet vendors. ==================== Signed-off-by: David S. Miller <davem@davemloft.net>
| * net: ethernet: sfc: Make subdir logic consistent with other vendorsGeert Uytterhoeven2018-07-052-2/+3
| | | | | | | | | | | | | | | | | | | | Both SFC and SFC_FALCON depend on NET_VENDOR_SOLARFLARE, hence use the latter to decide whether to descend into the sfc subdirectory. Move the rule to descend into sfc/falcon to the sfc subdirectory. Signed-off-by: Geert Uytterhoeven <geert+renesas@glider.be> Acked-by: Martin Habets <mhabets@solarflare.com> Signed-off-by: David S. Miller <davem@davemloft.net>
| * net: ethernet: Add missing VENDOR to Cadence and Packet Engines symbolsGeert Uytterhoeven2018-07-053-8/+8
| | | | | | | | | | | | | | | | | | | | | | | | | | | | The vendor guard Kconfig symbols for Cadence and Packet Engines use a "NET_" prefix, while all other vendor guards use a "NET_VENDOR_" prefix. Hence make them consistent with the rest, and add the missing trailing "S" for Packet Engines while at it. As these options don't directly affect the kernel build, and default to "y", this change has no impact on kernels built with existing (def)configs. Signed-off-by: Geert Uytterhoeven <geert+renesas@glider.be> Signed-off-by: David S. Miller <davem@davemloft.net>
| * net: ethernet: Make NET_VENDOR_AURORA default to yesGeert Uytterhoeven2018-07-051-0/+1
|/ | | | | | | | | Enabling NET_VENDOR_* Kconfig options does not directly affect the kernel build. Hence NET_VENDOR_AURORA should default to yes, like other NET_VENDOR_* options. Signed-off-by: Geert Uytterhoeven <geert+renesas@glider.be> Signed-off-by: David S. Miller <davem@davemloft.net>
* qlogic: netxen: remove various redundant variablesColin Ian King2018-07-052-11/+3Star
| | | | | | | | | | | | | | Variables consumer, cmd_desc, end_cnt and no_of_desc are being assigned but are never used hence they are redundant and can be removed. Cleans up clang warnings: warning: variable 'consumer' set but not used [-Wunused-but-set-variable] warning: variable 'cmd_desc' set but not used [-Wunused-but-set-variable] warning: variable 'end_cnt' set but not used [-Wunused-but-set-variable] warning: variable 'no_of_desc' set but not used [-Wunused-but-set-variable] Signed-off-by: Colin Ian King <colin.king@canonical.com> Signed-off-by: David S. Miller <davem@davemloft.net>
* Merge branch 'devlink-Add-configuration-parameters-support'David S. Miller2018-07-0510-16/+1156
|\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Moshe Shemesh says: ==================== Add configuration parameters support Add configuration parameters setting through devlink. Each device registers supported configuration parameters table. Each parameter can be either generic or driver specific. The user can retrieve data on these parameters by "devlink param show" command and can set new value to a parameter by "devlink param set" command. The parameters can be set in different configuration modes: runtime - set while driver is running, no reset required. driverinit - applied while driver initializes, requires restart driver by devlink reload command. permanent - written to device's non-volatile memory, hard reset required. The patches at the end of the patchset introduce few params that are using the introduced infrastructure on mlx4 and bnxt. Command examples and output: pci/0000:81:00.0: name internal_error_reset type generic values: cmode runtime value true cmode driverinit value true name max_macs type generic values: cmode driverinit value 128 name enable_64b_cqe_eqe type driver-specific values: cmode driverinit value true name enable_4k_uar type driver-specific values: cmode driverinit value false pci/0000:81:00.0: name internal_error_reset type generic values: cmode runtime value false cmode driverinit value true ==================== Signed-off-by: David S. Miller <davem@davemloft.net>
| * bnxt_en: Add bnxt_en initial params table and register it.Vasundhara Volam2018-07-054-11/+147
| | | | | | | | | | | | | | | | | | | | | | | | | | Create initial devlink parameters table for bnxt_en. Table consists of a permanent generic parameter. enable_sriov - Enables Single-Root Input/Output Virtualization(SR-IOV) characteristic of the device. Reviewed-by: Jiri Pirko <jiri@mellanox.com> Reviewed-by: Michael Chan <michael.chan@broadcom.com> Signed-off-by: Vasundhara Volam <vasundhara-v.volam@broadcom.com> Signed-off-by: David S. Miller <davem@davemloft.net>
| * devlink: Add enable_sriov boolean generic parameterVasundhara Volam2018-07-052-1/+9
| | | | | | | | | | | | | | | | | | | | enable_sriov - Enables Single-Root Input/Output Virtualization(SR-IOV) characteristic of the device. Reviewed-by: Michael Chan <michael.chan@broadcom.com> Signed-off-by: Vasundhara Volam <vasundhara-v.volam@broadcom.com> Signed-off-by: Jiri Pirko <jiri@mellanox.com> Signed-off-by: David S. Miller <davem@davemloft.net>
| * mlx4: Add support for devlink reload and load driverinit valuesMoshe Shemesh2018-07-053-3/+55
| | | | | | | | | | | | | | | | | | | | Add mlx4_devlink_reload() to support devlink reload operation. Add mlx4_devlink_param_load_driverinit_values() to load values which were set using driverinit configuration mode. Signed-off-by: Moshe Shemesh <moshe@mellanox.com> Signed-off-by: Jiri Pirko <jiri@mellanox.com> Signed-off-by: David S. Miller <davem@davemloft.net>
| * mlx4: Add mlx4 initial parameters table and register itMoshe Shemesh2018-07-051-2/+106
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Create initial parameters table for mlx4. The table consists of two generic parameters and two driver-specific parameters. Generic: internal_err_reset - Enable reset device on internal errors. This parameter can be configured on mlx4 either on runtime or during driver initialization. max_macs - Max number of MACs per ETH port. For mlx4 this parameter value range is between 1 and 128. This parameter can be configured on mlx4 only during driver initialization. Driver specific: enable_64b_cqe_eqe - Enable 64 byte CQEs/EQEs when the FW supports it. This parameter can be configured on mlx4 only during driver initialization. enable_4k_uar - Enable using 4K UAR. This parameter can be configured on mlx4 only during driver initialization. Register the parameters table on mlx4_init_one() and unregister on mlx4_remove_one(). Signed-off-by: Moshe Shemesh <moshe@mellanox.com> Signed-off-by: Jiri Pirko <jiri@mellanox.com> Signed-off-by: David S. Miller <davem@davemloft.net>
| * devlink: Add generic parameters internal_err_reset and max_macsMoshe Shemesh2018-07-052-1/+44
| | | | | | | | | | | | | | | | | | | | Add 2 first generic parameters to devlink configuration parameters set: internal_err_reset - When set enables reset device on internal errors. max_macs - max number of MACs per ETH port. Signed-off-by: Moshe Shemesh <moshe@mellanox.com> Signed-off-by: Jiri Pirko <jiri@mellanox.com> Signed-off-by: David S. Miller <davem@davemloft.net>