<feed xmlns='http://www.w3.org/2005/Atom'>
<title>kernel/linux.git/drivers/net, branch linux-6.0.y</title>
<subtitle>Linux kernel stable tree (mirror)</subtitle>
<id>https://git.radix-linux.su/kernel/linux.git/atom?h=linux-6.0.y</id>
<link rel='self' href='https://git.radix-linux.su/kernel/linux.git/atom?h=linux-6.0.y'/>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/'/>
<updated>2023-01-12T11:00:46+00:00</updated>
<entry>
<title>net: dsa: qca8k: fix wrong length value for mgmt eth packet</title>
<updated>2023-01-12T11:00:46+00:00</updated>
<author>
<name>Christian Marangi</name>
<email>ansuelsmth@gmail.com</email>
</author>
<published>2022-12-29T16:33:32+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=c6819892662328e903944f01b29e2a272048c779'/>
<id>urn:sha1:c6819892662328e903944f01b29e2a272048c779</id>
<content type='text'>
commit 9807ae69746196ee4bbffe7d22d22ab2b61c6ed0 upstream.

The assumption that Documentation was right about how this value work was
wrong. It was discovered that the length value of the mgmt header is in
step of word size.

As an example to process 4 byte of data the correct length to set is 2.
To process 8 byte 4, 12 byte 6, 16 byte 8...

Odd values will always return the next size on the ack packet.
(length of 3 (6 byte) will always return 8 bytes of data)

This means that a value of 15 (0xf) actually means reading/writing 32 bytes
of data instead of 16 bytes. This behaviour is totally absent and not
documented in the switch Documentation.

In fact from Documentation the max value that mgmt eth can process is
16 byte of data while in reality it can process 32 bytes at once.

To handle this we always round up the length after deviding it for word
size. We check if the result is odd and we round another time to align
to what the switch will provide in the ack packet.
The workaround for the length limit of 15 is still needed as the length
reg max value is 0xf(15)

Reported-by: Ronald Wahl &lt;ronald.wahl@raritan.com&gt;
Tested-by: Ronald Wahl &lt;ronald.wahl@raritan.com&gt;
Fixes: 90386223f44e ("net: dsa: qca8k: add support for larger read/write size with mgmt Ethernet")
Signed-off-by: Christian Marangi &lt;ansuelsmth@gmail.com&gt;
Cc: stable@vger.kernel.org # v5.18+
Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
</content>
</entry>
<entry>
<title>Revert "net: dsa: qca8k: cache lo and hi for mdio write"</title>
<updated>2023-01-12T11:00:45+00:00</updated>
<author>
<name>Christian Marangi</name>
<email>ansuelsmth@gmail.com</email>
</author>
<published>2022-12-29T16:33:34+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=56970b68b38055497583ab00c92a2bf4afd9f607'/>
<id>urn:sha1:56970b68b38055497583ab00c92a2bf4afd9f607</id>
<content type='text'>
commit 03cb9e6d0b32b768e3d9d473c5c4ca1100877664 upstream.

This reverts commit 2481d206fae7884cd07014fd1318e63af35e99eb.

The Documentation is very confusing about the topic.
The cache logic for hi and lo is wrong and actually miss some regs to be
actually written.

What the Documentation actually intended was that it's possible to skip
writing hi OR lo if half of the reg is not needed to be written or read.

Revert the change in favor of a better and correct implementation.

Reported-by: Ronald Wahl &lt;ronald.wahl@raritan.com&gt;
Signed-off-by: Christian Marangi &lt;ansuelsmth@gmail.com&gt;
Cc: stable@vger.kernel.org # v5.18+
Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
</content>
</entry>
<entry>
<title>qed: allow sleep in qed_mcp_trace_dump()</title>
<updated>2023-01-12T11:00:41+00:00</updated>
<author>
<name>Caleb Sander</name>
<email>csander@purestorage.com</email>
</author>
<published>2023-01-03T23:30:21+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=e0387f4f39a8d92302273ac356d1f6b2a38160d8'/>
<id>urn:sha1:e0387f4f39a8d92302273ac356d1f6b2a38160d8</id>
<content type='text'>
[ Upstream commit 5401c3e0992860b11fb4b25796e4c4f1921740df ]

