[PATCH net v3 1/6] vsock: Keep the binding until socket destruction

2025-01-28 Thread Michal Luczaj
hwframe+0x76/0x7e Fixes: c0cfa2d8a788 ("vsock: add multi-transports support") Reviewed-by: Stefano Garzarella Signed-off-by: Michal Luczaj --- net/vmw_vsock/af_vsock.c | 8 ++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/net/vmw_vsock/af_vsock.c b/net

[PATCH net v3 2/6] vsock: Allow retrying on connect() failure

2025-01-28 Thread Michal Luczaj
) Reviewed-by: Stefano Garzarella Reviewed-by: Luigi Leonardi Signed-off-by: Michal Luczaj --- net/vmw_vsock/af_vsock.c | 5 + 1 file changed, 5 insertions(+) diff --git a/net/vmw_vsock/af_vsock.c b/net/vmw_vsock/af_vsock.c index cfe18bc8fdbe7ced073c6b3644d635

[PATCH net v3 4/6] vsock/test: Introduce vsock_connect_fd()

2025-01-28 Thread Michal Luczaj
Distill timeout-guarded vsock_connect_fd(). Adapt callers. Suggested-by: Stefano Garzarella Reviewed-by: Stefano Garzarella Signed-off-by: Michal Luczaj --- tools/testing/vsock/util.c | 45 + tools/testing/vsock/util.h | 1 + 2 files changed, 18

[PATCH net v3 6/6] vsock/test: Add test for connect() retries

2025-01-28 Thread Michal Luczaj
Deliberately fail a connect() attempt; expect error. Then verify that subsequent attempt (using the same socket) can still succeed, rather than fail outright. Reviewed-by: Stefano Garzarella Reviewed-by: Luigi Leonardi Signed-off-by: Michal Luczaj --- tools/testing/vsock/vsock_test.c | 47

[PATCH net v3 5/6] vsock/test: Add test for UAF due to socket unbinding

2025-01-28 Thread Michal Luczaj
Fail the autobind, then trigger a transport reassign. Socket might get unbound from unbound_sockets, which then leads to a reference count underflow. Reviewed-by: Stefano Garzarella Signed-off-by: Michal Luczaj --- tools/testing/vsock/vsock_test.c | 58

[PATCH net v3 3/6] vsock/test: Introduce vsock_bind()

2025-01-28 Thread Michal Luczaj
Add a helper for socket()+bind(). Adapt callers. Reviewed-by: Stefano Garzarella Reviewed-by: Luigi Leonardi Signed-off-by: Michal Luczaj --- tools/testing/vsock/util.c | 57 +--- tools/testing/vsock/util.h | 1 + tools/testing/vsock

[PATCH net v3 0/6] vsock: Transport reassignment and error handling issues

2025-01-28 Thread Michal Luczaj
opportunity to comment vsock_bind() (patch 3/6), and I've kept your Reviewed-by. Is this okay? Signed-off-by: Michal Luczaj --- Changes in v3: - Rebase - Comment vsock_bind() (Luigi) - Collect Reviewed-by (Stefano, Luigi) - Link to v2: https://lore.kernel.org/r/20250121-vsock-transport-vs-autobind

Re: [PATCH] vsock/virtio: Fix null-ptr-deref in vsock_stream_has_data

2024-12-20 Thread Michal Luczaj
On 12/20/24 11:49, Stefano Garzarella wrote: > ... > Note that non-NULL -> NULL should only occur before a connection is > established, so before any data is passed. Is this a problem for BPF? Please take a look at vsock_bpf_update_proto(). The condition is to have a transport assigned. BPF assum

Re: [PATCH] vsock/virtio: Fix null-ptr-deref in vsock_stream_has_data

2024-12-19 Thread Michal Luczaj
On 12/19/24 16:12, Stefano Garzarella wrote: > On Thu, 19 Dec 2024 at 16:05, Michal Luczaj wrote: >> >> On 12/19/24 15:48, Stefano Garzarella wrote: >>> On Thu, 19 Dec 2024 at 15:36, Michal Luczaj wrote: >>>> >>>> On 12/19/24 09:19, Stefano Ga

Re: [PATCH] vsock/virtio: Fix null-ptr-deref in vsock_stream_has_data

2024-12-19 Thread Michal Luczaj
On 12/19/24 15:48, Stefano Garzarella wrote: > On Thu, 19 Dec 2024 at 15:36, Michal Luczaj wrote: >> >> On 12/19/24 09:19, Stefano Garzarella wrote: >>> ... >>> I think the best thing though is to better understand how to handle >>> deassign, rather t

Re: [PATCH] vsock/virtio: Fix null-ptr-deref in vsock_stream_has_data

2024-12-19 Thread Michal Luczaj
On 12/19/24 09:19, Stefano Garzarella wrote: > ... > I think the best thing though is to better understand how to handle > deassign, rather than checking everywhere that it's not null, also > because in some cases (like the one in virtio-vsock), it's also > important that the transport is the sa

Re: [PATCH] vsock/virtio: Fix null-ptr-deref in vsock_stream_has_data

2024-12-18 Thread Michal Luczaj
On 12/18/24 16:51, Hyunwoo Kim wrote: > On Wed, Dec 18, 2024 at 04:31:03PM +0100, Stefano Garzarella wrote: >> On Wed, Dec 18, 2024 at 03:40:40PM +0100, Stefano Garzarella wrote: >>> On Wed, Dec 18, 2024 at 09:19:08AM -0500, Hyunwoo Kim wrote: At least for vsock_loopback.c, this change doesn’t

