From patchwork Thu Feb 29 07:02:00 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Michael Chan X-Patchwork-Id: 13576677 Received: from mail-oi1-f175.google.com (mail-oi1-f175.google.com [209.85.167.175]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id EAF29224D7 for ; Thu, 29 Feb 2024 07:02:14 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.167.175 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1709190136; cv=none; b=KZv8rWEFPFp7/BRAzcJYelFF1WKl6gDQ1XEIFO+Gl7uHmOD0EB2I2zu4rG6oxhOTYjWOYRbJ0az6X7XOr6d3ZhqW50PPXpT9pCJqZh1z/OUF9XMBtESpPdm8fKKu74/507H9d6hmY7sh9b/uJAYmbxGb3uyN24Sm01OP6S5VMDk= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1709190136; c=relaxed/simple; bh=bylxmrT8wz4WTbanL5gu9DE5NZEQqv1mOy6fvwjn564=; h=From:To:Cc:Subject:Date:Message-Id:MIME-Version:Content-Type; b=FZMNeyBmxAgWImle3zLk4jFYjWVPxLVCt0paWQdPRZsEWBWofECwKPjK5bxt1a4lV5RpoO78VpoxcbSseNNupCmcS2XtDGhYR017+oMcOHwFPIFQ35TX3R0Mnxh81N/rV2mZD+bt5I+ipXk77YAvnG+0Gu9b7NjQMqtaDussc54= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=broadcom.com; spf=fail smtp.mailfrom=broadcom.com; dkim=pass (1024-bit key) header.d=broadcom.com header.i=@broadcom.com header.b=S94Auwc+; arc=none smtp.client-ip=209.85.167.175 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=broadcom.com Authentication-Results: smtp.subspace.kernel.org; spf=fail smtp.mailfrom=broadcom.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=broadcom.com header.i=@broadcom.com header.b="S94Auwc+" Received: by mail-oi1-f175.google.com with SMTP id 5614622812f47-3c1aa86fb60so252866b6e.0 for ; Wed, 28 Feb 2024 23:02:14 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=broadcom.com; s=google; t=1709190134; x=1709794934; darn=vger.kernel.org; h=mime-version:message-id:date:subject:cc:to:from:from:to:cc:subject :date:message-id:reply-to; bh=mSw4yXDLNhApusiemsXcrcAq4KmN7yAz23Ft1Oym9sc=; b=S94Auwc+407+jEhSCrkh5YfvwkkVtuahLjm0EaWXmr6jLXRHpuSTdXhElOZI3O/AlO g/V3HI+WPEvLL0DAcJhvKhgdPubdlLS48L7nQgMdnHHXssVTl96y8eiKssxOCKv0jpoG hk7CAPMiyo+e2oqcrp2gKYkkigfwEmXHQf9GA= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1709190134; x=1709794934; h=mime-version:message-id:date:subject:cc:to:from:x-gm-message-state :from:to:cc:subject:date:message-id:reply-to; bh=mSw4yXDLNhApusiemsXcrcAq4KmN7yAz23Ft1Oym9sc=; b=XjSPTc2qSXdkF6D10tjyLa0CdsMYp8gKy1JX+aJMYoQjiUGNQJ9PC8ApgSHU1lN31X 3YGzYTpl+crwLQRzr6MakXA9RoV0oixLITFep+SZmAk+Z6sLVDoaEH/ZkiqO5te9QvZP p236o5+gsRjLV6iOThsb19mBKprLiJuCI0D8RtcqYt2NP1aQzxL/PsmaXmjKJ3VmCUcz hNtHVNzPRSlol2u6dieRwRYreJ9RvqrcRVpAL7h0idwYcKUWnRG90fFxSFVHBfHxEXhC 39DMQNXNuTYH8KItqvz0ykX9vbdwrFRhyqonlRUoOWS0Q/dUE6zBHoqrTb7Va2WOky65 MeQQ== X-Gm-Message-State: AOJu0YzHPJC/gpg3tEnOD8yn84YP+CVZD2YAs3AoxRaDfVhoFIOoff9P 1zvbnzyOOE5t4itSMeH8BfZrOkyXo7nyhLMntroL1HcXfs9NRkI3TKBs6Q9uzg== X-Google-Smtp-Source: AGHT+IF11l30e7tG1LiS3WR7TWoQzlaerjypHPl2BHJRXmsnPLG9ES+6bA7Pt4UeRbSxgXtIAONyqg== X-Received: by 2002:a05:6358:4187:b0:176:6144:2f12 with SMTP id w7-20020a056358418700b0017661442f12mr1689564rwc.28.1709190133825; Wed, 28 Feb 2024 23:02:13 -0800 (PST) Received: from lvnvda5233.lvn.broadcom.net ([192.19.161.250]) by smtp.gmail.com with ESMTPSA id mv1-20020a056214338100b0068f75622543sm435545qvb.1.2024.02.28.23.02.12 (version=TLS1_2 cipher=ECDHE-ECDSA-AES128-GCM-SHA256 bits=128/128); Wed, 28 Feb 2024 23:02:13 -0800 (PST) From: Michael Chan To: davem@davemloft.net Cc: netdev@vger.kernel.org, edumazet@google.com, kuba@kernel.org, pabeni@redhat.com, pavan.chebbi@broadcom.com, andrew.gospodarek@broadcom.com, jiri@resnulli.us, richardcochran@gmail.com Subject: [PATCH net-next 0/2] bnxt_en: Support configurable PTP TX timeout Date: Wed, 28 Feb 2024 23:02:00 -0800 Message-Id: <20240229070202.107488-1-michael.chan@broadcom.com> X-Mailer: git-send-email 2.32.0 Precedence: bulk X-Mailing-List: netdev@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 X-Patchwork-Delegate: kuba@kernel.org The driver needs to call firmware to retrieve the PTP hardware TX timestamp for PTP packets. The PTP packet is timestamped by hardware right before packet transmission on the wire. So there is variable delay on when the timestamp is available. The current fixed timeout value of 1 msec passed to the firmware may not be long enough on busy networks. Add a devlink driver runtime parameter to allow the user to configure this timeout value. Increase the default to 1 second and allow a maximum of 5 seconds. Pavan Chebbi (2): bnxt_en: Introduce devlink runtime driver param to set ptp tx timeout bnxt_en: Retry for TX timestamp from FW until timeout specified Documentation/networking/devlink/bnxt.rst | 7 ++++ .../net/ethernet/broadcom/bnxt/bnxt_devlink.c | 42 +++++++++++++++++++ drivers/net/ethernet/broadcom/bnxt/bnxt_ptp.c | 20 +++++++-- drivers/net/ethernet/broadcom/bnxt/bnxt_ptp.h | 7 +++- 4 files changed, 72 insertions(+), 4 deletions(-)