By default, qed_mcp_cmd_and_union() delays 10us at a time in a loop
that can run 500K times, so calls to qed_mcp_nvm_rd_cmd()
may block the current thread for over 5s.
We observed thread scheduling delays over 700ms in production,
with stacktraces pointing to this code as the culprit.

qed_mcp_trace_dump() is called from ethtool, so sleeping is permitted.
It already can sleep in qed_mcp_halt(), which calls qed_mcp_cmd().
Add a "can sleep" parameter to qed_find_nvram_image() and
qed_nvram_read() so they can sleep during qed_mcp_trace_dump().
qed_mcp_trace_get_meta_info() and qed_mcp_trace_read_meta(),
called only by qed_mcp_trace_dump(), allow these functions to sleep.
I can't tell if the other caller (qed_grc_dump_mcp_hw_dump()) can sleep,
so keep b_can_sleep set to false when it calls these functions.

An example stacktrace from a custom warning we added to the kernel
showing a thread that has not scheduled despite long needing resched:
[ 2745.362925,17] ------------[ cut here ]------------
[ 2745.362941,17] WARNING: CPU: 23 PID: 5640 at arch/x86/kernel/irq.c:233 do_IRQ+0x15e/0x1a0()
[ 2745.362946,17] Thread not rescheduled for 744 ms after irq 99
[ 2745.362956,17] Modules linked in: ...
[ 2745.363339,17] CPU: 23 PID: 5640 Comm: lldpd Tainted: P           O    4.4.182+ #202104120910+6d1da174272d.61x
[ 2745.363343,17] Hardware name: FOXCONN MercuryB/Quicksilver Controller, BIOS H11P1N09 07/08/2020
[ 2745.363346,17]  0000000000000000 ffff885ec07c3ed8 ffffffff8131eb2f ffff885ec07c3f20
[ 2745.363358,17]  ffffffff81d14f64 ffff885ec07c3f10 ffffffff81072ac2 ffff88be98ed0000
[ 2745.363369,17]  0000000000000063 0000000000000174 0000000000000074 0000000000000000
[ 2745.363379,17] Call Trace:
[ 2745.363382,17]  &lt;IRQ&gt;  [&lt;ffffffff8131eb2f&gt;] dump_stack+0x8e/0xcf
[ 2745.363393,17]  [&lt;ffffffff81072ac2&gt;] warn_slowpath_common+0x82/0xc0
[ 2745.363398,17]  [&lt;ffffffff81072b4c&gt;] warn_slowpath_fmt+0x4c/0x50
[ 2745.363404,17]  [&lt;ffffffff810d5a8e&gt;] ? rcu_irq_exit+0xae/0xc0
[ 2745.363408,17]  [&lt;ffffffff817c99fe&gt;] do_IRQ+0x15e/0x1a0
[ 2745.363413,17]  [&lt;ffffffff817c7ac9&gt;] common_interrupt+0x89/0x89
[ 2745.363416,17]  &lt;EOI&gt;  [&lt;ffffffff8132aa74&gt;] ? delay_tsc+0x24/0x50
[ 2745.363425,17]  [&lt;ffffffff8132aa04&gt;] __udelay+0x34/0x40
[ 2745.363457,17]  [&lt;ffffffffa04d45ff&gt;] qed_mcp_cmd_and_union+0x36f/0x7d0 [qed]
[ 2745.363473,17]  [&lt;ffffffffa04d5ced&gt;] qed_mcp_nvm_rd_cmd+0x4d/0x90 [qed]
[ 2745.363490,17]  [&lt;ffffffffa04e1dc7&gt;] qed_mcp_trace_dump+0x4a7/0x630 [qed]
[ 2745.363504,17]  [&lt;ffffffffa04e2556&gt;] ? qed_fw_asserts_dump+0x1d6/0x1f0 [qed]
[ 2745.363520,17]  [&lt;ffffffffa04e4ea7&gt;] qed_dbg_mcp_trace_get_dump_buf_size+0x37/0x80 [qed]
[ 2745.363536,17]  [&lt;ffffffffa04ea881&gt;] qed_dbg_feature_size+0x61/0xa0 [qed]
[ 2745.363551,17]  [&lt;ffffffffa04eb427&gt;] qed_dbg_all_data_size+0x247/0x260 [qed]
[ 2745.363560,17]  [&lt;ffffffffa0482c10&gt;] qede_get_regs_len+0x30/0x40 [qede]
[ 2745.363566,17]  [&lt;ffffffff816c9783&gt;] ethtool_get_drvinfo+0xe3/0x190
[ 2745.363570,17]  [&lt;ffffffff816cc152&gt;] dev_ethtool+0x1362/0x2140
[ 2745.363575,17]  [&lt;ffffffff8109bcc6&gt;] ? finish_task_switch+0x76/0x260
[ 2745.363580,17]  [&lt;ffffffff817c2116&gt;] ? __schedule+0x3c6/0x9d0
[ 2745.363585,17]  [&lt;ffffffff810dbd50&gt;] ? hrtimer_start_range_ns+0x1d0/0x370
[ 2745.363589,17]  [&lt;ffffffff816c1e5b&gt;] ? dev_get_by_name_rcu+0x6b/0x90
[ 2745.363594,17]  [&lt;ffffffff816de6a8&gt;] dev_ioctl+0xe8/0x710
[ 2745.363599,17]  [&lt;ffffffff816a58a8&gt;] sock_do_ioctl+0x48/0x60
[ 2745.363603,17]  [&lt;ffffffff816a5d87&gt;] sock_ioctl+0x1c7/0x280
[ 2745.363608,17]  [&lt;ffffffff8111f393&gt;] ? seccomp_phase1+0x83/0x220
[ 2745.363612,17]  [&lt;ffffffff811e3503&gt;] do_vfs_ioctl+0x2b3/0x4e0
[ 2745.363616,17]  [&lt;ffffffff811e3771&gt;] SyS_ioctl+0x41/0x70
[ 2745.363619,17]  [&lt;ffffffff817c6ffe&gt;] entry_SYSCALL_64_fastpath+0x1e/0x79
[ 2745.363622,17] ---[ end trace f6954aa440266421 ]---