Re: [PATCH net v2 0/3] virtio/vsock: Fix memory leaks

2024-12-06 Thread Michal Luczaj
On 11/19/24 11:31, Stefano Garzarella wrote: > Hi Michal, > > On Thu, Nov 07, 2024 at 09:46:11PM +0100, Michal Luczaj wrote: >> Short series fixing some memory leaks that I've stumbled upon while >> toying >> with the selftests. > > Are these tests alread

Re: [PATCH net 4/4] virtio/vsock: Put vsock_connected_sockets_vsk() to use

2024-11-07 Thread Michal Luczaj
On 11/7/24 11:22, Stefano Garzarella wrote: > On Wed, Nov 06, 2024 at 06:51:21PM +0100, Michal Luczaj wrote: >> Macro vsock_connected_sockets_vsk() has been unused since its introduction. >> Instead of removing it, utilise it in vsock_insert_connected() where it's >>

[PATCH net v2 0/3] virtio/vsock: Fix memory leaks

2024-11-07 Thread Michal Luczaj
Short series fixing some memory leaks that I've stumbled upon while toying with the selftests. Signed-off-by: Michal Luczaj --- Changes in v2: - Remove the refactoring patch from the series [Stefano] - PATCH 2: Drop "virtio" from the commit title [Stefano] - Collect Reviewed-by [

Re: [PATCH net 2/4] virtio/vsock: Fix sk_error_queue memory leak

2024-11-07 Thread Michal Luczaj
On 11/7/24 11:17, Stefano Garzarella wrote: > On Wed, Nov 06, 2024 at 06:51:19PM +0100, Michal Luczaj wrote: >> Kernel queues MSG_ZEROCOPY completion notifications on the error queue. >> Where they remain, until explicitly recv()ed. To prevent memory leaks, >> clean up the que

[PATCH net v2 1/3] virtio/vsock: Fix accept_queue memory leak

2024-11-07 Thread Michal Luczaj
: Stefano Garzarella Signed-off-by: Michal Luczaj --- net/vmw_vsock/virtio_transport_common.c | 8 1 file changed, 8 insertions(+) diff --git a/net/vmw_vsock/virtio_transport_common.c b/net/vmw_vsock/virtio_transport_common.c index ccbd2bc0d2109aea4f19

[PATCH net v2 3/3] virtio/vsock: Improve MSG_ZEROCOPY error handling

2024-11-07 Thread Michal Luczaj
Add a missing kfree_skb() to prevent memory leaks. Fixes: 581512a6dc93 ("vsock/virtio: MSG_ZEROCOPY flag support") Reviewed-by: Stefano Garzarella Signed-off-by: Michal Luczaj --- net/vmw_vsock/virtio_transport_common.c | 1 + 1 file changed, 1 insertion(+) diff --git a/net

[PATCH net v2 2/3] vsock: Fix sk_error_queue memory leak

2024-11-07 Thread Michal Luczaj
+0x47/0x80 [] do_syscall_64+0x93/0x180 [] entry_SYSCALL_64_after_hwframe+0x76/0x7e Fixes: 581512a6dc93 ("vsock/virtio: MSG_ZEROCOPY flag support") Signed-off-by: Michal Luczaj --- net/vmw_vsock/af_vsock.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/net/vmw_vsock/af_vsock.c b/net/vmw_vs

[PATCH net 2/4] virtio/vsock: Fix sk_error_queue memory leak

2024-11-06 Thread Michal Luczaj
+0x47/0x80 [] do_syscall_64+0x93/0x180 [] entry_SYSCALL_64_after_hwframe+0x76/0x7e Fixes: 581512a6dc93 ("vsock/virtio: MSG_ZEROCOPY flag support") Signed-off-by: Michal Luczaj --- net/vmw_vsock/af_vsock.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/net/vmw_vsock/af_vsock.c b/net/vmw_vs

[PATCH net 4/4] virtio/vsock: Put vsock_connected_sockets_vsk() to use

2024-11-06 Thread Michal Luczaj
Macro vsock_connected_sockets_vsk() has been unused since its introduction. Instead of removing it, utilise it in vsock_insert_connected() where it's been open-coded. No functional change intended. Fixes: d021c344051a ("VSOCK: Introduce VM Sockets") Signed-off-by: Michal L

[PATCH net 3/4] virtio/vsock: Improve MSG_ZEROCOPY error handling

2024-11-06 Thread Michal Luczaj
Add a missing kfree_skb() to prevent memory leaks. Fixes: 581512a6dc93 ("vsock/virtio: MSG_ZEROCOPY flag support") Signed-off-by: Michal Luczaj --- net/vmw_vsock/virtio_transport_common.c | 1 + 1 file changed, 1 insertion(+) diff --git a/net/vmw_vsock/virtio_transport_commo

[PATCH net 1/4] virtio/vsock: Fix accept_queue memory leak

2024-11-06 Thread Michal Luczaj
x4dc/0x9a0 [] vsock_loopback_work+0xfd/0x140 [] process_one_work+0x20c/0x570 [] worker_thread+0x1bf/0x3a0 [] kthread+0xdd/0x110 [] ret_from_fork+0x2d/0x50 [] ret_from_fork_asm+0x1a/0x30 Fixes: 3fe356d58efa ("vsock/virtio: discard packets only when socket is really closed") Signed-o

[PATCH net 0/4] virtio/vsock: Fix memory leaks

