Received: by 2002:a05:7412:b10a:b0:f3:1519:9f41 with SMTP id az10csp343418rdb; Thu, 30 Nov 2023 06:24:08 -0800 (PST) X-Google-Smtp-Source: AGHT+IHZH76v4twVSBQttinxVunwXjzpI9Pf68ioN2v8Nj6aq0xpYrYZe2RdJRbY9lTCNFcB0563 X-Received: by 2002:a05:6808:13d5:b0:3b2:e577:7344 with SMTP id d21-20020a05680813d500b003b2e5777344mr28913600oiw.38.1701354247954; Thu, 30 Nov 2023 06:24:07 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1701354247; cv=none; d=google.com; s=arc-20160816; b=ROIJkTblbzozR2QbzI7SUq0V5K4D+ZBEgMlyPlkcMwWtz6zaXNOPIhXQSkv4JmQWLV Qu3qP4vf4cupTdlL+DJsekyvYrC5n2hRs7SRF39VXAWzUhSu3Zi2w+LVfxBL78VotCxI ptYbUVrUvQjeNUKSlqAzdgnlk15PKJx1nI7+LWNOyz6Guu1RR4fvNP0MEyyqfQD8bhwh XUL4wXDzB6iE1mdeaRuFXzlBtNTCilCFQZP9TPWqollxJkQQO8Hxw5hNjQxSKBAOYMt7 WFPLrFrICfBBHYPYsTwRIxPDCTzJ5u2a+8L6VHMl/xfSRDOUVCM3uQKNp4GqR8n3vgtW WCAA== 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=r2lb5jF3OaNi7WNk5qltX+1PtaCF7MHmBtxzPosSAN0=; fh=qbM/lAEZP8KqDUA63FE4FuD+YJjNGVeGKVXy3Zs/0iY=; b=GeyWNwLmXu162grvfToz6sJweXsi6KAyiA2aP3YixloFX/o2ewXd4HlkhdIZPl8PV1 UUy0tJlIfG2A7Dx2PbxJTqtuFjIJvIyHug99hLe9Wx9FZdlRROhmna3IpFzJT+9hq868 WuyIwm7glBntWGBJACcZV57z2AaDTGBy7F313d8/QcCCNlLi8QmifsB2SowMG+uRQbsw +szUG2S3N7kdVyjcYxFhSCTStFngpp6ys7IL2SZVQFR/TPlioQX+b+8TaVC9BP3DFSpm l60GMcEuLFDZuwHM8YqpApW2MVBxsRVnXrgdOC53YhtX6CTcwRdTc/knS/WSD2TygXUe ikiQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=dG68xzPy; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.35 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 groat.vger.email (groat.vger.email. [23.128.96.35]) by mx.google.com with ESMTPS id bo6-20020a056a02038600b005c1cc536134si1544173pgb.546.2023.11.30.06.24.06 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 30 Nov 2023 06:24:07 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.35 as permitted sender) client-ip=23.128.96.35; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=dG68xzPy; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.35 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 groat.vger.email (Postfix) with ESMTP id A9B608022C55; Thu, 30 Nov 2023 06:24:04 -0800 (PST) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.11 at groat.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1345994AbjK3OXt (ORCPT + 99 others); Thu, 30 Nov 2023 09:23:49 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:49364 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1345940AbjK3OXt (ORCPT ); Thu, 30 Nov 2023 09:23:49 -0500 Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 026DD85 for ; Thu, 30 Nov 2023 06:23:56 -0800 (PST) Received: by smtp.kernel.org (Postfix) with ESMTPSA id BE68BC433C9; Thu, 30 Nov 2023 14:23:52 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1701354235; bh=wZi0hGsQ3XSwYWlqArpLeqdlNCo/znhk/QdMHk4tYUk=; h=Date:Subject:To:Cc:References:From:In-Reply-To:From; b=dG68xzPyU20XZ30fUI7KF112zmAlPo7LLNpOLogfgPUVOG25PZTzaCKISCVXCNQH5 vAmfvzQ5wSTCLD9v/km1KtpC8tGC+PdmSrNUMWkuuNSyENbR/kQxnw/Csu946O2Q7j PvA96I/ZxY8C1IG5aVog//9/ItsnjXqQITnhoefE7fjIzgocOUKlyCXK6XZQf3hJfG MeIbwy62yYT0qjuibndhPLU6qiYktfioL6Uk5V3bOui/Yd3M1a1M6CUmTRA51OYHEY 05pvA00Q58cb/ODMJdQhpBnjPTFDABXbwwD05sLHM5CYIop9dlu7lXPgKJYVH8k9D7 TGeqggUxTBODA== Message-ID: <030c7d65-bead-46d0-8422-8a9ff0548d72@kernel.org> Date: Thu, 30 Nov 2023 16:23:49 +0200 MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: Re: [PATCH v6 net-next 6/7] 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, 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: <20231120140147.78726-1-rogerq@kernel.org> <20231120140147.78726-7-rogerq@kernel.org> <20231120232620.uciap4bazypzlg3g@skbuf> <20231121115314.deuvdjk64rcwktl4@skbuf> <6def78e7-8264-4745-94f3-b32b854af0c2@kernel.org> <20231130132222.w2irs5c4lxh5jcv7@skbuf> From: Roger Quadros In-Reply-To: <20231130132222.w2irs5c4lxh5jcv7@skbuf> Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 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 groat.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 (groat.vger.email [0.0.0.0]); Thu, 30 Nov 2023 06:24:04 -0800 (PST) On 30/11/2023 15:22, Vladimir Oltean wrote: > On Thu, Nov 30, 2023 at 01:49:03PM +0200, Roger Quadros wrote: >> Thanks for the debug instructions. Indeed lldpad tries to enable MM TX and the >> network drivers set_mm() hook gets called and returns success but still >> lldpad sees some error. >> >> I've also confirmed that ethnl_set_mm() runs successfully and returns 1. >> I suppose something is going wrong in user-space with libnl? >> >> Nov 21 11:50:02 am62xx lldpad[708]: eth0: Link partner preemption capability supported >> Nov 21 11:50:02 am62xx lldpad[708]: eth0: Link partner preemption capability not enabled >> Nov 21 11:50:02 am62xx lldpad[708]: eth0: Link partner preemption capability not active >> Nov 21 11:50:02 am62xx lldpad[708]: eth0: Link partner minimum fragment size: 124 octets >> Nov 21 11:50:02 am62xx lldpad[708]: eth0: initiating MM verification with a retry interval of 134 ms... >> Nov 21 11:50:02 am62xx lldpad[708]: ethtool: kernel reports: integer out of range >> >> >> full debug log is below. > > Ah, you got confused. Openlldp issues multiple ETHTOOL_MSG_MM_SET > netlink messages. What you observe is that one of them succeeds, and > then another one returns -ERANGE before even calling the driver's > set_mm() method. > > And that comes from here in net/ethtool/mm.c: > > 149 const struct nla_policy ethnl_mm_set_policy[ETHTOOL_A_MM_MAX + 1] = { > 150 » [ETHTOOL_A_MM_HEADER]» » = NLA_POLICY_NESTED(ethnl_header_policy), > 151 » [ETHTOOL_A_MM_VERIFY_ENABLED]» = NLA_POLICY_MAX(NLA_U8, 1), > 152 » [ETHTOOL_A_MM_VERIFY_TIME]» = NLA_POLICY_RANGE(NLA_U32, 1, 128), // <---- here > 153 » [ETHTOOL_A_MM_TX_ENABLED]» = NLA_POLICY_MAX(NLA_U8, 1), > 154 » [ETHTOOL_A_MM_PMAC_ENABLED]» = NLA_POLICY_MAX(NLA_U8, 1), > 155 » [ETHTOOL_A_MM_TX_MIN_FRAG_SIZE]»= NLA_POLICY_RANGE(NLA_U32, 60, 252), > 156 }; > > You are reporting in .get_mm() a maximum verify time which is larger > than the core ethtool is willing to accept in a further .set_mm() call. > And openlldp will try to max out on the verify time. Hence the -ERANGE. You are spot on on this. Thanks. :) > > The range I chose for the policy comes from 802.3-2018 clause 30.14.1.6, > which says that the aMACMergeVerifyTime variable has a range between 1 > and 128 ms inclusive. I forced driver state->max_verify_time = 128; and now that -ERANGE error is gone and the lldp test case passes. I also applied your patch to ethtool_mm.sh and don't see the error with 'addFragSize 0' anymore Should I include your patch in the next revision of this series? -- cheers, -roger