Fixes: c965db4446291 ("qed: Add support for debug data collection")
Signed-off-by: Caleb Sander &lt;csander@purestorage.com&gt;
Acked-by: Alok Prasad &lt;palok@marvell.com&gt;
Link: https://lore.kernel.org/r/20230103233021.1457646-1-csander@purestorage.com
Signed-off-by: Jakub Kicinski &lt;kuba@kernel.org&gt;
Signed-off-by: Sasha Levin &lt;sashal@kernel.org&gt;
</content>
</entry>
<entry>
<title>usb: rndis_host: Secure rndis_query check against int overflow</title>
<updated>2023-01-12T11:00:40+00:00</updated>
<author>
<name>Szymon Heidrich</name>
<email>szymon.heidrich@gmail.com</email>
</author>
<published>2023-01-03T09:17:09+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=39eadaf5611ddd064ad1c53da65c02d2b0fe22a4'/>
<id>urn:sha1:39eadaf5611ddd064ad1c53da65c02d2b0fe22a4</id>
<content type='text'>
[ Upstream commit c7dd13805f8b8fc1ce3b6d40f6aff47e66b72ad2 ]

Variables off and len typed as uint32 in rndis_query function
are controlled by incoming RNDIS response message thus their
value may be manipulated. Setting off to a unexpectetly large
value will cause the sum with len and 8 to overflow and pass
the implemented validation step. Consequently the response
pointer will be referring to a location past the expected
buffer boundaries allowing information leakage e.g. via
RNDIS_OID_802_3_PERMANENT_ADDRESS OID.

