netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Sasha Levin <sashal@kernel.org>
To: linux-kernel@vger.kernel.org, stable@vger.kernel.org
Cc: Sameeh Jubran <sameehj@amazon.com>,
	Arthur Kiyanovski <akiyano@amazon.com>,
	"David S . Miller" <davem@davemloft.net>,
	Sasha Levin <sashal@kernel.org>,
	netdev@vger.kernel.org
Subject: [PATCH AUTOSEL 4.19 332/671] net: ena: fix incorrect test of supported hash function
Date: Thu, 16 Jan 2020 11:59:30 -0500	[thread overview]
Message-ID: <20200116170509.12787-69-sashal@kernel.org> (raw)
In-Reply-To: <20200116170509.12787-1-sashal@kernel.org>

From: Sameeh Jubran <sameehj@amazon.com>

[ Upstream commit d3cfe7ddbc3dfbb9b201615b7fef8fd66d1b5fe8 ]

ena_com_set_hash_function() tests if a hash function is supported
by the device before setting it.
The test returns the opposite result than needed.
Reverse the condition to return the correct value.
Also use the BIT macro instead of inline shift.

Fixes: 1738cd3ed342 ("net: ena: Add a driver for Amazon Elastic Network Adapters (ENA)")
Signed-off-by: Arthur Kiyanovski <akiyano@amazon.com>
Signed-off-by: Sameeh Jubran <sameehj@amazon.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Sasha Levin <sashal@kernel.org>
---
 drivers/net/ethernet/amazon/ena/ena_com.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/net/ethernet/amazon/ena/ena_com.c b/drivers/net/ethernet/amazon/ena/ena_com.c
index 7635c38e77dd..005882c40262 100644
--- a/drivers/net/ethernet/amazon/ena/ena_com.c
+++ b/drivers/net/ethernet/amazon/ena/ena_com.c
@@ -2008,7 +2008,7 @@ int ena_com_set_hash_function(struct ena_com_dev *ena_dev)
 	if (unlikely(ret))
 		return ret;
 
