Received: by 2002:a05:7412:3784:b0:e2:908c:2ebd with SMTP id jk4csp1515778rdb; Mon, 2 Oct 2023 11:57:09 -0700 (PDT) X-Google-Smtp-Source: AGHT+IELdj7EH6xe6aKDsFCkCTrk9HZAjV4S6wFE37C2AS/0sakzK+CXeHQNfkyDSYnugJ5iCf0X X-Received: by 2002:a17:902:ecd2:b0:1c4:29dd:2519 with SMTP id a18-20020a170902ecd200b001c429dd2519mr11642412plh.67.1696273029297; Mon, 02 Oct 2023 11:57:09 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1696273029; cv=none; d=google.com; s=arc-20160816; b=ZY1T/vNse9K7EA8J41YSFw7qdkhFmPdUt9res4fos1HhGi6K45CAAZDMRs/tbZYCsE bRsJ3vIXDx7DoPa/Th5tJOpszMl4nxRGr+HAQQPqKabZvxQAMw9KV0/4QnB5odMr1DHT JbybGV4wHeKWIzQll2UsYDaca0DylCp96sLLuRK21tg6MoUrIpMWKxrnKy/4TOrEoaW1 0yA4da/9+WERPfnX/l7XU11XoAl8z9scm0p9xxI0o82Q2eF3q+zT3WN6gTWkGEQUaTvm C0JLjlARd6OZrlWqe8DyOgiM6UVfCeUImgyyeKP1LsEYuBPn3L+CYdVenr5d2/ABQWWk nfQg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:cc:to:subject :message-id:date:from:in-reply-to:references:mime-version :dkim-signature; bh=869N3vyS+ZVqQWUeBDSfQ2c9Aluwujb0eSJXyHR6CZo=; fh=RUTTD7tS7ncQw6Pe2iFOc+1OI2lu38jYp6WaYrSwKWc=; b=emlN8HpYjV0+Rfl3A699CmqEvgMW/zN5xFUvfek3VOvKGvraIJG20U7sCSscWqLI2X papNLxaJEVyDUiMuP55MhJsoJNLmk6n2nVfLL8eyIBtdOQicLIWi0+efCDXprN+5+4mq GtVwa9N6/U0KM0jh4eJ4vtPjPNW+Eeud6E3eDh9NfOSjw0kZ4cE2OvZWSAo08zxRyVOk 3K5NlNL4IHkWHQBfh2L+2W2IUuZkXzj/1QOO2RjPhZEdqkYZbKwHiGyS9Drt3hiczkUN f1J8UxWryMPdOXZbUB9tIJVALcuh4niPWXsEkr3hhHVFE523s6NlthS17ABbHX539bZo 9lBw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@google.com header.s=20230601 header.b="Ol/yd40c"; spf=pass (google.com: domain of linux-wireless-owner@vger.kernel.org designates 2620:137:e000::3:5 as permitted sender) smtp.mailfrom=linux-wireless-owner@vger.kernel.org; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=google.com Return-Path: Received: from groat.vger.email (groat.vger.email. [2620:137:e000::3:5]) by mx.google.com with ESMTPS id u8-20020a170902bf4800b001c5fc1f79f1si21170012pls.165.2023.10.02.11.57.08 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 02 Oct 2023 11:57:09 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-wireless-owner@vger.kernel.org designates 2620:137:e000::3:5 as permitted sender) client-ip=2620:137:e000::3:5; Authentication-Results: mx.google.com; dkim=pass header.i=@google.com header.s=20230601 header.b="Ol/yd40c"; spf=pass (google.com: domain of linux-wireless-owner@vger.kernel.org designates 2620:137:e000::3:5 as permitted sender) smtp.mailfrom=linux-wireless-owner@vger.kernel.org; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=google.com Received: from out1.vger.email (depot.vger.email [IPv6:2620:137:e000::3:0]) by groat.vger.email (Postfix) with ESMTP id 0C4928080EFA; Mon, 2 Oct 2023 05:35:52 -0700 (PDT) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.10 at groat.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S237062AbjJBMfj (ORCPT + 54 others); Mon, 2 Oct 2023 08:35:39 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:43316 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S236908AbjJBMfi (ORCPT ); Mon, 2 Oct 2023 08:35:38 -0400 Received: from mail-ed1-x52b.google.com (mail-ed1-x52b.google.com [IPv6:2a00:1450:4864:20::52b]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 93B5AAC for ; Mon, 2 Oct 2023 05:35:35 -0700 (PDT) Received: by mail-ed1-x52b.google.com with SMTP id 4fb4d7f45d1cf-537f07dfe8eso11233a12.1 for ; Mon, 02 Oct 2023 05:35:35 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20230601; t=1696250134; x=1696854934; darn=vger.kernel.org; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:from:to:cc:subject:date :message-id:reply-to; bh=869N3vyS+ZVqQWUeBDSfQ2c9Aluwujb0eSJXyHR6CZo=; b=Ol/yd40cSac5ZaQVXI0ud0SZKWeHIT6vtlBXG33DRpbJzuuYhLOtuV/7+d/anrBdpu pSJpIC0WbaeJBMaakVizVc5n+6Gsqi72GTNbhunBHuUByLQpmkL/cARDPi4/jMfARQdi HYOhM3ZqzUHTNdoqSTzz5jcRent8/SjHBT0VDKTRR5TzMX3g3XdsdpZi4AZQI/hoIzix bCldQu8W4ar4oDFIJID3yh3Cp3J4hNwnX77ac9OV8gzwszbMHTMrwT4JKeaDgIBcTmpk +M2zbMghtwHZqUl6d64SVXPYhalXrh/t8B0XDqQVVcbDC4+ccmMAVMl5KnQtX2w8rx6Q npuA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1696250134; x=1696854934; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=869N3vyS+ZVqQWUeBDSfQ2c9Aluwujb0eSJXyHR6CZo=; b=vVOVtou2q5vDqdKJGgGsAoEuEa7H5vw1efushyMaCR/Nc7rWBP+LOKY0kdxN6RtMAG SgMQAjMgLw6nz/AzX4ajCEJnxki8E7cORI7n2Rs0DuoNfqX7wN998PLG5QIApU7z60iM Tp0LLMQXWOziDsWP+RchXA+Le74jMSN9rItvWorL/BNXMRl9fqm7pIVIrvlL26eU0Swt VexU6e1fHJnS+N56KXeQmAFgNhDi83iDP+gWhtn0YvbNRUV35TPejcU6HTIf485uPS8D v1GPz1LveU960PDkPuaXdZYz3Hi6Tlh08eq5qcReoKW0J0DqvI5qSbET7x93BHb5l85A u8EA== X-Gm-Message-State: AOJu0Yx3pZVFsjoglPvgj4o0/xg/ppW2Vm8ZpwtSABv+Qr/HHWU3OnYY qf0nMAqPq5ODJDd8cOOB+F2KCQhwCWS8y7t0rlQ8+Q== X-Received: by 2002:a50:c30f:0:b0:525:573c:643b with SMTP id a15-20020a50c30f000000b00525573c643bmr97048edb.7.1696250133829; Mon, 02 Oct 2023 05:35:33 -0700 (PDT) MIME-Version: 1.0 References: <20230922111247.497-1-ansuelsmth@gmail.com> <65181064.050a0220.7887c.c7ee@mx.google.com> <651ab7b8.050a0220.e15ed.9d6a@mx.google.com> In-Reply-To: <651ab7b8.050a0220.e15ed.9d6a@mx.google.com> From: Eric Dumazet Date: Mon, 2 Oct 2023 14:35:22 +0200 Message-ID: Subject: Re: [net-next PATCH 1/3] net: introduce napi_is_scheduled helper To: Christian Marangi Cc: Vincent Whitchurch , Raju Rangoju , "David S. Miller" , Jakub Kicinski , Paolo Abeni , Alexandre Torgue , Jose Abreu , Maxime Coquelin , Ping-Ke Shih , Kalle Valo , Simon Horman , Daniel Borkmann , Jiri Pirko , Hangbin Liu , netdev@vger.kernel.org, linux-kernel@vger.kernel.org, linux-stm32@st-md-mailman.stormreply.com, linux-arm-kernel@lists.infradead.org, linux-wireless@vger.kernel.org Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Spam-Status: No, score=-8.4 required=5.0 tests=DKIMWL_WL_MED,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,USER_IN_DEF_DKIM_WL autolearn=unavailable autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on groat.vger.email Precedence: bulk List-ID: X-Mailing-List: linux-wireless@vger.kernel.org X-Greylist: Sender passed SPF test, not delayed by milter-greylist-4.6.4 (groat.vger.email [0.0.0.0]); Mon, 02 Oct 2023 05:35:52 -0700 (PDT) On Mon, Oct 2, 2023 at 2:29=E2=80=AFPM Christian Marangi wrote: > Ehhh the idea here was to reduce code duplication since the very same > test will be done in stmmac. So I guess this code cleanup is a NACK and > I have to duplicate the test in the stmmac driver. I simply wanted to add a comment in front of this function/helper, advising not using it unless absolutely needed. Thus my question "In which context is it safe to call this helper ?" As long as it was private with a driver, I did not mind. But if made public in include/linux/netdevice.h, I would rather not have to explain to future users why it can be problematic.