2024-11-06 Thread Michal Luczaj
Short series fixing some memory leaks that I've stumbled upon while toying with the selftests. The last patch is a refactoring. Signed-off-by: Michal Luczaj --- Michal Luczaj (4): virtio/vsock: Fix accept_queue memory leak virtio/vsock: Fix sk_error_queue memory leak v

Re: [PATCH net-next v7 00/10] virtio-net: support AF_XDP zero copy

2024-07-05 Thread Michal Kubiak
or the XDP Socket > Zerocopy. > > After taking a look at this series I haven't found adding NETDEV_XDP_ACT_XSK_ZEROCOPY flag to netdev->xdp_features. Is it intentional or just an oversight? Thanks, Michal

Re: [PATCH net v4 1/2] net: sched: fix packet stuck problem for lockless qdisc

2021-04-20 Thread Michal Kubecek
On Tue, Apr 20, 2021 at 01:55:03AM +0200, Michal Kubecek wrote: > On Mon, Apr 19, 2021 at 05:29:46PM +0200, Michal Kubecek wrote: > > > > As pointed out in the discussion on v3, this patch may result in > > significantly higher CPU consumption with multiple threads competi

Re: [PATCH v2] docs: proc.rst: meminfo: briefly describe gaps in memory accounting

2021-04-20 Thread Michal Hocko
On Tue 20-04-21 15:57:08, Michal Hocko wrote: [...] > Usual memory consumption is usually something like LRU pages + Slab > memory + kernel stack + vmalloc used + pcp. > > > But I know that KernelStack is allocated through vmalloc these days, > > and I don't know wh

Re: [PATCH v2] docs: proc.rst: meminfo: briefly describe gaps in memory accounting

2021-04-20 Thread Michal Hocko
Similarly, is Mlocked a subset of Unevictable? > > There is some attempt at explaining how these numbers fit together, but > it's outdated, and doesn't include Mlocked, Unevictable or KernelStack Agreed there is a lot of tribal knowledge or even misconceptions flying around and it will take much more work to put everything into shape. This is only one tiny step forward. -- Michal Hocko SUSE Labs

Re: [PATCH v2] docs: proc.rst: meminfo: briefly describe gaps in memory accounting

2021-04-20 Thread Michal Hocko
usage. > > > > Signed-off-by: Mike Rapoport > > Ooops, forgot to add Michal's Ack, sorry. Let's make it more explicit Acked-by: Michal Hocko Thanks! -- Michal Hocko SUSE Labs

Re: [PATCH net v4 1/2] net: sched: fix packet stuck problem for lockless qdisc

2021-04-19 Thread Michal Kubecek
On Mon, Apr 19, 2021 at 05:29:46PM +0200, Michal Kubecek wrote: > > As pointed out in the discussion on v3, this patch may result in > significantly higher CPU consumption with multiple threads competing on > a saturated outgoing device. I missed this submission so that I haven't

Re: [PATCH net v4 1/2] net: sched: fix packet stuck problem for lockless qdisc

2021-04-19 Thread Michal Kubecek
the > performance data. > V2: Avoid the overhead of fixing the data race as much as > possible. As pointed out in the discussion on v3, this patch may result in significantly higher CPU consumption with multiple threads competing on a saturated outgoing device. I missed this submission so that I haven't checked it yet but given the description of v3->v4 changes above, it's quite likely that it suffers from the same problem. Michal

Re: [Linuxarm] Re: [PATCH net v3] net: sched: fix packet stuck problem for lockless qdisc

2021-04-19 Thread Michal Kubecek
On Mon, Apr 19, 2021 at 08:21:38PM +0800, Yunsheng Lin wrote: > On 2021/4/19 10:04, Yunsheng Lin wrote: > > On 2021/4/19 6:59, Michal Kubecek wrote: > >> I tried this patch o top of 5.12-rc7 with real devices. I used two > >> machines with 10Gb/s Intel ixgbe NICs, sender

Re: [PATCH net v3] net: sched: fix packet stuck problem for lockless qdisc

2021-04-19 Thread Michal Kubecek
> > helps if all of enqueue, first spin_trylock() failure and setting the > > __QDISC_STATE_NEED_RESCHEDULE flag happen between us finding the > > skb_array empty and checking the flag. If enqueue happens before we > > check the array (and flag is set before the check), the retry is > > useless. If the flag is set after we check it, we don't catch it (no > > matter if the enqueue happened before or after we found skb_array > > empty). > > In odrder to avoid doing the "set_bit(__QDISC_STATE_MISSED, &qdisc->state)" > as much as possible, the __QDISC_STATE_NEED_RESCHEDULE need to be set as > as much as possible, so only clear __QDISC_STATE_NEED_RESCHEDULE when the > queue is empty. This is what I'm worried about. We are trying to address a race condition which is extremely rare so we should avoid adding too much overhead to the normal use. > And it has about 5% performance improvement. OK then. It thought that it would do an unnecessary dequeue retry much more often than prevent an unnecessary __netif_schedule() but I did not run any special benchmark to check. Michal

Re: [PATCH net v3] net: sched: fix packet stuck problem for lockless qdisc

2021-04-18 Thread Michal Kubecek
} else { > WRITE_ONCE(qdisc->empty, true); > }i Does the retry really provide significant improvement? IIUC it only helps if all of enqueue, first spin_trylock() failure and setting the __QDISC_STATE_NEED_RESCHEDULE flag happen between us finding the skb_array empty and checking the flag. If enqueue happens before we check the array (and flag is set before the check), the retry is useless. If the flag is set after we check it, we don't catch it (no matter if the enqueue happened before or after we found skb_array empty). Michal

