Received: by 2002:a05:7412:b10a:b0:f3:1519:9f41 with SMTP id az10csp137553rdb; Thu, 30 Nov 2023 00:03:50 -0800 (PST) X-Google-Smtp-Source: AGHT+IF774N7QyiJcEO5EA6tz+dma+Sw4SrAYaqDmS4JiUxy7pYtht5wkeoc6Rll7pLayS8IWSme X-Received: by 2002:a17:902:7483:b0:1cf:7df0:667f with SMTP id h3-20020a170902748300b001cf7df0667fmr22615551pll.44.1701331430499; Thu, 30 Nov 2023 00:03:50 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1701331430; cv=none; d=google.com; s=arc-20160816; b=kj45gOJa1B4BIs25Qp6IeZILgOiktVDZGqWktguyLKvYGP64T59XXkwK1TfktXTzzy Mvzop4fUXsSXdVMaCU9NHtJ9z0g9R7DvzINhnZDJJS94alhNEMd63GVN6lK6UCrFiKaN uolcHTLXia2qhugUYk+kfJ5cKRmqmYjCupPmSpjEy1eTtAO9m8fLREjmJedc0CXFwAlH PjM5AfqreWrwk8Nm8s/7zfzWIUuxbaL9l4fvD+D6FvP/yvDkBR3VY7NOSVBq4UDWp2d1 E5BuiSPW++vy2KHPAkIWyKSnjsOGiNSHW4eZgy6PuL2dvGEtajbfdfQEmi8PhGW9AuuG d1JQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:mime-version:user-agent :content-transfer-encoding:references:in-reply-to:date:cc:to:from :subject:message-id:dkim-signature; bh=y+SkZschDSx1mlTO6KMgxF6aRQzLJQjSlyJB5vTM/RM=; fh=EbO2hJ2UUn7Jotqz2Y9iatsWFTNDhNazUjEqXzSD3vs=; b=KGoG66wYcQsbNARap7vhsTr4fYEd9rIGAzJkGmiHg3uv1NvEa6MiXzthKsuVfx8JJv aCAtI8C6e9dcdATCoIGEN3BuNUWIEveORmjCvTO37AmGTT9ijQDCUxquXy/UHysOi12b 3G/Wa4anK+sEj+xqctr3knIl3SFsIfqagPzTO33lKayBTUd9oONCYd2dKngjeJgp8qgI PQp6E422fMSUkpc79aCpXJl13l/TAFSdKwCFlp3NIWQ+H06K4ZQ32r7yGhbCg21Fbp4X gVg0g+2QSAprvz3r6fuUGj8SmtsNr5PpNwzRGNaekyY1kBXmlmyK6IYMR909VflXFzbj kR9A== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@codeconstruct.com.au header.s=2022a header.b=ZqSlTylJ; 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=codeconstruct.com.au Return-Path: Received: from lipwig.vger.email (lipwig.vger.email. [2620:137:e000::3:3]) by mx.google.com with ESMTPS id c5-20020a170903234500b001ce675c396fsi729395plh.138.2023.11.30.00.03.29 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 30 Nov 2023 00:03:50 -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=@codeconstruct.com.au header.s=2022a header.b=ZqSlTylJ; 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=codeconstruct.com.au Received: from out1.vger.email (depot.vger.email [IPv6:2620:137:e000::3:0]) by lipwig.vger.email (Postfix) with ESMTP id A9082802FABB; Thu, 30 Nov 2023 00:03:25 -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 S1344792AbjK3IDJ (ORCPT + 99 others); Thu, 30 Nov 2023 03:03:09 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:49018 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231728AbjK3IDH (ORCPT ); Thu, 30 Nov 2023 03:03:07 -0500 Received: from codeconstruct.com.au (pi.codeconstruct.com.au [203.29.241.158]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 6D1FDA3; Thu, 30 Nov 2023 00:03:13 -0800 (PST) Received: from [192.168.2.60] (210-10-213-150.per.static-ipl.aapt.com.au [210.10.213.150]) by mail.codeconstruct.com.au (Postfix) with ESMTPSA id 6BF402012A; Thu, 30 Nov 2023 16:03:09 +0800 (AWST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=codeconstruct.com.au; s=2022a; t=1701331390; bh=y+SkZschDSx1mlTO6KMgxF6aRQzLJQjSlyJB5vTM/RM=; h=Subject:From:To:Cc:Date:In-Reply-To:References; b=ZqSlTylJ1UAKIM8WHHtZa/ExueX7iRfEr15FIG7wXmMv+WF7NTBydAtHKcn/n112Y 8bYXAwofcqQnD9Bq0TRCCqavo1HM2l8kVCE1va8SVUySe8PMXEpG1mzFypN4yiZGTF IWgJFpKBOBoEDaBPfCQ8rDAaonCJTcXdbizBgw84bshQmQ17cHDVS6sVrqM8V7HcYU MV2pGnr5PXXP5aWsOLf9RhA7LNgi9CQ5HzztXXlVqNmhfOYAJuZeRsUlAG7+aPaBrA YIoJNg++g7MNy9h3ZonwduFRyqkV+E87a3IPWZ3SxYw7Z5a+FeZ10qo3hbDFlGWPhY quc3SJA9Q94jA== Message-ID: <473048522551f1cae5273eb4cd31b732d6e33e53.camel@codeconstruct.com.au> Subject: Re: [PATCH] mctp i2c: Requeue the packet when arbitration is lost From: Jeremy Kerr To: Quan Nguyen , Matt Johnston , "David S . Miller" , Eric Dumazet , Jakub Kicinski , Paolo Abeni , netdev@vger.kernel.org, linux-kernel@vger.kernel.org, openbmc@lists.ozlabs.org, Open Source Submission Cc: Phong Vo , Thang Nguyen , Dung Cao Date: Thu, 30 Nov 2023 16:03:09 +0800 In-Reply-To: <20231130075247.3078931-1-quan@os.amperecomputing.com> References: <20231130075247.3078931-1-quan@os.amperecomputing.com> Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable User-Agent: Evolution 3.46.4-2 MIME-Version: 1.0 X-Spam-Status: No, score=-0.9 required=5.0 tests=DKIM_SIGNED,DKIM_VALID, DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS,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, 30 Nov 2023 00:03:25 -0800 (PST) Hi Quan, > If arbitration is lost, __i2c_transfer() returns -EAGAIN and the > packet should be resent. >=20 > Requeue the packet and increase collisions count on this case. Are you sure you want to re-queue the packet here? The i2c core would have already retried on arbitration loss: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/tree/d= rivers/i2c/i2c-core-base.c#n2223 With this change, we would be disregarding the limits in adap->retries and/or adap->timeout. Cheers, Jeremy