From patchwork Wed Jun 26 16:42:57 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Michael Chan X-Patchwork-Id: 13713184 Received: from mail-qk1-f172.google.com (mail-qk1-f172.google.com [209.85.222.172]) (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 6DDCE18FC80 for ; Wed, 26 Jun 2024 16:43:33 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.222.172 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1719420215; cv=none; b=Jk9uUkzZNRth7LoPoF9usPO7YDVt0nzT3+Ltx/RJKoHZpWeYJWDZt5ErJyIBaDsxZa5Nl0pKubLiXCmQglRVKK3JNFFfKRBCYkLuapuHSsQz/DnNZlsVvlQIdrmCPe+oaK5Wf7mmi+hOEXgi4z3Rztog9K/KAHmN+CSG9I9D15E= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1719420215; c=relaxed/simple; bh=FeKIHLKQuO74ExM77YF5t+5+YDNpGrimRbkoi9bhtuQ=; h=From:To:Cc:Subject:Date:Message-ID:MIME-Version:Content-Type; b=eoLT49Oj02wP8ZR1taJGhL0l7t4DNQFfip6Emo08Ijy/hF5zwdM1FWKHdczPfaJe51D6fthdaXaBnvK3XH19tkE18xYP4/UBMr8kCRweI6YWJV+sNdPtFLsedAzv73LlS+nVkBko4zu9bTpvB26ip1dpnl1Zw819mujXk6z4fjQ= 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=X8vzqyCm; arc=none smtp.client-ip=209.85.222.172 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="X8vzqyCm" Received: by mail-qk1-f172.google.com with SMTP id af79cd13be357-79c06169e9cso130356485a.3 for ; Wed, 26 Jun 2024 09:43:33 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=broadcom.com; s=google; t=1719420212; x=1720025012; darn=vger.kernel.org; h=mime-version:message-id:date:subject:cc:to:from:from:to:cc:subject :date:message-id:reply-to; bh=RkAUatDJemx9Ar1H23EI2nsX/iYpTVWe5iK1IRK9SZ0=; b=X8vzqyCmuQPkeVUFQID3Ri9SxhtHz/rtlx80WBj3gg0cBxI8dYUwYKPYtyQkmNN2C8 cOReohOXBHOo9DW/0Tr4cnC8qbSDttoXY/FO1XCp6zyF5t+QAirVKa0p+718e0kuntCJ UcZYdAANwX53TaRVCmnQBqXL9w5sXSI+zw8e0= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1719420212; x=1720025012; h=mime-version:message-id:date:subject:cc:to:from:x-gm-message-state :from:to:cc:subject:date:message-id:reply-to; bh=RkAUatDJemx9Ar1H23EI2nsX/iYpTVWe5iK1IRK9SZ0=; b=WmtC5j5CioyfL+4zIEoZU+8+SMxmpiK4a3tIAiP3JJbMGnHrI4p2XRNQfdUOBIU/Uk PGfHOsE3RgHEDd0qtuIlIvW3UIwZfuPQA6Q6bM6MMf3d+cznntI1G/pc/tvGrtPo1Dei xcsFfUqZdNrQrrCgzLa+eHVs6UnmRzv68hFeIkPG0Wlg4mkuqoiy4FMeZ28qCj0Y6FEj pqWBnz1xTYsQVCi8KKI/ipnRKTjvfj4Dz586sQ/OOx0cqAMWbNWCx0Wk/QSHhgjzOSwh SdKCdF3urFzZfYzL0+/hulTuhBSf3KIHx2x5vYBzmUUmplm2M+PPbV8KHtCYSB6pfswR 947Q== X-Gm-Message-State: AOJu0YxPtKbZxm+uQrNyjVxTOrbeFnu/mrkEGyUP8wzTMHIR0Ha5QZIG zn8QnkpqR9Z935TePrUNN91ziP+R5RWTG9sfkBZr8bYX7K3eEbZtW0Hv5HhFUg== X-Google-Smtp-Source: AGHT+IEVCEu9bSow1i3To8YefSYfc3b1sLZOdu3sNKzsUl/Col/G7AgqtO1p/FWwS7a1d10E9TlMWg== X-Received: by 2002:a05:620a:45a8:b0:795:48dd:f1a with SMTP id af79cd13be357-79be6cf6d86mr1262567785a.15.1719420209638; Wed, 26 Jun 2024 09:43:29 -0700 (PDT) Received: from lvnvda5233.lvn.broadcom.net ([192.19.161.250]) by smtp.gmail.com with ESMTPSA id af79cd13be357-79d53c42aafsm53570485a.58.2024.06.26.09.43.28 (version=TLS1_2 cipher=ECDHE-ECDSA-AES128-GCM-SHA256 bits=128/128); Wed, 26 Jun 2024 09:43:29 -0700 (PDT) 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, richardcochran@gmail.com Subject: [PATCH net-next 00/10] bnxt_en: PTP updates for net-next Date: Wed, 26 Jun 2024 09:42:57 -0700 Message-ID: <20240626164307.219568-1-michael.chan@broadcom.com> X-Mailer: git-send-email 2.43.4 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 first 5 patches implement the PTP feature on the new BCM5760X chips. The main new hardware feature is the new TX timestamp completion which enables the driver to retrieve the TX timestamp in NAPI without deferring to the PTP worker. The last 5 patches increase the number of TX PTP packets in-flight from 1 to 4 on the older BCM5750X chips. On these older chips, we need to call firmware in the PTP worker to retrieve the timestamp. We use an arry to keep track of the in-flight TX PTP packets. Michael Chan (4): bnxt_en: Add new TX timestamp completion definitions bnxt_en: Add is_ts_pkt field to struct bnxt_sw_tx_bd bnxt_en: Allow some TX packets to be unprocessed in NAPI bnxt_en: Add TX timestamp completion logic Pavan Chebbi (6): bnxt_en: Add BCM5760X specific PHC registers mapping bnxt_en: Refactor all PTP TX timestamp fields into a struct bnxt_en: Remove an impossible condition check for PTP TX pending SKB bnxt_en: Let bnxt_stamp_tx_skb() return error code bnxt_en: Increase the max total outstanding PTP TX packets to 4 bnxt_en: Remove atomic operations on ptp->tx_avail drivers/net/ethernet/broadcom/bnxt/bnxt.c | 109 ++++++++----- drivers/net/ethernet/broadcom/bnxt/bnxt.h | 42 ++++- drivers/net/ethernet/broadcom/bnxt/bnxt_ptp.c | 151 +++++++++++++----- drivers/net/ethernet/broadcom/bnxt/bnxt_ptp.h | 36 ++++- 4 files changed, 254 insertions(+), 84 deletions(-)