Re: [PATCH net-next v2 3/9] ethtool: add a new command for reading standard stats

2021-04-17 Thread Michal Kubecek
est is already implemented at UAPI level so all we need is to make it available to user. The syntax will be a bit tricky as some string sets are global and some per device. Out of ethtool --show-strings [devname] ethtool --show-strings [devname] set ethtool --show-strings [dev ] the third seems nicest but also least consistent with the rest of ethtool command line syntax. So probably one of the first two. Michal

Re: Broken imx6 to QCA8334 connection since PHYLIB to PHYLINK conversion

2021-04-13 Thread Michal Vokáč
On 13. 04. 21 14:44, Andrew Lunn wrote: On Tue, Apr 13, 2021 at 09:09:37AM +0200, Michal Vokáč wrote: On 12. 04. 21 16:14, Andrew Lunn wrote: The FEC does not have PHY and is connected to the switch at RGMII level. Adding the fixed-link { speed = <1000>; full-duplex; }; subnode to FEC do

Re: Broken imx6 to QCA8334 connection since PHYLIB to PHYLINK conversion

2021-04-13 Thread Michal Vokáč
ack to back PHYs? If you are doing it RGMII level, the FEC also needs a fixed-link. The FEC does not have PHY and is connected to the switch at RGMII level. Adding the fixed-link { speed = <1000>; full-duplex; }; subnode to FEC does not help. Michal

Broken imx6 to QCA8334 connection since PHYLIB to PHYLINK conversion

2021-04-12 Thread Michal Vokáč
ybe this change revealed that our DT configuration [1] is not correct? Or after this change the driver does not handle the rgmii-id configuration properly? Or something else.. Any ideas how to further debug the problem? Thank you in advance, Michal [1] https://elixir.bootlin.com/linux/v5.12-rc7/

Re: [BUG / question] in routing rules, some options (e.g. ipproto, sport) cause rules to be ignored in presence of packet marks

2021-04-09 Thread Michal Soltys
On 3/29/21 10:52 PM, Ido Schimmel wrote: ip_route_me_harder() does not set source / destination port in the flow key, so it explains why fib rules that use them are not hit after mangling the packet. These keys were added in 4.17, but I don't think this use case every worked. You have a differen

Re: [PATCH net v1 1/1] ethtool: fix incorrect datatype in set_eee ops

2021-04-06 Thread Michal Kubecek
.tx_lpi_enabled, .tx_lpi_timer value is interpreted as a number, not a logical value (those two are also __u32). But I don't think it's necessary to resubmit. Reviewed-by: Michal Kubecek > Fixes: fd77be7bd43c ("ethtool: set EEE settings with EEE_SET request") > Cc: # 5.10.x &

Re: Packet gets stuck in NOLOCK pfifo_fast qdisc

2021-04-06 Thread Michal Kubecek
annot make the "queue is empty" check and leaving the critical section atomic, it would make sense to reimplement it in a way which would allow us making it atomic. Michal

Re: Packet gets stuck in NOLOCK pfifo_fast qdisc

2021-04-06 Thread Michal Kubecek
CPU right after a data transfer. Perhaps you could cheat a bit and insert a random delay between the empty queue check and releasing q->seqlock to make it more likely to happen. Other than that, it's rather just "run this complex software in a xen VM and wait". Michal

Re: [PATCH 06/11] cgroup: fix -Wzero-length-bounds warnings

2021-03-30 Thread Michal Koutný
cannot be any callers (it would cause a link error). Such a guarantee would be nicer, I agree. I tried a bit but anandoned it when I saw macros proliferate (which I found less readable than your current variant). But YMMV. Michal signature.asc Description: Digital signature

Re: [BUG / question] in routing rules, some options (e.g. ipproto, sport) cause rules to be ignored in presence of packet marks

2021-03-30 Thread Michal Soltys
On 3/29/21 10:52 PM, Ido Schimmel wrote: On Sun, Mar 28, 2021 at 04:05:29PM +0200, Michal Soltys wrote: Hi, I'm not sure how it behaved in earlier kernels (can check later), but it is / looks bugged in at least recent 5.x+ ones (tests were done with 5.11.8 and 5.10.25). Consider foll

Re: [PATCH 06/11] cgroup: fix -Wzero-length-bounds warnings

2021-03-30 Thread Michal Koutný
rocessor ugliness. Reviewed-by: Michal Koutný signature.asc Description: Digital signature

Re: [BUG / question] in routing rules, some options (e.g. ipproto, sport) cause rules to be ignored in presence of packet marks

2021-03-29 Thread Michal Soltys
On 3/28/21 4:05 PM, Michal Soltys wrote: Hi, iptables -t mangle -A OUTPUT -j MARK --set-mark 1 After some extra checks, the exact same issue happens if we mangle tos instead of mark, so ... iptables -t mangle -A OUTPUT -j TOS --set-tos 0x02 ... will cause same routing issues with

Re: [PATCH net-next v2] net: axienet: Remove redundant dev_err call in axienet_probe()

2021-03-29 Thread Michal Simek
remap_resource(&pdev->dev, ethres); > if (IS_ERR(lp->regs)) { > - dev_err(&pdev->dev, "could not map Axi Ethernet regs.\n"); > ret = PTR_ERR(lp->regs); > goto cleanup_clk; > } > I have already reviewed v1 and I can't see any v2 description what has changed. Why am I getting this v2? Where is my tag? Thanks, Michal

[BUG / question] in routing rules, some options (e.g. ipproto, sport) cause rules to be ignored in presence of packet marks

