Received: by 2002:a05:7412:b130:b0:e2:908c:2ebd with SMTP id az48csp330272rdb; Thu, 16 Nov 2023 23:06:44 -0800 (PST) X-Google-Smtp-Source: AGHT+IFN0gbi3egqYplJUIP+gKDku8tSCgjbNQEe0VnHDd9/XGZX+Fnfh3yuF9ZLpRPIB8OZciDf X-Received: by 2002:a05:6808:4193:b0:3b6:cb02:533b with SMTP id dj19-20020a056808419300b003b6cb02533bmr18078744oib.44.1700204804411; Thu, 16 Nov 2023 23:06:44 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1700204804; cv=none; d=google.com; s=arc-20160816; b=hwROpV9DRFxwQhzwbyPRSfr6TJl0WaAME+XE0f8reFn6cdatAGdciQpMkv/GbduCsy Ao6+d/8WErcSmYuqmuH5QS7zpUZGzdfagNGyysdGkFG4N5TlxuRNjzIOJfiLRicoqkhL XS6dupJPjD/4xOAzWAeeCU/V+6j0bJDfSLd4DU44A3TCs83x1owkMXKuOIW8A/79XE/a EjgxYbPgds751DTiI6i6ZSoKoS5+h6N09pukTMWOdB11ql7HSuG1vIfqzzCI35pmu3CN Kf0MCvZyq2YdXdeLbUmBu5LnOisGlNd5HHsXpzPzdD9sjc678orLWqzIY4g0E4lVgGOX SbAA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:cc:to:from:subject:message-id:mime-version:date :dkim-signature; bh=Ag4QJwAFTMvtxQitzc3wtKGcikFcJHkhggRFwsEsrq0=; fh=Dpsn2NGryaeSJN4akycODy9+65AUipF7UFhlOJZCKlw=; b=XUPwmj4H5R6Y0SX4gUcaWhbTbxFpWdaoVuA2PgfzJBIle0e77ZPtyRTqJOkH4nwx56 rJz72g83uLix+ATFSS7lMQuuW/Bt7fS1Mb5BhlXk7YSWW5L1ZejWc/Jsee/DWz4t9Lku NbM4Boo1M9YV30ZZxUdKp/sfvTk37P/yALo/LEtoYcBbIokZyZTaVx1NKDQBM+TkjgI7 mM3or+pJfgzgd7U+GE1w7VePxH8E6ZHUBZ7Xt3IghnlIdBF9u7V7A96MMg2WKY5IWp7l pov2BPNwRBrZpm6OdvlMD592aX7ZhPzHXDgznGnJTh/ntG8Wp0J97SwB2ImWz3dTPKw3 cJzQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@google.com header.s=20230601 header.b=wYbcyism; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:8 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=google.com Return-Path: Received: from fry.vger.email (fry.vger.email. [2620:137:e000::3:8]) by mx.google.com with ESMTPS id f9-20020a631f09000000b005b881cc9498si1305897pgf.339.2023.11.16.23.06.28 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 16 Nov 2023 23:06:44 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:8 as permitted sender) client-ip=2620:137:e000::3:8; Authentication-Results: mx.google.com; dkim=pass header.i=@google.com header.s=20230601 header.b=wYbcyism; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:8 as permitted sender) smtp.mailfrom=linux-kernel-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 fry.vger.email (Postfix) with ESMTP id 6719982162E9; Thu, 16 Nov 2023 23:06:20 -0800 (PST) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.11 at fry.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229953AbjKQHGJ (ORCPT + 99 others); Fri, 17 Nov 2023 02:06:09 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:59718 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229436AbjKQHGI (ORCPT ); Fri, 17 Nov 2023 02:06:08 -0500 Received: from mail-yw1-x1149.google.com (mail-yw1-x1149.google.com [IPv6:2607:f8b0:4864:20::1149]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 9BFC6D51 for ; Thu, 16 Nov 2023 23:06:04 -0800 (PST) Received: by mail-yw1-x1149.google.com with SMTP id 00721157ae682-5a909b4e079so24788507b3.2 for ; Thu, 16 Nov 2023 23:06:04 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20230601; t=1700204764; x=1700809564; darn=vger.kernel.org; h=cc:to:from:subject:message-id:mime-version:date:from:to:cc:subject :date:message-id:reply-to; bh=Ag4QJwAFTMvtxQitzc3wtKGcikFcJHkhggRFwsEsrq0=; b=wYbcyismUeYAijn1luK7Jw1lzwWusAjVrj34nY4wxVco1FKhDa1tQ252xFXxT1EaZY JpK4j5T68fvlPrFG9X7rP/8qqIouLoUsCiOXgsYOwXP/3h2ilAtJoMyo+p7irUL2qqS/ nIPu+hR0Y54VkQo+WjHrfhZINVbN/Mooa4TqJCr4/zbLXPO/d1fO3DfZra/7tdPaW+8h ko7qxLAzUfDNek/mwFF2T3ejAWC3PRPsoTVMvTCt96zfP7BOsMy/wtNp3A/PUwbqWqpd 0NtI2LEXNeizVfmMFuwqTfSFxga5ldIN7xm4+FIF2jCj/eQAZh2qxqWjGHDAx9yyPrbr OcYg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1700204764; x=1700809564; h=cc:to:from:subject:message-id:mime-version:date:x-gm-message-state :from:to:cc:subject:date:message-id:reply-to; bh=Ag4QJwAFTMvtxQitzc3wtKGcikFcJHkhggRFwsEsrq0=; b=KkCXZcx6jGkKH1b1+ah1LdwQXUibJlKKBwB110tiWw3xgIEJcbQxgntYP2yaEG6ZJO 8c19bMv1w6fU4optIVHEYvSoWiKQRQzZYRUAoCGyJSuB6YP3lxEGWTANk0Tsi5erDsbh /dKY0z9tZcL+opiEoS/8DTK5d7JZDPsMNk9+fB0WOSrDRQIXw4S010YpjPgyyjYUFowo YSNc2h3+qwaIqdhvLmDAXJQtLv1WCg10XVp3zfccgh8Dm6khGUKAvhLxdHLE8q9kdO3L VvbmTbTvZbw9rJC4OMgEcdIHJ1K5eAEUNl+kVQjMFV/xqWF6mlLjMe0I594Trxt6mdJ0 NYJw== X-Gm-Message-State: AOJu0YyZUCghq6/XdiU3mZ2LU+SIOVsI6iBS1VYtUuik8nwYCMwlYGPm RjdcVn8cqCmEdi/xTbYiP3Gbm4QaQ2AZv40= X-Received: from jlw.c.googlers.com ([fda3:e722:ac3:cc00:20:ed76:c0a8:41a]) (user=jinliangw job=sendgmr) by 2002:a5b:151:0:b0:d9a:468f:480e with SMTP id c17-20020a5b0151000000b00d9a468f480emr420396ybp.5.1700204763883; Thu, 16 Nov 2023 23:06:03 -0800 (PST) Date: Thu, 16 Nov 2023 23:04:57 -0800 Mime-Version: 1.0 X-Mailer: git-send-email 2.43.0.rc0.421.g78406f8d94-goog Message-ID: <20231117070457.1970786-1-jinliangw@google.com> Subject: [PATCH] mctp-i2c: increase the MCTP_I2C_TX_WORK_LEN to 500 From: Jinliang Wang To: Jeremy Kerr , Matt Johnston Cc: William Kennington , netdev@vger.kernel.org, linux-kernel@vger.kernel.org, Jinliang Wang Content-Type: text/plain; charset="UTF-8" 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,T_SCC_BODY_TEXT_LINE, 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 fry.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 (fry.vger.email [0.0.0.0]); Thu, 16 Nov 2023 23:06:20 -0800 (PST) The original value (100) is not sufficient for our use case. For example, we have 4 NVMe-mi devices on the same i2c bus. When sending namespace create Admin command concurrently, they will send 4x4KB data to device concurrently, which may be split into 4x(4KB/64B)=256 packets. Tested: Before the fix, we will see below message in kernel log when concurrently sending namespace create commands to the 4 NVMe-MI devices on the same i2c bus: kernel: i2c i2c-6 mctpi2c6: BUG! Tx Ring full when queue awake! After the fix, the error message is gone. Signed-off-by: Jinliang Wang --- drivers/net/mctp/mctp-i2c.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/net/mctp/mctp-i2c.c b/drivers/net/mctp/mctp-i2c.c index b37a9e4bade4..b658aa040620 100644 --- a/drivers/net/mctp/mctp-i2c.c +++ b/drivers/net/mctp/mctp-i2c.c @@ -34,7 +34,7 @@ #define MCTP_I2C_BUFSZ (3 + MCTP_I2C_MAXBLOCK + 1) #define MCTP_I2C_MINLEN 8 #define MCTP_I2C_COMMANDCODE 0x0f -#define MCTP_I2C_TX_WORK_LEN 100 +#define MCTP_I2C_TX_WORK_LEN 500 /* Sufficient for 64kB at min mtu */ #define MCTP_I2C_TX_QUEUE_LEN 1100 -- 2.43.0.rc0.421.g78406f8d94-goog