Received: by 2002:a05:7412:8d10:b0:f3:1519:9f41 with SMTP id bj16csp5991905rdb; Thu, 14 Dec 2023 05:44:21 -0800 (PST) X-Google-Smtp-Source: AGHT+IEiu1/V5lDhT81+8wpBOqfmrlwDJgp/KyUiRZYHG+PIfKxKuoJC4SUcnUB5BD3zZSM49pbe X-Received: by 2002:a05:6a20:af13:b0:191:60c0:7c04 with SMTP id dr19-20020a056a20af1300b0019160c07c04mr2339281pzb.58.1702561461398; Thu, 14 Dec 2023 05:44:21 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1702561461; cv=none; d=google.com; s=arc-20160816; b=gE9OVhAEXSN04a2XrFBjyDA1vokuaAcxgegFHZ89wh89v+zpC9yeK7v7wcmd/DIZXF kdveQJrDf+vpfrsOactC/AfDlgUGh8hthsaVK1xqeI3xFXdbyuuYy/mOQS8L/i1ynn84 1uxPex4X98XMBQpneO0Wsc/eKodWdWmmDMvAPB2Nqyzr3ReuHlwoqeXwZ5EeNSwBeNDX X9vS4V6qx0/rYcl+oU//rxE7VQkF5gGKqK1ZKw1m823myeW5Ztb9oV47LzbM77BfXrn6 oLE7e0zQ/wuJCK/irNbTsZqOdon8qs3HqSWckqj8Hz5VOYyAD51kXIv1PhDX7gySH3es V7jQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:in-reply-to:from :references:cc:to:content-language:subject:user-agent:mime-version :date:message-id:dkim-signature; bh=AJB6/rfhiHlsO3jq5R5gRHP/kpYokLu85OSXp4VbM3A=; fh=hDY7ol3vlzYnIt6j1OcbGoBzm77b42dQaZ4AhtYhGR4=; b=oE0p8CnBG4T2Iubhm5XWd91z8MeaTFvkkTLohC5ssYfeIELGzsE33qVQb3AzV8ka3L Eq/Mm5gzJMd6n4uVo8ltsTrc5jYQFsBwQBqwkayY7KNSLYfMi0iAqALvGX55GXZCEGWF ABwDQT3pe2e7ALat3IOMHX1TSHeYK4GC7XGB3ddaRoZYpUFGI94jmneWSQsETjX3YMOq 205sq3H56LcFpeF3kWNH3GO4ENoPU5ZVQKYfq5IPERNJjtI7UhzY/d+Z15/ftEWwocpU TOzLCqyLB59FG832dFT/hSc3FovmkPhhQU+kAngB87fze9+/mmj0sjjaSoBbOgE932es RVTQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=Jt+DATdI; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:3 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from lipwig.vger.email (lipwig.vger.email. [2620:137:e000::3:3]) by mx.google.com with ESMTPS id x4-20020a17090a9dc400b00286530bddecsi12444310pjv.105.2023.12.14.05.44.21 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 14 Dec 2023 05:44:21 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:3 as permitted sender) client-ip=2620:137:e000::3:3; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=Jt+DATdI; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:3 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: from out1.vger.email (depot.vger.email [IPv6:2620:137:e000::3:0]) by lipwig.vger.email (Postfix) with ESMTP id D43A5816CB83; Thu, 14 Dec 2023 05:44:18 -0800 (PST) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.11 at lipwig.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229631AbjLNNoG (ORCPT + 99 others); Thu, 14 Dec 2023 08:44:06 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:39126 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229621AbjLNNoE (ORCPT ); Thu, 14 Dec 2023 08:44:04 -0500 Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 3F24C11B for ; Thu, 14 Dec 2023 05:44:11 -0800 (PST) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 9CD26C433C7; Thu, 14 Dec 2023 13:44:07 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1702561450; bh=YEhNauNXCKrZSOyW3uIlrreJdFz41AlCRaCt3xbA90M=; h=Date:Subject:To:Cc:References:From:In-Reply-To:From; b=Jt+DATdIMtlVrRmpBI7LYjoyqwQljY5bew3/NVq3YtIcPSdB8EgUmN+C3NDPMOUoI NqU02XbiX0YQZ2RTfCg+NCWMf22E7N5EVfvUv5gG1cMna4A4PvR8hOlReG+7YFWzmM 1Vr64Cxr8T9gcBIy5tIakgDeof2vAmLPYpIFObBPZ0p0DBlpm+qkVl0hJ2se/vlezW +e3sivZoepYdLzh+QVC7nzjYc1axQFmgXEhKbdp34xFO2G7eAAeJWpLA2lmKY0mKyB YEG5r8vruE8Nz+KufONzk8MVx/r8oQc5I1IuXU+PBYbF/dbDsTp3vn4f34rkG1UArG k3nZXtwfIr8cQ== Message-ID: Date: Thu, 14 Dec 2023 15:44:03 +0200 MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: Re: [PATCH v8 net-next 09/11] net: ethernet: ti: am65-cpsw-qos: Add Frame Preemption MAC Merge support Content-Language: en-US To: Vladimir Oltean Cc: davem@davemloft.net, edumazet@google.com, kuba@kernel.org, pabeni@redhat.com, shuah@kernel.org, s-vadapalli@ti.com, r-gunasekaran@ti.com, vigneshr@ti.com, srk@ti.com, horms@kernel.org, p-varis@ti.com, netdev@vger.kernel.org, linux-kernel@vger.kernel.org References: <20231213110721.69154-1-rogerq@kernel.org> <20231213110721.69154-10-rogerq@kernel.org> <20231214110448.lycg7yusrusbd7w2@skbuf> From: Roger Quadros In-Reply-To: <20231214110448.lycg7yusrusbd7w2@skbuf> Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit X-Spam-Status: No, score=-1.2 required=5.0 tests=DKIMWL_WL_HIGH,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,MAILING_LIST_MULTI, SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE autolearn=unavailable autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lipwig.vger.email Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-Greylist: Sender passed SPF test, not delayed by milter-greylist-4.6.4 (lipwig.vger.email [0.0.0.0]); Thu, 14 Dec 2023 05:44:19 -0800 (PST) On 14/12/2023 13:04, Vladimir Oltean wrote: > On Wed, Dec 13, 2023 at 01:07:19PM +0200, Roger Quadros wrote: >> - Fix am65_cpsw_iet_get_verify_timeout_ms() to default to timeout for >> 1G link if link is inactive. >> + >> +static int am65_cpsw_set_mm(struct net_device *ndev, struct ethtool_mm_cfg *cfg, >> + struct netlink_ext_ack *extack) >> +{ >> + val = readl(port->port_base + AM65_CPSW_PN_REG_IET_CTRL); >> + if (cfg->verify_enabled) { >> + val &= ~AM65_CPSW_PN_IET_MAC_DISABLEVERIFY; >> + /* Reset Verify state machine. Verification won't start here. >> + * Verification will be done once link-up. >> + */ >> + val |= AM65_CPSW_PN_IET_MAC_LINKFAIL; >> + } else { >> + val |= AM65_CPSW_PN_IET_MAC_DISABLEVERIFY; >> + /* Clear LINKFAIL to allow verify/response packets */ >> + val &= ~AM65_CPSW_PN_IET_MAC_LINKFAIL; >> + } >> + >> + val &= ~AM65_CPSW_PN_IET_MAC_MAC_ADDFRAGSIZE_MASK; >> + val |= AM65_CPSW_PN_IET_MAC_SET_ADDFRAGSIZE(add_frag_size); >> + writel(val, port->port_base + AM65_CPSW_PN_REG_IET_CTRL); >> + >> + /* verify_timeout_count can only be set at valid link */ >> + if (cfg->verify_time > 0) >> + port->qos.iet.verify_time_ms = cfg->verify_time; >> + else >> + port->qos.iet.verify_time_ms = 10; > > I don't think I understand what the check is for? The netlink policy for > ETHTOOL_A_MM_VERIFY_TIME limits the range between 1 ms and 128 ms. > How can it be 0? I didn't check ETHTOOL_A_MM_VERIFY_TIME before. Indeed, this check is pointless. > >> + >> + /* enable/disable preemption based on link status */ >> + am65_cpsw_iet_commit_preemptible_tcs(port); >> + >> + return 0; >> +} -- cheers, -roger