2021-03-28 Thread Michal Soltys
Hi, I'm not sure how it behaved in earlier kernels (can check later), but it is / looks bugged in at least recent 5.x+ ones (tests were done with 5.11.8 and 5.10.25). Consider following setup: # ip -o ad sh 1: loinet 127.0.0.1/8 scope host lo 2: right1inet 10.0.10.2/24 scope global 3

Re: [mm, net-next v2] mm: net: memcg accounting for TCP rx zerocopy

2021-03-25 Thread Michal Hocko
On Thu 25-03-21 12:47:04, Johannes Weiner wrote: > On Thu, Mar 25, 2021 at 10:02:28AM +0100, Michal Hocko wrote: > > On Wed 24-03-21 15:49:15, Arjun Roy wrote: > > > On Wed, Mar 24, 2021 at 2:24 PM Johannes Weiner > > > wrote: > > > > > > > &g

Re: [mm, net-next v2] mm: net: memcg accounting for TCP rx zerocopy

2021-03-25 Thread Michal Hocko
On Wed 24-03-21 15:49:15, Arjun Roy wrote: > On Wed, Mar 24, 2021 at 2:24 PM Johannes Weiner wrote: > > > > On Wed, Mar 24, 2021 at 10:12:46AM +0100, Michal Hocko wrote: > > > On Tue 23-03-21 11:47:54, Arjun Roy wrote: > > > > On Tue, Mar 23,

Re: [mm, net-next v2] mm: net: memcg accounting for TCP rx zerocopy

2021-03-24 Thread Michal Hocko
had > > reasons against, and it isn't always the case that MEMCG support is > > enabled. > > 3) Use compound_dtor - but I think this would have problems for the > > prior reasons. > > I don't think Michal is suggesting to use PageCompound() or > PageHead().

Re: [mm, net-next v2] mm: net: memcg accounting for TCP rx zerocopy

2021-03-24 Thread Michal Hocko
On Tue 23-03-21 11:47:54, Arjun Roy wrote: > On Tue, Mar 23, 2021 at 7:34 AM Michal Hocko wrote: > > > > On Wed 17-03-21 18:12:55, Johannes Weiner wrote: > > [...] > > > Here is an idea of how it could work: > > > > > > struct pag

Re: [mm, net-next v2] mm: net: memcg accounting for TCP rx zerocopy

2021-03-23 Thread Michal Hocko
always valid when a page is freed this would be really a nice and useful abstraction because you wouldn't have to care about the specific type of page. But maybe I am just overlooking the real complexity there. -- Michal Hocko SUSE Labs

Re: [RFC PATCH V3 net-next 1/5] ethtool: Allow network drivers to dump arbitrary EEPROM data

2021-03-18 Thread Michal Kubecek
EE`` ``ETHTOOL_MSG_EEE_GET`` > >``ETHTOOL_SEEE````ETHTOOL_MSG_EEE_SET`` > >``ETHTOOL_GRSSH`` n/a > > We should check with Michal about this. It is not a direct replacement > of the old IOCTL API, it is new API. He ma

[PATCH] ibmvnic: Fix possibly uninitialized old_num_tx_queues variable warning.

2021-03-02 Thread Michal Suchanek
itionally avoiding the warning. Fixes: 635e442f4a48 ("ibmvnic: merge ibmvnic_reset_init and ibmvnic_init") Signed-off-by: Michal Suchanek --- drivers/net/ethernet/ibm/ibmvnic.c | 8 +++- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/drivers/net/ethernet/ibm/ibmvn

Re: [PATCH net] ethtool: fix the check logic of at least one channel for RX/TX

2021-02-23 Thread Michal Kubecek
On Tue, Feb 23, 2021 at 05:02:06PM -0800, Jakub Kicinski wrote: > On Wed, 24 Feb 2021 01:32:51 +0100 Michal Kubecek wrote: > > On Tue, Feb 23, 2021 at 02:24:40PM +0100, Simon Horman wrote: > > > From: Yinjun Zhang > > > > > > The command "ethtool -L

Re: [PATCH net] ethtool: fix the check logic of at least one channel for RX/TX

2021-02-23 Thread Michal Kubecek
] > are NULL in this case when recent ethtool is used. > > Tested using ethtool v5.10. > > Fixes: 7be92514b99c ("ethtool: check if there is at least one channel for > TX/RX in the core") > Signed-off-by: Yinjun Zhang > Signed-off-by: Simon Horman > Signed-of

Re: [PATCH net] ethtool: fix the check logic of at least one channel for RX/TX

2021-02-23 Thread Michal Kubecek
or > > TX/RX in the core") > > Signed-off-by: Yinjun Zhang > > Signed-off-by: Simon Horman > > Signed-off-by: Louis Peens > > Please make sure you CC Michal on ethtool patches. > > > diff --git a/net/ethtool/channels.c b/net/ethtool/channels.c > >

[PATCH ethtool] ioctl: less confusing error message for master-slave parameter

2021-02-21 Thread Michal Kubecek
eported-by: Bruce LIU Signed-off-by: Michal Kubecek --- ethtool.c | 12 1 file changed, 12 insertions(+) diff --git a/ethtool.c b/ethtool.c index fb90e9e456b9..15e9d34831b3 100644 --- a/ethtool.c +++ b/ethtool.c @@ -72,6 +72,16 @@ static void exit_bad_args(void) exit(1); } +s

Re: [PATCH ethtool v3 0/5] Extend uAPI with lanes parameter

