From patchwork Fri Jun 28 19:29:55 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Michael Chan X-Patchwork-Id: 13716546 Received: from mail-pf1-f175.google.com (mail-pf1-f175.google.com [209.85.210.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 C807576025 for ; Fri, 28 Jun 2024 19:30:25 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.210.175 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1719603027; cv=none; b=s+D8Ka/+hnuknezdQhH1FwlcjweS4XRqBtzAno6n3jiQtgth9S247JCXZrC+HYzfecoMLX1NOAPT1DLaMLQ6TNKN8h8n0gM5o/IBhvdbwu3jU2V+HBlBeCCuipjtyVXsb999jVo/Q/FhMIDXBpnm4raQ0uYu8YU8oMnnwRWm6z8= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1719603027; c=relaxed/simple; bh=ldel5TVHBbRf+4KpCapUM3gojpZY0n/DhdNaws8Bxc8=; h=From:To:Cc:Subject:Date:Message-ID:MIME-Version:Content-Type; b=AdllCWAQCpzwijp5ZpOGmAz18RYi4ffX8H7lFSadpMCPQ3bxPuAzy//RweSyKnbj+aW6Ov6bW10/oyW2JlWWjHBkHpfh7lVFELXYh97CjSzk1qnwjDmn48a4aIjYMQXD4dTMGub4lzCL2n0YbVE4gTfyQfJZcJO7VO80woJmtEY= 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=WXSRdOKZ; arc=none smtp.client-ip=209.85.210.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="WXSRdOKZ" Received: by mail-pf1-f175.google.com with SMTP id d2e1a72fcca58-7066a3229f4so729137b3a.2 for ; Fri, 28 Jun 2024 12:30:25 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=broadcom.com; s=google; t=1719603025; x=1720207825; darn=vger.kernel.org; h=mime-version:message-id:date:subject:cc:to:from:from:to:cc:subject :date:message-id:reply-to; bh=W3FH5g00NitWu7FAdPBWI76t40Zw06Ec+i89xfuIbrY=; b=WXSRdOKZ9NWk73TUyQeIdqaOynQmg1Zn0OqsnYKugRO8kqdQ18/VYef7Vo1NDxhnfX 5TKeicj9gzgygtPv41Q+YrjL4a/qmPI3CTz8kVcd7n40pvfXsLeVAiB03quo0P79rWXT MaC27u7mm3ZEIhKGkWKPJ7m8itbLE/qirMx7A= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1719603025; x=1720207825; h=mime-version:message-id:date:subject:cc:to:from:x-gm-message-state :from:to:cc:subject:date:message-id:reply-to; bh=W3FH5g00NitWu7FAdPBWI76t40Zw06Ec+i89xfuIbrY=; b=rZ94UfI2CQsAXAc5+0ApwsxteATx983OH4HideNr5pCD8Nx2zz2uD827EJ3vIi1R7F 9jYvQjyiPhsXa5mgcTM0ybPExIEcduS368si1ZGcB0V7llsKnU6F5Fhpd06NaM/cfdxe 3o/L/z0RjPZqfpYTmSHNLHO0eKDqoarwLHivrt5R+J6Uh5SFAF43zM+A9KlBOuUm877W fWssKantzwzLS/KWs1QHmSvNfo6APUnm6/7ESRf++hm5jor+HJLCrAk1Qfn+G2GMtG0T 4HX0mqhTyehtyXAfcl673QYHxBEGDpyDsD7/yJ6kIMoXlHGmvXZNNI1efaSJYLlyY5b9 VmcQ== X-Gm-Message-State: AOJu0YwuCgL1wmHGGUnG07UFKZos/J1q1gIjlvhRSH1bjzP4l8iQz4aM gdODd62SxL4GGp7ew0+tEOjckatvMk3qa676IXpoSL6pcMLi1t1ASkdThuBihQ== X-Google-Smtp-Source: AGHT+IFTJX/Yo31+vL/s1+bxjM9cacRJynCW52LAy/lm4757DOtu9TRovonT6cZbsjsix3acactv8A== X-Received: by 2002:a05:6a20:3caa:b0:1bd:248d:990d with SMTP id adf61e73a8af0-1bd248d99cfmr13269610637.25.1719603024713; Fri, 28 Jun 2024 12:30:24 -0700 (PDT) Received: from lvnvda5233.lvn.broadcom.net ([192.19.161.250]) by smtp.gmail.com with ESMTPSA id 98e67ed59e1d1-2c939cc9b04sm46707a91.0.2024.06.28.12.30.23 (version=TLS1_2 cipher=ECDHE-ECDSA-AES128-GCM-SHA256 bits=128/128); Fri, 28 Jun 2024 12:30:24 -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, horms@kernel.org, przemyslaw.kitszel@intel.com Subject: [PATCH net-next v2 00/10] bnxt_en: PTP updates for net-next Date: Fri, 28 Jun 2024 12:29:55 -0700 Message-ID: <20240628193006.225906-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. v2: Patch #2: Fix the unwind of txr->is_ts_pkt when bnxt_start_xmit() aborts. Patch #4: Set the SKBTX_IN_PROGRESS flag for timestamp 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 | 106 +++++++----- 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, 252 insertions(+), 83 deletions(-)