Fixes: ddda08624013 ("USB: rndis_host, various cleanups")
Signed-off-by: Szymon Heidrich &lt;szymon.heidrich@gmail.com&gt;
Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
Signed-off-by: Sasha Levin &lt;sashal@kernel.org&gt;
</content>
</entry>
<entry>
<title>octeontx2-pf: Fix lmtst ID used in aura free</title>
<updated>2023-01-12T11:00:40+00:00</updated>
<author>
<name>Geetha sowjanya</name>
<email>gakula@marvell.com</email>
</author>
<published>2023-01-03T03:50:12+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=b754dc7c933dd9464223f64b10d33d68ab086cc6'/>
<id>urn:sha1:b754dc7c933dd9464223f64b10d33d68ab086cc6</id>
<content type='text'>
[ Upstream commit 4af1b64f80fbe1275fb02c5f1c0cef099a4a231f ]

Current code uses per_cpu pointer to get the lmtst_id mapped to
the core on which aura_free() is executed. Using per_cpu pointer
without preemption disable causing mismatch between lmtst_id and
core on which pointer gets freed. This patch fixes the issue by
disabling preemption around aura_free.

Fixes: ef6c8da71eaf ("octeontx2-pf: cn10K: Reserve LMTST lines per core")
Signed-off-by: Sunil Goutham &lt;sgoutham@marvell.com&gt;
Signed-off-by: Geetha sowjanya &lt;gakula@marvell.com&gt;
Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
Signed-off-by: Sasha Levin &lt;sashal@kernel.org&gt;
</content>
</entry>
<entry>
<title>drivers/net/bonding/bond_3ad: return when there's no aggregator</title>
<updated>2023-01-12T11:00:40+00:00</updated>
<author>
<name>Daniil Tatianin</name>
<email>d-tatianin@yandex-team.ru</email>
</author>
<published>2023-01-02T09:53:35+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=f9d51267e342a2908fbcd67b2906108c278501d6'/>
<id>urn:sha1:f9d51267e342a2908fbcd67b2906108c278501d6</id>
<content type='text'>
[ Upstream commit 9c807965483f42df1d053b7436eedd6cf28ece6f ]

Otherwise we would dereference a NULL aggregator pointer when calling
__set_agg_ports_ready on the line below.

Found by Linux Verification Center (linuxtesting.org) with the SVACE
static analysis tool.

Fixes: 1da177e4c3f4 ("Linux-2.6.12-rc2")
Signed-off-by: Daniil Tatianin &lt;d-tatianin@yandex-team.ru&gt;
Reviewed-by: Jiri Pirko &lt;jiri@nvidia.com&gt;
Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
Signed-off-by: Sasha Levin &lt;sashal@kernel.org&gt;
</content>
</entry>
<entry>
<title>net: sparx5: Fix reading of the MAC address</title>
<updated>2023-01-12T11:00:39+00:00</updated>
<author>
<name>Horatiu Vultur</name>
<email>horatiu.vultur@microchip.com</email>
</author>
<published>2023-01-02T12:12:15+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=bb913f51f2f0648bb67e5aa3135aa166c030755b'/>
<id>urn:sha1:bb913f51f2f0648bb67e5aa3135aa166c030755b</id>
<content type='text'>
[ Upstream commit 588ab2dc25f60efeb516b4abedb6c551949cc185 ]

There is an issue with the checking of the return value of
'of_get_mac_address', which returns 0 on success and negative value on
failure. The driver interpretated the result the opposite way. Therefore
if there was a MAC address defined in the DT, then the driver was
generating a random MAC address otherwise it would use address 0.
Fix this by checking correctly the return value of 'of_get_mac_address'

Fixes: b74ef9f9cb91 ("net: sparx5: Do not use mac_addr uninitialized in mchp_sparx5_probe()")
Signed-off-by: Horatiu Vultur &lt;horatiu.vultur@microchip.com&gt;
Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
Signed-off-by: Sasha Levin &lt;sashal@kernel.org&gt;
</content>
</entry>
<entry>
<title>vxlan: Fix memory leaks in error path</title>
<updated>2023-01-12T11:00:39+00:00</updated>
<author>
<name>Ido Schimmel</name>
<email>idosch@nvidia.com</email>
</author>
<published>2023-01-02T06:55:56+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=75c1ab900f7cf0485f0be1607c79c55f51faaa90'/>
<id>urn:sha1:75c1ab900f7cf0485f0be1607c79c55f51faaa90</id>
<content type='text'>
[ Upstream commit 06bf62944144a92d83dd14fd1378d2a288259561 ]