2021-02-14 Thread Michal Kubecek
ion for lanes. > Patch #5: Add lanes to man page. > > v3: > * Add a seperated patch, patch #1, for uapi headers and squash > * the rest of it to patch #2. Series applied, thank you. Michal > > Danielle Ratson (5): > update UAPI header copies > netlink

Re: [PATCH ethtool v2 1/5] ethtool: Extend ethtool link modes settings uAPI with lanes

2021-02-10 Thread Michal Kubecek
er. The important point is to have a consistent snapshot of all copied (and sanitized) uapi headers. Michal signature.asc Description: PGP signature

Re: [PATCH ethtool v2 0/5] Extend uAPI with lanes parameter

2021-02-09 Thread Michal Kubecek
tion/bash/ethtool | 4 > uapi/linux/ethtool_netlink.h | 1 + > 6 files changed, 25 insertions(+) Sorry for the delay, I was busy with other stuff last week and missed that with kernel part accepted, I should take care of the userspace counterpart. The series looks good to me, except for tw

Re: [PATCH ethtool v2 1/5] ethtool: Extend ethtool link modes settings uAPI with lanes

2021-02-09 Thread Michal Kubecek
to your local git repository with kernel tree and takes one argument identifying the commit you want to import the uapi headers from (commit id, tag or branch name can be used). In your case, net-next would be the most likely choice. Michal > Notes: > v2: > * Update headers after

Re: [PATCH ethtool v2 2/5] netlink: settings: Add netlink support for lanes parameter

2021-02-09 Thread Michal Kubecek
+20,7 @@ > struct link_mode_info { > enum link_mode_classclass; > u32 speed; > + u32 lanes; > u8 duplex; > }; > This structure member is not used anywhere in this patc

[PATCH] can: xilinx_can: Simplify code by using dev_err_probe()

2021-02-04 Thread Michal Simek
Use already prepared dev_err_probe() introduced by commit a787e5400a1c ("driver core: add device probe log helper"). It simplifies EPROBE_DEFER handling. Also unify message format for similar error cases. Signed-off-by: Michal Simek --- drivers/net/can/xilinx_can.c | 10

Re: [PATCH net-next v3 2/7] ethtool: Get link mode in use instead of speed and duplex parameters

2021-01-28 Thread Michal Kubecek
> ; Andrew Lunn ; f.faine...@gmail.com; > > Michal Kubecek ; mlxsw > > ; Ido Schimmel > > Subject: Re: [PATCH net-next v3 2/7] ethtool: Get link mode in use instead > > of speed and duplex parameters > > > > For one thing, it's cleaner if the driver

Re: [PATCH ethtool] Fix help message for master-slave option

2021-01-24 Thread Michal Kubecek
On Wed, Jan 20, 2021 at 09:21:22PM +0900, Yuusuke Ashizuka wrote: > Fixes: 558f7cc33daf ("netlink: add master/slave configuration support") > Signed-off-by: Yuusuke Ashizuka Applied, thank you. Michal > --- > ethtool.c | 2 +- > 1 file changed, 1 insertion(+), 1 dele

Re: [PATCH iproute2] iplink: work around rtattr length limits for IFLA_VFINFO_LIST

2021-01-18 Thread Michal Kubecek
overflowing and inform userspace that the list is incomplete. Not perfect but there is no perfect solution which would not require userspace changes to work properly for devices with "too many" VFs. Michal

Re: [PATCH iproute2] iplink: work around rtattr length limits for IFLA_VFINFO_LIST

2021-01-16 Thread Michal Kubecek
proximately 300 bytes, depending on alignment and optional > > fields). Exceeding the limit causes IFLA_VFINFO_LIST's length to wrap > > modulo 16 bits in the kernel's nla_nest_end(). > > Let's add Michal to CC, my faulty memory tells me he was fighting with >

Re: [PATCH] ibmvnic: fix: NULL pointer dereference.

