netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: "Íñigo Huguet" <ihuguet@redhat.com>
To: ecree.xilinx@gmail.com, habetsm.xilinx@gmail.com,
	richardcochran@gmail.com
Cc: davem@davemloft.net, edumazet@google.com, kuba@kernel.org,
	pabeni@redhat.com, netdev@vger.kernel.org,
	"Íñigo Huguet" <ihuguet@redhat.com>,
	"Yalin Li" <yalli@redhat.com>,
	"kernel test robot" <lkp@intel.com>
Subject: [PATCH net-next v2 0/4] sfc: support unicast PTP
Date: Wed,  1 Feb 2023 09:08:45 +0100	[thread overview]
Message-ID: <20230201080849.10482-1-ihuguet@redhat.com> (raw)
In-Reply-To: <20230131160506.47552-1-ihuguet@redhat.com>

Unicast PTP was not working with sfc NICs.

The reason was that these NICs don't timestamp all incoming packets,
but instead they only timestamp packets of the queues that are selected
for that. Currently, only one RX queue is configured for timestamp: the
RX queue of the PTP channel. The packets that are put in the PTP RX
queue are selected according to firmware filters configured from the
driver.

Multicast PTP was already working because the needed filters are known
in advance, so they're inserted when PTP is enabled. This patches
add the ability to dynamically add filters for unicast addresses,
extracted from the TX PTP-event packets.

Since we don't know in advance how many filters we'll need, some info
about the filters need to be saved. This will allow to check if a filter
already exists or if a filter is too old and should be removed.

Note that the previous point is unnecessary for multicast filters, but
I've opted to change how they're handled to match the new unicast's
filters to avoid having duplicate insert/remove_filters functions,
once for each type of filter.

Tested: With ptp4l, all combinations of master/slave and unicast/multicast
Reported-by: Yalin Li <yalli@redhat.com>
Signed-off-by: Íñigo Huguet <ihuguet@redhat.com>

v2: fixed missing IS_ERR
    added doc of missing fields in efx_ptp_rxfilter

For the missing IS_ERR:
Reported-by: kernel test robot <lkp@intel.com>

Íñigo Huguet (4):
  sfc: store PTP filters in a list
  sfc: allow insertion of filters for unicast PTP
  sfc: support unicast PTP
  sfc: remove expired unicast PTP filters

 drivers/net/ethernet/sfc/ptp.c | 274 ++++++++++++++++++++++++++-------
 1 file changed, 219 insertions(+), 55 deletions(-)

--
2.34.3


  parent reply	other threads:[~2023-02-01  8:09 UTC|newest]

Thread overview: 21+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-01-31 16:05 [PATCH net 0/4] sfc: support unicast PTP Íñigo Huguet
2023-01-31 16:05 ` [PATCH net 1/4] sfc: store PTP filters in a list Íñigo Huguet
2023-01-31 16:05 ` [PATCH net 2/4] sfc: allow insertion of filters for unicast PTP Íñigo Huguet
2023-01-31 16:05 ` [PATCH net 3/4] sfc: support " Íñigo Huguet
2023-01-31 16:05 ` [PATCH net 4/4] sfc: remove expired unicast PTP filters Íñigo Huguet
2023-01-31 17:46   ` kernel test robot
2023-02-01 16:09   ` kernel test robot
2023-02-01  8:08 ` Íñigo Huguet [this message]
2023-02-01  8:08   ` [PATCH net-next v2 1/4] sfc: store PTP filters in a list Íñigo Huguet
2023-02-02 12:13     ` Martin Habets
2023-02-01  8:08   ` [PATCH net-next v2 2/4] sfc: allow insertion of filters for unicast PTP Íñigo Huguet
2023-02-01  8:08   ` [PATCH net-next v2 3/4] sfc: support " Íñigo Huguet
2023-02-02 13:22     ` Martin Habets
2023-02-01  8:08   ` [PATCH net-next v2 4/4] sfc: remove expired unicast PTP filters Íñigo Huguet
2023-02-02 14:12     ` Martin Habets
2023-02-03 15:18       ` Íñigo Huguet
2023-02-03 15:29       ` Íñigo Huguet
2023-02-01 19:05   ` [PATCH net-next v2 0/4] sfc: support unicast PTP Jakub Kicinski
2023-02-02  7:08     ` Íñigo Huguet
2023-02-02  8:34       ` Leon Romanovsky
2023-02-02  9:17         ` Íñigo Huguet

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=20230201080849.10482-1-ihuguet@redhat.com \
    --to=ihuguet@redhat.com \
    --cc=davem@davemloft.net \
    --cc=ecree.xilinx@gmail.com \
    --cc=edumazet@google.com \
    --cc=habetsm.xilinx@gmail.com \
    --cc=kuba@kernel.org \
    --cc=lkp@intel.com \
    --cc=netdev@vger.kernel.org \
    --cc=pabeni@redhat.com \
    --cc=richardcochran@gmail.com \
    --cc=yalli@redhat.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).