netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Saeed Mahameed <saeed@kernel.org>
To: Vladimir Oltean <vladimir.oltean@nxp.com>,
	Jakub Kicinski <kuba@kernel.org>
Cc: "David S. Miller" <davem@davemloft.net>,
	"netdev@vger.kernel.org" <netdev@vger.kernel.org>,
	Eran Ben Elisha <eranbe@nvidia.com>,
	Tariq Toukan <tariqt@nvidia.com>,
	Richard Cochran <richardcochran@gmail.com>,
	Willem de Bruijn <willemdebruijn.kernel@gmail.com>
Subject: Re: [net-next V2 08/15] net/mlx5e: Add TX PTP port object support
Date: Sun, 06 Dec 2020 22:22:33 -0800	[thread overview]
Message-ID: <fd1e65f000f3d1ce929562ca44e7644bdfc2ea76.camel@kernel.org> (raw)
In-Reply-To: <20201205005530.lcngtpksxged2ewo@skbuf>

On Sat, 2020-12-05 at 00:55 +0000, Vladimir Oltean wrote:
> Hi Jakub,
> 
> On Fri, Dec 04, 2020 at 02:52:40PM -0800, Jakub Kicinski wrote:
> > On Fri, 04 Dec 2020 13:57:49 -0800 Saeed Mahameed wrote:
> > > > Why not use the PTP classification helpers we already have?
> > > 
> > > do you mean ptp_parse_header() or the ebpf prog ?
> > > We use skb_flow_dissect() which should be simple enough.
> > 
> > Not sure which exact one TBH, I just know we have helpers for this,
> > so if we don't use them it'd be good to at least justify why.
> > 
> > Maybe someone with more practical knowledge here can chime in with
> > a recommendation for a helper to find PTP frames on TX?
> 
> ptp_classify_raw is optimized to identify PTP event messages (the
> only
> ones that need to be timestamped as far as the protocol is
> concerned).
> PTP general messages (Follow-Up, Delay_Resp, Announce etc) will
> return
> PTP_CLASS_NONE from ptp_classify_raw.
> 

I looked at the implementation, while it is nice to see that it is
running an ebpf program, but it seems these functions are meant for
those who care about the content of those PTP messages.

Select queue has to be consistent for a specific stream so
I'd rather lookup the well known ptp port via the standard flow
dissector and select the queue accordingly, using any other mechanism
might cause inconsistencies and ooo.

also the flow dissector handles non linear skbs very nicely, whereas,
the two ptp classifier methods don't. They actually have different
purposes than what we are looking for.

so I think we should stick with our simple flow dissector
implementation.

> But maybe there is an even better way, since this is on the TX path,
> maybe the .ndo_select_queue operation can simply look at
> 	skb_shinfo(skb)->tx_flags & SKBTX_HW_TSTAMP
> when deciding whether to send it to the "good" queue or not. This has
> the advantage of being less expensive than any sort of frame
> classification.
> 

We also considered this, this is bad in our case because this will
easily break performance for users who do setsockopt(SO_TIMESTAMPING)
on TCP/UDP sockets that favor performance over precision but still want
HW timestamping.

> Nonetheless, some tests would need to be run. In theory, practice and
> theory are the same, whereas in practice they aren't.

In Theory, I don't agree ;-).




  reply	other threads:[~2020-12-07  6:23 UTC|newest]

Thread overview: 41+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-12-03  4:20 [pull request][net-next V2 00/15] mlx5 updates 2020-12-01 Saeed Mahameed
2020-12-03  4:20 ` [net-next V2 01/15] net/mlx5e: Free drop RQ in a dedicated function Saeed Mahameed
2020-12-03  4:20 ` [net-next V2 02/15] net/mlx5e: Allow CQ outside of channel context Saeed Mahameed
2020-12-03  4:20 ` [net-next V2 03/15] net/mlx5e: Allow RQ " Saeed Mahameed
2020-12-03  4:20 ` [net-next V2 04/15] net/mlx5e: Allow SQ " Saeed Mahameed
2020-12-03  4:20 ` [net-next V2 05/15] net/mlx5e: Change skb fifo push/pop API to be used without SQ Saeed Mahameed
2020-12-03  4:20 ` [net-next V2 06/15] net/mlx5e: Split SW group counters update function Saeed Mahameed
2020-12-03  4:21 ` [net-next V2 07/15] net/mlx5e: Move MLX5E_RX_ERR_CQE macro Saeed Mahameed
2020-12-03  4:21 ` [net-next V2 08/15] net/mlx5e: Add TX PTP port object support Saeed Mahameed
2020-12-04  2:29   ` Jakub Kicinski
2020-12-04 19:33     ` Saeed Mahameed
2020-12-04 20:26       ` Jakub Kicinski
2020-12-04 21:57         ` Saeed Mahameed
2020-12-04 22:52           ` Jakub Kicinski
2020-12-05  0:55             ` Vladimir Oltean
2020-12-07  6:22               ` Saeed Mahameed [this message]
2020-12-04 23:17           ` Jakub Kicinski
2020-12-04 23:57             ` Saeed Mahameed
2020-12-05  0:24               ` Jakub Kicinski
2020-12-06 13:37                 ` Eran Ben Elisha
2020-12-06 17:08                   ` Richard Cochran
2020-12-07  8:37                     ` Saeed Mahameed
2020-12-07 11:05                       ` Eran Ben Elisha
2020-12-07 15:19                       ` Richard Cochran
2020-12-07 20:42                         ` Jakub Kicinski
2020-12-07 22:04                           ` Saeed Mahameed
2020-12-08 13:02                           ` Richard Cochran
2020-12-06 13:36             ` Eran Ben Elisha
2020-12-07 20:29               ` Jakub Kicinski
2020-12-06 13:33           ` Eran Ben Elisha
2020-12-05  1:49         ` Vladimir Oltean
2020-12-05  2:10           ` Jakub Kicinski
2020-12-05 13:20           ` Richard Cochran
2020-12-07  5:50           ` Saeed Mahameed
2020-12-03  4:21 ` [net-next V2 09/15] net/mlx5e: Add TX port timestamp support Saeed Mahameed
2020-12-03  4:21 ` [net-next V2 10/15] net/mlx5e: remove unnecessary memset Saeed Mahameed
2020-12-03  4:21 ` [net-next V2 11/15] net/mlx5e: Remove duplicated include Saeed Mahameed
2020-12-03  4:21 ` [net-next V2 12/15] net/mlx5: Arm only EQs with EQEs Saeed Mahameed
2020-12-03  4:21 ` [net-next V2 13/15] net/mlx5: Fix passing zero to 'PTR_ERR' Saeed Mahameed
2020-12-03  4:21 ` [net-next V2 14/15] net/mlx5e: Split between RX/TX tunnel FW support indication Saeed Mahameed
2020-12-03  4:21 ` [net-next V2 15/15] net/mlx5e: Fill mlx5e_create_cq_param in a function Saeed Mahameed

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=fd1e65f000f3d1ce929562ca44e7644bdfc2ea76.camel@kernel.org \
    --to=saeed@kernel.org \
    --cc=davem@davemloft.net \
    --cc=eranbe@nvidia.com \
    --cc=kuba@kernel.org \
    --cc=netdev@vger.kernel.org \
    --cc=richardcochran@gmail.com \
    --cc=tariqt@nvidia.com \
    --cc=vladimir.oltean@nxp.com \
    --cc=willemdebruijn.kernel@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 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).