2020-12-30 Thread Michal Suchánek
On Wed, Dec 30, 2020 at 03:23:14PM +0800, YANG LI wrote: > The error is due to dereference a null pointer in function > reset_one_sub_crq_queue(): > > if (!scrq) { > netdev_dbg(adapter->netdev, >"Invalid scrq reset. irq (%d) or msgs(%p).\n", > scrq->irq, scrq->msg

regression in iwlwifi: page fault in iwl_dbg_tlv_alloc_region() (commit ba8f6f4ae254)

2020-12-28 Thread Michal Kubecek
t to write terminating null character into a string which may be read only. There is also a proposed fix. Michal

Re: "ethtool" missing "master-slave" args in "do_sset" function.[TEXT/PLAIN]

2020-12-27 Thread Michal Kubecek
On Sun, Dec 27, 2020 at 12:34:09PM +0800, Bruce LIU wrote: > Hi Michal Kubecek and Network dev team, > > Good day! Hope you are doing well. > This is Bruce from China, and please allow me to cc Rudy from Cisco Systems > in China team. > > We are facing a weird behavio

Link aggregation between Linux server and Netgear switch using 802.3ad not working

2020-12-25 Thread Michal Tarana
with at this point please? If so, do not hesitate to let me know. Thank you very much for reading this rather lengthy report and for any reply. With wishing of all the best, Michal Tarana -- Mgr. Michal Tarana, PhD Department of Theoretical Chemistry J Heyrovský Institute of Physi

ethtool 5.10 released

2020-12-16 Thread Michal Kubecek
: leaked instances of struct nl_socket * Fix: improve compatibility between netlink and ioctl (-s) Enjoy, Michal signature.asc Description: PGP signature

Re: [PATCH net] ethtool: fix error paths in ethnl_set_channels()

2020-12-15 Thread Michal Kubecek
On Tue, Dec 15, 2020 at 10:08:10AM +0100, Ivan Vecera wrote: > Fix two error paths in ethnl_set_channels() to avoid lock-up caused > but unreleased RTNL. > > Fixes: e19c591eafad ("ethtool: set device channel counts with CHANNELS_SET > request") > Cc: Michal Kub

[PATCH net] ethtool: fix string set id check

2020-12-14 Thread Michal Kubecek
tring sets with STRSET_GET request") Reported-by: syzbot+96523fb438937cd01...@syzkaller.appspotmail.com Signed-off-by: Michal Kubecek --- net/ethtool/strset.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/net/ethtool/strset.c b/net/ethtool/strset.c index 0baad0ce1832..c3

Re: [PATCH ethtool] ethtool: do_sset return correct value on fail

2020-12-14 Thread Michal Kubecek
ny request fails or if all fail. (Personally, I would prefer the latter.) And we should probably modify nl_sset() to behave the same way as it currently bails out on first failed request. Michal

[PATCH net] ethtool: fix stack overflow in ethnl_parse_bitset()

2020-12-08 Thread Michal Kubecek
recognize), we also need to cap change_bits to nbits so that we don't try to write past the prepared bitmaps. Fixes: 88db6d1e4f62 ("ethtool: add ethnl_parse_bitset() helper") Reported-by: syzbot+9d39fa49d4df294aa...@syzkaller.appspotmail.com Signed-off-by: Michal Kubecek --- net/e

Re: [PATCH net-next v1 1/9] ethtool: Add support for configuring frame preemption

2020-12-07 Thread Michal Kubecek
Can we be sure that newer version of the standard cannot change this, e.g. come with a finer granularity? Perhaps it would be safer to express the size in bytes in the userspace API and translate to this internal representation in common ethtool code. Also, please don't forget to update Documentation/networking/ethtool-netlink.rst Michal

Re: [PATCH ethtool v2] Improve error message when SFP module is missing

2020-12-06 Thread Michal Kubecek
ason for the failure. > > Signed-off-by: Baruch Siach Applied (with minor whitespace formatting cleanup), thank you. Michal > --- > v2: Limit message to likely errno values (Andrew Lunn) > --- > ethtool.c | 4 > 1 file changed, 4 insertions(+) > > dif

Re: LRO: creating vlan subports affects parent port's LRO settings

2020-12-06 Thread Michal Kubecek
icit list types or default. The logic still makes sense to me. Couldn't we address the issue by either setting features in NETIF_F_UPPER_DISABLES) by default for a new vlan (and probably macvlan) device? Or perhaps inheriting their values from the lower device. Michal

Re: [PATCH v2] net/af_unix: don't create a path for a binded socket

2020-12-01 Thread Michal Kubecek
unix_mknod() out of bindlock"), this should revert it to the original value. As far as I'm aware, only LTP guys noticed back then. I tried to raise the question in this list but nobody seemed to care so I didn't pursue. Technically, both errors are correct as both "address already in use" and "socket already bound" conditions are met and the manual page (neither linux nor posix) doesn't seem to specify which should take precedence. Michal

Re: [PATCH iproute2-next 0/5] iproute2: add libbpf support

2020-11-30 Thread Michal Kubecek
dn't go in right now in the > development cycle anyway, all features for 5.10 had to be in linux-next > before 5.9 was released. >From the context, I believe Stephen meant merging into iproute2 5.10, not kernel. Michal Kubecek

Re: [PATCH net-next 1/6] ethtool: Extend link modes settings uAPI with lanes

2020-11-26 Thread Michal Kubecek
On Wed, Nov 25, 2020 at 10:35:35AM +, Danielle Ratson wrote: > > > What do you think of passing the link modes you have suggested as a > > > bitmask, similar to "supported", that contains only one positive bit? > > > Something like that: > &g

Re: [PATCH net-next 1/6] ethtool: Extend link modes settings uAPI with lanes

2020-11-24 Thread Michal Kubecek
On Mon, Nov 23, 2020 at 09:47:53AM +, Danielle Ratson wrote: > > > > -Original Message- > > From: Michal Kubecek > > Sent: Thursday, October 22, 2020 7:28 PM > > To: Danielle Ratson > > Cc: Jiri Pirko ; Andrew Lunn ; Jakub > > Kicinski ;

Re: [RFC net-next 1/2] ethtool: add support for controling the type of adaptive coalescing

2020-11-20 Thread Michal Kubecek
On Fri, Nov 20, 2020 at 02:39:38PM +0100, Andrew Lunn wrote: > On Fri, Nov 20, 2020 at 08:23:22AM +0100, Michal Kubecek wrote: > > On Fri, Nov 20, 2020 at 10:59:59AM +0800, tanhuazhong wrote: > > > On 2020/11/20 6:02, Michal Kubecek wrote: > > > > > > > >

Re: [RFC net-next 1/2] ethtool: add support for controling the type of adaptive coalescing

2020-11-19 Thread Michal Kubecek
On Fri, Nov 20, 2020 at 10:59:59AM +0800, tanhuazhong wrote: > On 2020/11/20 6:02, Michal Kubecek wrote: > > > > We could use a similar approach as struct ethtool_link_ksettings, e.g. > > > > struct kernel_ethtool_coalesce { > >

Re: [RFC net-next 1/2] ethtool: add support for controling the type of adaptive coalescing

2020-11-19 Thread Michal Kubecek
ct kernel_ethtool_coalesce and ioctl code would be modified to only touch the base (legacy?) part. While already changing the ops arguments, we could also add extack pointer, either as a separate argument or as struct member (I slightly prefer the former). BtW, please don't forget to update the message descriptions in Documentation/networking/ethtool-netlink.rst Michal

Re: [RFC net-next 1/2] ethtool: add support for controling the type of adaptive coalescing

2020-11-19 Thread Michal Kubecek
suffice for a read only bool attribute but if the attribute is expected to be set, we need to distinguish three cases: set to true, set to false and keep current value. That's why we use NLA_U8 for read write bool attributes (0 false, anything else true and attribute not present means leave untouched). Michal

Re: [PATCH net-next v4 5/6] selftests: refactor get_netdev_name function

2020-11-17 Thread Michal Kubecek
On Tue, Nov 17, 2020 at 04:20:14PM +0100, Antonio Cardace wrote: > As pointed out by Michal Kubecek, getting the name > with the previous approach was racy, it's better > and easier to get the name of the device with this > patch's approach. > > Essentialy the fu

RE: [EXT] [PATCH net] qed: fix error return code in qed_iwarp_ll2_start()

2020-11-16 Thread Michal Kalderon
!iwarp_info->mpa_bufs) > + if (!iwarp_info->mpa_bufs) { > + rc = -ENOMEM; > goto err; > + } > > INIT_LIST_HEAD(&iwarp_info->mpa_buf_pending_list); > INIT_LIST_HEAD(&iwarp_info->mpa_buf_list); > -- > 2.9.5 Thanks,  Acked-by: Michal Kalderon 

Re: [PATCH net-next v3 3/4] selftests: extract common functions in ethtool-common.sh

2020-11-16 Thread Michal Kubecek
On Sat, Nov 14, 2020 at 12:16:54AM +0100, Antonio Cardace wrote: > Factor out some useful functions so that they can be reused > by other ethtool-netdevsim scripts. > > Signed-off-by: Antonio Cardace Reviewed-by: Michal Kubecek Just one comment: [...] > +function

Re: [PATCH net-next v3 2/4] netdevsim: support ethtool ring and coalesce settings

2020-11-16 Thread Michal Kubecek
On Sat, Nov 14, 2020 at 12:16:53AM +0100, Antonio Cardace wrote: > Add ethtool ring and coalesce settings support for testing. > > Signed-off-by: Antonio Cardace Reviewed-by: Michal Kubecek signature.asc Description: PGP signature

Re: [PATCH net-next v3 1/4] ethtool: add ETHTOOL_COALESCE_ALL_PARAMS define

2020-11-16 Thread Michal Kubecek
On Sat, Nov 14, 2020 at 12:16:52AM +0100, Antonio Cardace wrote: > This bitmask represents all existing coalesce parameters. > > Signed-off-by: Antonio Cardace Reviewed-by: Michal Kubecek > --- > include/linux/ethtool.h | 1 + > 1 file changed, 1 insertion(+) > > di

Re: [PATCH net-next 1/1] netdevsim: support ethtool ring and coalesce settings

2020-11-13 Thread Michal Kubecek
ns->ethtool.ring.rx_mini_max_pending = UINT32_MAX; > + ns->ethtool.ring.tx_max_pending = UINT32_MAX; > +} This way an ETHTOOL_MSG_RINGS_SET request would never fail. It would be more useful for selftests if the max values were more realistic and ideally also configurable via debugfs. Michal