The memory allocated by vxlan_vnigroup_init() is not freed in the error
path, leading to memory leaks [1]. Fix by calling
vxlan_vnigroup_uninit() in the error path.

The leaks can be reproduced by annotating gro_cells_init() with
ALLOW_ERROR_INJECTION() and then running:

 # echo "100" &gt; /sys/kernel/debug/fail_function/probability
 # echo "1" &gt; /sys/kernel/debug/fail_function/times
 # echo "gro_cells_init" &gt; /sys/kernel/debug/fail_function/inject
 # printf %#x -12 &gt; /sys/kernel/debug/fail_function/gro_cells_init/retval
 # ip link add name vxlan0 type vxlan dstport 4789 external vnifilter
 RTNETLINK answers: Cannot allocate memory

[1]
unreferenced object 0xffff88810db84a00 (size 512):
  comm "ip", pid 330, jiffies 4295010045 (age 66.016s)
  hex dump (first 32 bytes):
    f8 d5 76 0e 81 88 ff ff 01 00 00 00 00 00 00 02  ..v.............
    03 00 04 00 48 00 00 00 00 00 00 01 04 00 01 00  ....H...........
  backtrace:
    [&lt;ffffffff81a3097a&gt;] kmalloc_trace+0x2a/0x60
    [&lt;ffffffff82f049fc&gt;] vxlan_vnigroup_init+0x4c/0x160
    [&lt;ffffffff82ecd69e&gt;] vxlan_init+0x1ae/0x280
    [&lt;ffffffff836858ca&gt;] register_netdevice+0x57a/0x16d0
    [&lt;ffffffff82ef67b7&gt;] __vxlan_dev_create+0x7c7/0xa50
    [&lt;ffffffff82ef6ce6&gt;] vxlan_newlink+0xd6/0x130
    [&lt;ffffffff836d02ab&gt;] __rtnl_newlink+0x112b/0x18a0
    [&lt;ffffffff836d0a8c&gt;] rtnl_newlink+0x6c/0xa0
    [&lt;ffffffff836c0ddf&gt;] rtnetlink_rcv_msg+0x43f/0xd40
    [&lt;ffffffff83908ce0&gt;] netlink_rcv_skb+0x170/0x440
    [&lt;ffffffff839066af&gt;] netlink_unicast+0x53f/0x810
    [&lt;ffffffff839072d8&gt;] netlink_sendmsg+0x958/0xe70
    [&lt;ffffffff835c319f&gt;] ____sys_sendmsg+0x78f/0xa90
    [&lt;ffffffff835cd6da&gt;] ___sys_sendmsg+0x13a/0x1e0
    [&lt;ffffffff835cd94c&gt;] __sys_sendmsg+0x11c/0x1f0
    [&lt;ffffffff8424da78&gt;] do_syscall_64+0x38/0x80
unreferenced object 0xffff88810e76d5f8 (size 192):
  comm "ip", pid 330, jiffies 4295010045 (age 66.016s)
  hex dump (first 32 bytes):
    04 00 00 00 00 00 00 00 db e1 4f e7 00 00 00 00  ..........O.....
    08 d6 76 0e 81 88 ff ff 08 d6 76 0e 81 88 ff ff  ..v.......v.....
  backtrace:
    [&lt;ffffffff81a3162e&gt;] __kmalloc_node+0x4e/0x90
    [&lt;ffffffff81a0e166&gt;] kvmalloc_node+0xa6/0x1f0
    [&lt;ffffffff8276e1a3&gt;] bucket_table_alloc.isra.0+0x83/0x460
    [&lt;ffffffff8276f18b&gt;] rhashtable_init+0x43b/0x7c0
    [&lt;ffffffff82f04a1c&gt;] vxlan_vnigroup_init+0x6c/0x160
    [&lt;ffffffff82ecd69e&gt;] vxlan_init+0x1ae/0x280
    [&lt;ffffffff836858ca&gt;] register_netdevice+0x57a/0x16d0
    [&lt;ffffffff82ef67b7&gt;] __vxlan_dev_create+0x7c7/0xa50
    [&lt;ffffffff82ef6ce6&gt;] vxlan_newlink+0xd6/0x130
    [&lt;ffffffff836d02ab&gt;] __rtnl_newlink+0x112b/0x18a0
    [&lt;ffffffff836d0a8c&gt;] rtnl_newlink+0x6c/0xa0
    [&lt;ffffffff836c0ddf&gt;] rtnetlink_rcv_msg+0x43f/0xd40
    [&lt;ffffffff83908ce0&gt;] netlink_rcv_skb+0x170/0x440
    [&lt;ffffffff839066af&gt;] netlink_unicast+0x53f/0x810
    [&lt;ffffffff839072d8&gt;] netlink_sendmsg+0x958/0xe70
    [&lt;ffffffff835c319f&gt;] ____sys_sendmsg+0x78f/0xa90

