Received: by 2002:a05:6a10:1d13:0:0:0:0 with SMTP id pp19csp1828837pxb; Fri, 20 Aug 2021 15:21:52 -0700 (PDT) X-Google-Smtp-Source: ABdhPJz6PV/RjTYNR2l33M9Q9HUR+Gmhn2+V3X74LLsCbIdvchdJY4fSelgKgysfSSb+qct/lQUl X-Received: by 2002:a05:6402:13cf:: with SMTP id a15mr24769514edx.117.1629498112528; Fri, 20 Aug 2021 15:21:52 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1629498112; cv=none; d=google.com; s=arc-20160816; b=1ALAGAZ8FFu6hKAQhUy0mruMGGzjIDon+JmuZjzEfsnNIgUSj4u/yBQ+Qghg36DlfJ tueUssstMbXFV7ayEH9AdfswNjxMiHDaW/hFlpkLu0bJ7m9tC7Ez5VSgHOm1HSvVA7o/ qYW5x1hac3wpj81aLWNaK4cc4iwQldI3EWWsuezJusxJa2p4QmrUkDnmhlE1qLUsQtIY SOskIHeFwtsOxwtg7yV/RiyUPjRW3p3u/8y+aLVd28FqjeiEFrX5AjfuOkgEAxNB3fVv d5AcXgRXSswQ0pKfpfPPKTFXN8Q1ehF4tHH35m1lmQAMYZE1kZoNtOreMbnXo9c4PCAF Qo0Q== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :references:in-reply-to:message-id:subject:cc:to:from:date :dkim-signature; bh=vdoOBPHFf+NVTK/mmVWrpxrtYZvDuSBV2zDP2Ze34p0=; b=SHyhf9JaIzZE4UzrmaCs/VyGdenyXlHXWIpGQrYnYOHcjuG4PiL+bCAhzAOe7pEgfx rtZQxBRhe2RHgQWpzDFquBvZqyhf4EASM2V0oFRiS36n72AK3Quf1EpeS7yDGRWgIsd2 lk9PRI51tXpdVWrEK6dkmv9V2ePKIhPImNpd/LH692ANWkSxzU/SGugzjPnNW1BWXyAb i8a3XrLKzjfWHmsygatghiS6fbjIBeL4ELWTD2GPi3QI/Me2Z5f0cNkvbSnxul+hZfmm Pf5oFl+gkW7oFeUnWbzZoQG43psOuXSs6UslkOf5dbuD/BF08nbvcM2zbASUmt3kR9Xb nAEw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=Xt6rhIWg; spf=pass (google.com: domain of linux-wireless-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-wireless-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id g23si2702650edp.82.2021.08.20.15.21.20; Fri, 20 Aug 2021 15:21:52 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-wireless-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=Xt6rhIWg; spf=pass (google.com: domain of linux-wireless-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-wireless-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231817AbhHTWV5 (ORCPT + 99 others); Fri, 20 Aug 2021 18:21:57 -0400 Received: from mail.kernel.org ([198.145.29.99]:39722 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231334AbhHTWV5 (ORCPT ); Fri, 20 Aug 2021 18:21:57 -0400 Received: by mail.kernel.org (Postfix) with ESMTPSA id A9F0160FBF; Fri, 20 Aug 2021 22:21:17 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1629498078; bh=/mPrx5HSawvrMzpeHVhapxF2G89uzszKWakMrW4wzdE=; h=Date:From:To:Cc:Subject:In-Reply-To:References:From; b=Xt6rhIWgwhMr43PiCxMhVcdaevTSu1UcmhrRaTxeXFgEAEoOrw3lxjMbIcfsZxbWy 9Im+hKABqnV9F2nEAtDWkb8bHqlyyw2MnFoOYpvgkJb/vcXYeIwkcha5bMwIC4fuCI wGMsVR+Z7ffHkHkP2v5ES0OyJxoBTRFhIvLmLMeWuWZxDr48704uWCbv7HkPH/SM9F uro6349EMvH8zJ0pDcQHNNf+1okjnErONWSL2uwPy2DLxJlWwg4HDSplopFS2/h4hl fX58bfIXs0a35ZZmlqgrBzPKQNOfzGoIeABoRJaUSXMgqxEvncKr8HkOWRdItJBCu8 e7YZo4Trvf0yQ== Date: Fri, 20 Aug 2021 15:21:16 -0700 From: Jakub Kicinski To: Grygorii Strashko Cc: Yufeng Mo , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , Subject: Re: [PATCH V3 net-next 2/4] ethtool: extend coalesce setting uAPI with CQE mode Message-ID: <20210820152116.0741369a@kicinski-fedora-pc1c0hjn.dhcp.thefacebook.com> In-Reply-To: <32fd0b32-e748-42d9-6468-b5b1393511e9@ti.com> References: <1629444920-25437-1-git-send-email-moyufeng@huawei.com> <1629444920-25437-3-git-send-email-moyufeng@huawei.com> <32fd0b32-e748-42d9-6468-b5b1393511e9@ti.com> MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Precedence: bulk List-ID: X-Mailing-List: linux-wireless@vger.kernel.org On Fri, 20 Aug 2021 21:27:13 +0300 Grygorii Strashko wrote: > This is very big change which is not only mix two separate changes, but also looks > half-done. From one side you're adding HW feature supported by limited number of HW, > from another - changing most of net drivers to support it by generating mix of legacy > and new kernel_ethtool_coalesce parameters. > > There is also an issue - you do not account get/set_per_queue_coalesce() in any way. ethtool's netlink interface does not support per queue coalescing. I don't think it's fair to require it as part of this series. > Would it be possible to consider following, please? > > - move extack change out of this series Why? To have to change all the drivers twice? > - option (a) > add new callbacks in ethtool_ops as set_coalesce_cqe/get_coalesce_cqe for CQE support. > Only required drivers will need to be changed. All the params are changed as one operation from user space's perspective. Having two ops would make it problematic for drivers to fail the entire op without modifying half of the parameters in a previous callback. > - option (b) > add struct ethtool_coalesce as first field of kernel_ethtool_coalesce This ends up being more painful than passing an extra parameter in my experience. > struct kernel_ethtool_coalesce { > /* legacy */ > struct ethtool_coalesce coal; > > /* new */ > u8 use_cqe_mode_tx; > u8 use_cqe_mode_rx; > }; > > -- then b.1 > drivers can be updated as > static int set_coalesce(struct net_device *dev, > struct kernel_ethtool_coalesce *kernel_coal) > { > struct ethtool_coalesce *coal = &kernel_coal->coal; > > (which will clearly indicate migration to the new interface ) > > -- then b.2 > add new callbacks in ethtool_ops as set_coalesce_ext/get_coalesce_ext (extended) > which will accept struct kernel_ethtool_coalesce as parameter an allow drivers to migrate when needed > (or as separate patch which will do only migration). > > Personally, I like "b.2". These options were considered. None of the options is great to be honest. Let's try the new params, I say.