All of lore.kernel.org
 help / color / mirror / Atom feed
From: Petr Machata <petrm@nvidia.com>
To: "David S. Miller" <davem@davemloft.net>,
	Eric Dumazet <edumazet@google.com>,
	Jakub Kicinski <kuba@kernel.org>, Paolo Abeni <pabeni@redhat.com>,
	<netdev@vger.kernel.org>
Cc: Ido Schimmel <idosch@nvidia.com>,
	Danielle Ratson <danieller@nvidia.com>,
	Amit Cohen <amcohen@nvidia.com>,
	Richard Cochran <richardcochran@gmail.com>,
	Petr Machata <petrm@nvidia.com>, <mlxsw@nvidia.com>
Subject: [PATCH net 0/4] mlxsw: Fixes for PTP support
Date: Fri, 12 Aug 2022 17:31:59 +0200	[thread overview]
Message-ID: <cover.1660315448.git.petrm@nvidia.com> (raw)

This set fixes several issues in mlxsw PTP code.

- Patch #1 fixes compilation warnings.

- Patch #2 adjusts the order of operation during cleanup, thereby
  closing the window after PTP state was already cleaned in the ASIC
  for the given port, but before the port is removed, when the user
  could still in theory make changes to the configuration.

- Patch #3 protects the PTP configuration with a custom mutex, instead
  of relying on RTNL, which is not held in all access paths.

- Patch #4 forbids enablement of PTP only in RX or only in TX. The
  driver implicitly assumed this would be the case, but neglected to
  sanitize the configuration.

Amit Cohen (4):
  mlxsw: spectrum_ptp: Fix compilation warnings
  mlxsw: spectrum: Clear PTP configuration after unregistering the
    netdevice
  mlxsw: spectrum_ptp: Protect PTP configuration with a mutex
  mlxsw: spectrum_ptp: Forbid PTP enablement only in RX or in TX

 .../net/ethernet/mellanox/mlxsw/spectrum.c    |  2 +-
 .../ethernet/mellanox/mlxsw/spectrum_ptp.c    | 30 ++++++++++++++-----
 .../ethernet/mellanox/mlxsw/spectrum_ptp.h    | 18 ++++++-----
 3 files changed, 34 insertions(+), 16 deletions(-)

-- 
2.35.3


             reply	other threads:[~2022-08-12 15:32 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-08-12 15:31 Petr Machata [this message]
2022-08-12 15:32 ` [PATCH net 1/4] mlxsw: spectrum_ptp: Fix compilation warnings Petr Machata
2022-08-12 15:32 ` [PATCH net 2/4] mlxsw: spectrum: Clear PTP configuration after unregistering the netdevice Petr Machata
2022-08-12 15:32 ` [PATCH net 3/4] mlxsw: spectrum_ptp: Protect PTP configuration with a mutex Petr Machata
2022-08-12 15:32 ` [PATCH net 4/4] mlxsw: spectrum_ptp: Forbid PTP enablement only in RX or in TX Petr Machata
2022-08-15 11:00 ` [PATCH net 0/4] mlxsw: Fixes for PTP support patchwork-bot+netdevbpf

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=cover.1660315448.git.petrm@nvidia.com \
    --to=petrm@nvidia.com \
    --cc=amcohen@nvidia.com \
    --cc=danieller@nvidia.com \
    --cc=davem@davemloft.net \
    --cc=edumazet@google.com \
    --cc=idosch@nvidia.com \
    --cc=kuba@kernel.org \
    --cc=mlxsw@nvidia.com \
    --cc=netdev@vger.kernel.org \
    --cc=pabeni@redhat.com \
    --cc=richardcochran@gmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.