Fixes: f9c4bb0b245c ("vxlan: vni filtering support on collect metadata device")
Signed-off-by: Ido Schimmel &lt;idosch@nvidia.com&gt;
Reviewed-by: Nikolay Aleksandrov &lt;razor@blackwall.org&gt;
Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
Signed-off-by: Sasha Levin &lt;sashal@kernel.org&gt;
</content>
</entry>
<entry>
<title>net: phy: xgmiitorgmii: Fix refcount leak in xgmiitorgmii_probe</title>
<updated>2023-01-12T11:00:38+00:00</updated>
<author>
<name>Miaoqian Lin</name>
<email>linmq006@gmail.com</email>
</author>
<published>2022-12-29T06:29:25+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=52841e71253e6ace72751c72560950474a57d04c'/>
<id>urn:sha1:52841e71253e6ace72751c72560950474a57d04c</id>
<content type='text'>
[ Upstream commit d039535850ee47079d59527e96be18d8e0daa84b ]

of_phy_find_device() return device node with refcount incremented.
Call put_device() to relese it when not needed anymore.

Fixes: ab4e6ee578e8 ("net: phy: xgmiitorgmii: Check phy_driver ready before accessing")
Signed-off-by: Miaoqian Lin &lt;linmq006@gmail.com&gt;
Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
Signed-off-by: Sasha Levin &lt;sashal@kernel.org&gt;
</content>
</entry>
<entry>
<title>net: ena: Update NUMA TPH hint register upon NUMA node update</title>
<updated>2023-01-12T11:00:37+00:00</updated>
<author>
<name>David Arinzon</name>
<email>darinzon@amazon.com</email>
</author>
<published>2022-12-29T07:30:11+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=9099912887dc16a01930c9c40a52411db482038d'/>
<id>urn:sha1:9099912887dc16a01930c9c40a52411db482038d</id>
<content type='text'>
[ Upstream commit a8ee104f986e720cea52133885cc822d459398c7 ]

The device supports a PCIe optimization hint, which indicates on
which NUMA the queue is currently processed. This hint is utilized
by PCIe in order to reduce its access time by accessing the
correct NUMA resources and maintaining cache coherence.

The driver calls the register update for the hint (called TPH -
TLP Processing Hint) during the NAPI loop.

Though the update is expected upon a NUMA change (when a queue
is moved from one NUMA to the other), the current logic performs
a register update when the queue is moved to a different CPU,
but the CPU is not necessarily in a different NUMA.

The changes include:
1. Performing the TPH update only when the queue has switched
a NUMA node.
2. Moving the TPH update call to be triggered only when NAPI was
scheduled from interrupt context, as opposed to a busy-polling loop.
This is due to the fact that during busy-polling, the frequency
of CPU switches for a particular queue is significantly higher,
thus, the likelihood to switch NUMA is much higher. Therefore,
providing the frequent updates to the device upon a NUMA update
are unlikely to be beneficial.

Fixes: 1738cd3ed342 ("net: ena: Add a driver for Amazon Elastic Network Adapters (ENA)")
Signed-off-by: David Arinzon &lt;darinzon@amazon.com&gt;
Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
Signed-off-by: Sasha Levin &lt;sashal@kernel.org&gt;
</content>
</entry>
</feed>