Re: [PATCH v3 bpf] tools: bpftool: Add missing close before bpftool net attach exit

2020-11-11 Thread Michal Rostecki
goto cleanup; } if (json_output) jsonw_null(json_wtr); - return 0; + err = 0; + +cleanup: + close(progfd); + return err; } static int do_detach(int argc, char **argv) LGTM, thanks! Reviewed-By: Michal Rostecki

Re: [PATCH v2 net] ethtool: netlink: add missing netdev_features_change() call

2020-11-09 Thread Michal Kubecek
netdev features with FEATURES_SET request") > Signed-off-by: Alexander Lobakin Reviewed-by: Michal Kubecek > --- > net/ethtool/features.c | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/net/ethtool/features.c b/net/ethtool/features.c > index 8e

[PATCH ethtool 1/2] netlink: do not send messages and process replies in nl_parser()

2020-11-09 Thread Michal Kubecek
. Signed-off-by: Michal Kubecek --- netlink/cable_test.c | 2 +- netlink/channels.c | 2 +- netlink/coalesce.c | 2 +- netlink/eee.c| 2 +- netlink/parser.c | 43 --- netlink/parser.h | 3 ++- netlink/pause.c | 2 +- netlink

[PATCH ethtool 0/2] netlink: improve compatibility with ioctl interface

2020-11-09 Thread Michal Kubecek
tch cleans up the parser interface; it allows nl_sset() to inspect the composed message and append an attribute to it if needed. Ido Schimmel (1): ethtool: Improve compatibility between netlink and ioctl interfaces Michal Kubecek (1): netlink: do not send messages and process replies in

[PATCH ethtool 2/2] ethtool: Improve compatibility between netlink and ioctl interfaces

2020-11-09 Thread Michal Kubecek
ransceiver: internal MDI-X: on (auto) Supports Wake-on: umbg Wake-on: d Current message level: 0x0007 (7) drv probe link Link detected: yes Signed-off-by: Ido Schimmel Signed-off-by: Michal Kubecek --- net

  1   2   3   4   5   6   7   8   9   10   >