-	if (get_resp.u.flow_hash_func.supported_func & (1 << rss->hash_func)) {
+	if (!(get_resp.u.flow_hash_func.supported_func & BIT(rss->hash_func))) {
 		pr_err("Func hash %d isn't supported by device, abort\n",
 		       rss->hash_func);
 		return -EOPNOTSUPP;
-- 
2.20.1


  parent reply	other threads:[~2020-01-16 18:58 UTC|newest]

Thread overview: 126+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <20200116170509.12787-1-sashal@kernel.org>
2020-01-16 16:58 ` [PATCH AUTOSEL 4.19 272/671] dccp: Fix memleak in __feat_register_sp Sasha Levin
2020-01-16 16:58 ` [PATCH AUTOSEL 4.19 279/671] ehea: Fix a copy-paste err in ehea_init_port_res Sasha Levin
2020-01-16 16:58 ` [PATCH AUTOSEL 4.19 280/671] bpf: Add missed newline in verifier verbose log Sasha Levin
2020-01-16 16:58 ` [PATCH AUTOSEL 4.19 284/671] net/sched: cbs: fix port_rate miscalculation Sasha Levin
2020-01-16 16:58 ` [PATCH AUTOSEL 4.19 288/671] rxrpc: Fix detection of out of order acks Sasha Levin
2020-01-16 16:58 ` [PATCH AUTOSEL 4.19 290/671] brcmfmac: fix leak of mypkt on error return path Sasha Levin
2020-01-16 16:58 ` [PATCH AUTOSEL 4.19 293/671] net: hns3: fix for vport->bw_limit overflow problem Sasha Levin
2020-01-16 16:58 ` [PATCH AUTOSEL 4.19 300/671] tipc: set sysctl_tipc_rmem and named_timeout right range Sasha Levin
2020-01-16 16:59 ` [PATCH AUTOSEL 4.19 303/671] net: hns3: fix loop condition of hns3_get_tx_timeo_queue_info() Sasha Levin
2020-01-16 16:59 ` [PATCH AUTOSEL 4.19 307/671] 6lowpan: Off by one handling ->nexthdr Sasha Levin
2020-01-16 16:59 ` [PATCH AUTOSEL 4.19 320/671] netfilter: nft_flow_offload: add entry to flowtable after confirmation Sasha Levin
2020-01-16 16:59 ` [PATCH AUTOSEL 4.19 323/671] packet: in recvmsg msg_name return at least sizeof sockaddr_ll Sasha Levin
2020-01-16 16:59 ` [PATCH AUTOSEL 4.19 330/671] net: ena: fix swapped parameters when calling ena_com_indirect_table_fill_entry Sasha Levin
2020-01-16 16:59 ` [PATCH AUTOSEL 4.19 331/671] net: ena: fix: Free napi resources when ena_up() fails Sasha Levin
2020-01-16 16:59 ` Sasha Levin [this message]
2020-01-16 16:59 ` [PATCH AUTOSEL 4.19 333/671] net: ena: fix ena_com_fill_hash_function() implementation Sasha Levin
2020-01-16 16:59 ` [PATCH AUTOSEL 4.19 338/671] ath10k: Fix encoding for protected management frames Sasha Levin
2020-01-16 16:59 ` [PATCH AUTOSEL 4.19 343/671] l2tp: Fix possible NULL pointer dereference Sasha Levin
2020-01-16 16:59 ` [PATCH AUTOSEL 4.19 349/671] netfilter: ebtables: CONFIG_COMPAT: reject trailing data after last rule Sasha Levin
2020-01-16 16:59 ` [PATCH AUTOSEL 4.19 353/671] nfp: bpf: fix static check error through tightening shift amount adjustment Sasha Levin
2020-01-16 17:00 ` [PATCH AUTOSEL 4.19 383/671] signal/bpfilter: Fix bpfilter_kernl to use send_sig not force_sig Sasha Levin
2020-01-16 17:00 ` [PATCH AUTOSEL 4.19 385/671] inet: frags: call inet_frags_fini() after unregister_pernet_subsys() Sasha Levin
2020-01-16 17:00 ` [PATCH AUTOSEL 4.19 386/671] net: hns3: fix a memory leak issue for hclge_map_unmap_ring_to_vf_vector Sasha Levin
2020-01-16 17:00 ` [PATCH AUTOSEL 4.19 389/671] netvsc: unshare skb in VF rx handler Sasha Levin
2020-01-16 17:00 ` [PATCH AUTOSEL 4.19 390/671] net: core: support XDP generic on stacked devices Sasha Levin
2020-01-16 17:00 ` [PATCH AUTOSEL 4.19 392/671] net: don't clear sock->sk early to avoid trouble in strparser Sasha Levin
2020-01-16 17:00 ` [PATCH AUTOSEL 4.19 401/671] mpls: fix warning with multi-label encap Sasha Levin
2020-01-16 17:00 ` [PATCH AUTOSEL 4.19 413/671] qed: iWARP - Use READ_ONCE and smp_store_release to access ep->state Sasha Levin
2020-01-16 17:00 ` [PATCH AUTOSEL 4.19 414/671] qed: iWARP - fix uninitialized callback Sasha Levin
2020-01-16 17:00 ` [PATCH AUTOSEL 4.19 417/671] bpf: fix the check that forwarding is enabled in bpf_ipv6_fib_lookup Sasha Levin
2020-01-16 17:00 ` [PATCH AUTOSEL 4.19 420/671] net: netem: fix backlog accounting for corrupted GSO frames Sasha Levin
2020-01-16 17:00 ` [PATCH AUTOSEL 4.19 421/671] net/udp_gso: Allow TX timestamp with UDP GSO Sasha Levin
2020-01-16 17:01 ` [PATCH AUTOSEL 4.19 422/671] net/af_iucv: build proper skbs for HiperTransport Sasha Levin
2020-01-16 17:01 ` [PATCH AUTOSEL 4.19 423/671] net/af_iucv: always register net_device notifier Sasha Levin
2020-01-16 17:01 ` [PATCH AUTOSEL 4.19 428/671] net/sched: cbs: Fix error path of cbs_module_init Sasha Levin
2020-01-16 17:01 ` [PATCH AUTOSEL 4.19 431/671] ip6_fib: Don't discard nodes with valid routing information in fib6_locate_1() Sasha Levin
2020-01-16 17:01 ` [PATCH AUTOSEL 4.19 437/671] tools: bpftool: use correct argument in cgroup errors Sasha Levin
2020-01-16 17:01 ` [PATCH AUTOSEL 4.19 440/671] bnxt_en: Fix ethtool selftest crash under error conditions Sasha Levin
2020-01-16 17:01 ` [PATCH AUTOSEL 4.19 441/671] bnxt_en: Suppress error messages when querying DSCP DCB capabilities Sasha Levin
2020-01-16 17:01 ` [PATCH AUTOSEL 4.19 444/671] rxrpc: Fix uninitialized error code in rxrpc_send_data_packet() Sasha Levin
2020-01-16 17:01 ` [PATCH AUTOSEL 4.19 445/671] xprtrdma: Fix use-after-free in rpcrdma_post_recvs Sasha Levin
2020-01-16 17:01 ` [PATCH AUTOSEL 4.19 458/671] net: pasemi: fix an use-after-free in pasemi_mac_phy_init() Sasha Levin
2020-01-16 17:01 ` [PATCH AUTOSEL 4.19 459/671] net/tls: fix socket wmem accounting on fallback with netem Sasha Levin
2020-01-16 17:01 ` [PATCH AUTOSEL 4.19 461/671] xdp: fix possible cq entry leak Sasha Levin
2020-01-16 17:01 ` [PATCH AUTOSEL 4.19 464/671] xfrm interface: ifname may be wrong in logs Sasha Levin
2020-01-16 17:01 ` [PATCH AUTOSEL 4.19 468/671] libertas_tf: Use correct channel range in lbtf_geo_init Sasha Levin
2020-01-16 17:01 ` [PATCH AUTOSEL 4.19 469/671] qed: reduce maximum stack frame size Sasha Levin
2020-01-16 17:01 ` [PATCH AUTOSEL 4.19 477/671] tipc: reduce risk of wakeup queue starvation Sasha Levin
2020-01-16 17:01 ` [PATCH AUTOSEL 4.19 480/671] net/mlx5: Fix mlx5_ifc_query_lag_out_bits Sasha Levin
2020-01-16 17:02 ` [PATCH AUTOSEL 4.19 483/671] net: fix bpf_xdp_adjust_head regression for generic-XDP Sasha Levin
2020-01-16 17:02 ` [PATCH AUTOSEL 4.19 485/671] cxgb4: smt: Add lock for atomic_dec_and_test Sasha Levin
2020-01-16 17:02 ` [PATCH AUTOSEL 4.19 493/671] net/rds: Add a few missing rds_stat_names entries Sasha Levin
2020-01-16 17:02 ` [PATCH AUTOSEL 4.19 494/671] tools: bpftool: fix arguments for p_err() in do_event_pipe() Sasha Levin
2020-01-16 17:02 ` [PATCH AUTOSEL 4.19 495/671] tools: bpftool: fix format strings and arguments for jsonw_printf() Sasha Levin
2020-01-16 17:02 ` [PATCH AUTOSEL 4.19 497/671] bnxt_en: Fix handling FRAG_ERR when NVM_INSTALL_UPDATE cmd fails Sasha Levin
2020-01-16 17:02 ` [PATCH AUTOSEL 4.19 503/671] mac80211: minstrel_ht: fix per-group max throughput rate initialization Sasha Levin
2020-01-16 17:02 ` [PATCH AUTOSEL 4.19 504/671] i40e: reduce stack usage in i40e_set_fc Sasha Levin
2020-01-16 17:02 ` [PATCH AUTOSEL 4.19 512/671] rxrpc: Fix lack of conn cleanup when local endpoint is cleaned up [ver #2] Sasha Levin
2020-01-16 17:02 ` [PATCH AUTOSEL 4.19 515/671] net/sched: cbs: Set default link speed to 10 Mbps in cbs_set_port_rate Sasha Levin
2020-01-16 17:02 ` [PATCH AUTOSEL 4.19 524/671] netfilter: ctnetlink: honor IPS_OFFLOAD flag Sasha Levin
2020-01-16 17:02 ` [PATCH AUTOSEL 4.19 525/671] ath9k: dynack: fix possible deadlock in ath_dynack_node_{de}init Sasha Levin
2020-01-16 17:02 ` [PATCH AUTOSEL 4.19 526/671] wcn36xx: use dynamic allocation for large variables Sasha Levin
2020-01-16 17:02 ` [PATCH AUTOSEL 4.19 529/671] xsk: avoid store-tearing when assigning queues Sasha Levin
2020-01-16 17:02 ` [PATCH AUTOSEL 4.19 530/671] xsk: avoid store-tearing when assigning umem Sasha Levin
2020-01-16 17:02 ` [PATCH AUTOSEL 4.19 532/671] net: sonic: return NETDEV_TX_OK if failed to map buffer Sasha Levin
2020-01-16 17:02 ` [PATCH AUTOSEL 4.19 533/671] net: hns3: fix error VF index when setting VLAN offload Sasha Levin
2020-01-16 17:02 ` [PATCH AUTOSEL 4.19 534/671] rtlwifi: Fix file release memory leak Sasha Levin
2020-01-16 17:03 ` [PATCH AUTOSEL 4.19 543/671] ixgbe: sync the first fragment unconditionally Sasha Levin
2020-01-16 17:03 ` [PATCH AUTOSEL 4.19 545/671] net: sonic: replace dev_kfree_skb in sonic_send_packet Sasha Levin
2020-01-16 17:03 ` [PATCH AUTOSEL 4.19 548/671] ath10k: adjust skb length in ath10k_sdio_mbox_rx_packet Sasha Levin
2020-01-16 17:03 ` [PATCH AUTOSEL 4.19 551/671] net/rds: Fix 'ib_evt_handler_call' element in 'rds_ib_stat_names' Sasha Levin
2020-01-16 17:03 ` [PATCH AUTOSEL 4.19 553/671] bnxt_en: Increase timeout for HWRM_DBG_COREDUMP_XX commands Sasha Levin
2020-01-16 17:03 ` [PATCH AUTOSEL 4.19 558/671] bpf: fix BTF limits Sasha Levin
2020-01-16 17:03 ` [PATCH AUTOSEL 4.19 561/671] net: aquantia: Fix aq_vec_isr_legacy() return value Sasha Levin
2020-01-16 17:03 ` [PATCH AUTOSEL 4.19 562/671] cxgb4: Signedness bug in init_one() Sasha Levin
2020-01-16 17:03 ` [PATCH AUTOSEL 4.19 563/671] net: hisilicon: Fix signedness bug in hix5hd2_dev_probe() Sasha Levin
2020-01-16 17:03 ` [PATCH AUTOSEL 4.19 564/671] net: broadcom/bcmsysport: Fix signedness in bcm_sysport_probe() Sasha Levin
2020-01-16 17:03 ` [PATCH AUTOSEL 4.19 565/671] net: netsec: Fix signedness bug in netsec_probe() Sasha Levin
2020-01-16 17:03 ` [PATCH AUTOSEL 4.19 566/671] net: socionext: Fix a signedness bug in ave_probe() Sasha Levin
2020-01-16 17:03 ` [PATCH AUTOSEL 4.19 567/671] net: stmmac: dwmac-meson8b: Fix signedness bug in probe Sasha Levin
2020-01-16 17:03 ` [PATCH AUTOSEL 4.19 568/671] net: axienet: fix a " Sasha Levin
2020-01-16 17:03 ` [PATCH AUTOSEL 4.19 569/671] of: mdio: Fix a signedness bug in of_phy_get_and_connect() Sasha Levin
2020-01-16 17:03 ` [PATCH AUTOSEL 4.19 570/671] net: nixge: Fix a signedness bug in nixge_probe() Sasha Levin
2020-01-16 17:03 ` [PATCH AUTOSEL 4.19 571/671] net: ethernet: stmmac: Fix signedness bug in ipq806x_gmac_of_parse() Sasha Levin
2020-01-16 17:03 ` [PATCH AUTOSEL 4.19 572/671] net: sched: cbs: Avoid division by zero when calculating the port rate Sasha Levin
2020-01-16 17:03 ` [PATCH AUTOSEL 4.19 573/671] ipv6: Handle race in addrconf_dad_work Sasha Levin
2020-01-16 17:18   ` David Ahern
2020-01-16 17:20     ` David Ahern
2020-01-17  2:45       ` Sasha Levin
2020-01-16 17:03 ` [PATCH AUTOSEL 4.19 575/671] net: stmmac: gmac4+: Not all Unicast addresses may be available Sasha Levin
2020-01-16 17:03 ` [PATCH AUTOSEL 4.19 576/671] rxrpc: Fix trace-after-put looking at the put connection record Sasha Levin
2020-01-16 17:03 ` [PATCH AUTOSEL 4.19 577/671] rxrpc: Fix trace-after-put looking at the put call record Sasha Levin
2020-01-16 17:03 ` [PATCH AUTOSEL 4.19 578/671] mac80211: accept deauth frames in IBSS mode Sasha Levin
2020-01-16 17:03 ` [PATCH AUTOSEL 4.19 579/671] llc: fix another potential sk_buff leak in llc_ui_sendmsg() Sasha Levin
2020-01-16 17:03 ` [PATCH AUTOSEL 4.19 580/671] llc: fix sk_buff refcounting in llc_conn_state_process() Sasha Levin
2020-01-16 17:03 ` [PATCH AUTOSEL 4.19 581/671] ip6erspan: remove the incorrect mtu limit for ip6erspan Sasha Levin
2020-01-16 17:03 ` [PATCH AUTOSEL 4.19 582/671] iwlwifi: pcie: fix memory leaks in iwl_pcie_ctxt_info_gen3_init Sasha Levin
2020-01-16 17:03 ` [PATCH AUTOSEL 4.19 583/671] net: stmmac: fix length of PTP clock's name string Sasha Levin
2020-01-16 17:03 ` [PATCH AUTOSEL 4.19 584/671] net: stmmac: fix disabling flexible PPS output Sasha Levin
2020-01-16 17:03 ` [PATCH AUTOSEL 4.19 585/671] sctp: add chunks to sk_backlog when the newsk sk_socket is not set Sasha Levin
2020-01-16 17:03 ` [PATCH AUTOSEL 4.19 588/671] act_mirred: Fix mirred_init_module error handling Sasha Levin
2020-01-16 17:03 ` [PATCH AUTOSEL 4.19 589/671] net: avoid possible false sharing in sk_leave_memory_pressure() Sasha Levin
2020-01-16 17:03 ` [PATCH AUTOSEL 4.19 590/671] net: add {READ|WRITE}_ONCE() annotations on ->rskq_accept_head Sasha Levin
2020-01-16 17:03 ` [PATCH AUTOSEL 4.19 591/671] tcp: annotate lockless access to tcp_memory_pressure Sasha Levin
2020-01-16 17:03 ` [PATCH AUTOSEL 4.19 593/671] net/smc: receive returns without data Sasha Levin
2020-01-16 17:03 ` [PATCH AUTOSEL 4.19 594/671] net/smc: receive pending data after RCV_SHUTDOWN Sasha Levin
2020-01-16 17:03 ` [PATCH AUTOSEL 4.19 596/671] vhost/test: stop device before reset Sasha Levin
2020-01-16 17:03 ` [PATCH AUTOSEL 4.19 600/671] net: netem: fix error path for corrupted GSO frames Sasha Levin
2020-01-16 17:03 ` [PATCH AUTOSEL 4.19 601/671] net: netem: correct the parent's backlog when corrupted packet was dropped Sasha Levin
2020-01-16 17:04 ` [PATCH AUTOSEL 4.19 602/671] xsk: Fix registration of Rx-only sockets Sasha Levin
2020-01-16 17:04 ` [PATCH AUTOSEL 4.19 603/671] bpf, offload: Unlock on error in bpf_offload_dev_create() Sasha Levin
2020-01-16 17:04 ` [PATCH AUTOSEL 4.19 605/671] net: qca_spi: Move reset_count to struct qcaspi Sasha Levin
2020-01-16 17:04 ` [PATCH AUTOSEL 4.19 606/671] hv_netvsc: Fix offset usage in netvsc_send_table() Sasha Levin
2020-01-16 17:04 ` [PATCH AUTOSEL 4.19 607/671] hv_netvsc: Fix send_table offset in case of a host bug Sasha Levin
2020-01-16 17:04 ` [PATCH AUTOSEL 4.19 611/671] mt7601u: fix bbp version check in mt7601u_wait_bbp_ready Sasha Levin
2020-01-16 17:04 ` [PATCH AUTOSEL 4.19 616/671] cw1200: Fix a signedness bug in cw1200_load_firmware() Sasha Levin
2020-01-16 17:04 ` [PATCH AUTOSEL 4.19 625/671] rtlwifi: Remove unnecessary NULL check in rtl_regd_init Sasha Levin
2020-01-16 17:04 ` [PATCH AUTOSEL 4.19 628/671] SUNRPC: Fix svcauth_gss_proxy_init() Sasha Levin
2020-01-16 17:04 ` [PATCH AUTOSEL 4.19 630/671] dpaa_eth: perform DMA unmapping before read Sasha Levin
2020-01-16 17:04 ` [PATCH AUTOSEL 4.19 631/671] dpaa_eth: avoid timestamp read on error paths Sasha Levin
2020-01-16 17:04 ` [PATCH AUTOSEL 4.19 635/671] hv_netvsc: flag software created hash value Sasha Levin
2020-01-16 17:04 ` [PATCH AUTOSEL 4.19 637/671] net: neigh: use long type to store jiffies delta Sasha Levin
2020-01-16 17:04 ` [PATCH AUTOSEL 4.19 641/671] packet: fix data-race in fanout_flow_is_huge() Sasha Levin
2020-01-16 17:04 ` [PATCH AUTOSEL 4.19 644/671] tipc: update mon's self addr when node addr generated Sasha Levin
2020-01-16 17:05 ` [PATCH AUTOSEL 4.19 664/671] tipc: fix wrong timeout input for tipc_wait_for_cond() Sasha Levin
2020-01-16 17:05 ` [PATCH AUTOSEL 4.19 666/671] samples/bpf: Fix broken xdp_rxq_info due to map order assumptions Sasha Levin

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20200116170509.12787-69-sashal@kernel.org \
    --to=sashal@kernel.org \
    --cc=akiyano@amazon.com \
    --cc=davem@davemloft.net \
    --cc=linux-kernel@vger.kernel.org \
    --cc=netdev@vger.kernel.org \
    --cc=sameehj@amazon.com \
    --cc=stable@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).