All of lore.kernel.org
 help / color / mirror / Atom feed
From: Tariq Toukan <tariqt@mellanox.com>
To: Jakub Kicinski <kuba@kernel.org>, Tariq Toukan <tariqt@mellanox.com>
Cc: Boris Pismenny <borisp@mellanox.com>,
	Saeed Mahameed <saeedm@mellanox.com>,
	"davem@davemloft.net" <davem@davemloft.net>,
	"netdev@vger.kernel.org" <netdev@vger.kernel.org>
Subject: Re: [net-next 10/11] net/mlx5e: kTLS, Add kTLS RX resync support
Date: Wed, 3 Jun 2020 10:02:33 +0300	[thread overview]
Message-ID: <3895f115-6a0b-29ff-83b9-7e099819a570@mellanox.com> (raw)
In-Reply-To: <20200602113148.47c2daea@kicinski-fedora-PC1C0HJN.hsd1.ca.comcast.net>



On 6/2/2020 9:31 PM, Jakub Kicinski wrote:
> On Tue, 2 Jun 2020 14:32:44 +0300 Tariq Toukan wrote:
>> On 6/2/2020 1:12 AM, Jakub Kicinski wrote:
>>>>>> This is a rare corner case anyway, where more than 1k tcp
>>>>>> connections sharing the same RX ring will request resync at the
>>>>>> same exact moment.
>>>>>
>>>>> IDK about that. Certain applications are architected for max
>>>>> capacity, not efficiency under steady load. So it matters a lot how
>>>>> the system behaves under stress. What if this is the chain of
>>>>> events:
>>>>>
>>>>> overload -> drops -> TLS steams go out of sync -> all try to resync
>>>>>      
>>>>
>>>> I agree that this is not that rare, and it may be improved both in
>>>> future patches and hardware. Do you think it is critical to improve
>>>> it now, and not in a follow-up series?
>>>
>>> It's not a blocker for me, although if this makes it into 5.8 there
>>> will not be a chance to improve before net-next closes, so depends if
>>> you want to risk it and support the code as is...
>>>    
>>
>> Hi Jakub,
>> Thanks for your comments.
>>
>> This is just the beginning of this driver's offload support. I will
>> continue working on enhancements and improvements in next kernels.
>> We have several enhancements in plans.
>>
>> For now, if no real blockers, I think it's in a good shape to start with
>> and make it to the kernel.
>>
>> IMHO, this specific issue of better handling the resync failure in
>> driver can be addressed in stages:
>>
>> 1. As a fix: stop asking the stack for resync re-calls. If a resync
>> attempt fails, terminate any resync attempts for the specific connection.
>> If there's room for a re-spin I can provide today. Otherwise it is a
>> simple fix that can be addressed in the early rc's in -net.
>> What do you think?
>>
>> 2. Recover: this is an enhancement to be done in future kernels, where
>> the driver internally and independently recovers from failed attempts
>> and makes sure the are processed when there's enough room on the SQ
>> again. Without the stack being engaged.
> 
> IIUC the HW asks for a resync at the first record after a specific seq
> (the record header is in the frame that carried the OOO marking, right?)
> 
> Can we make the core understand those semantics and avoid trying to
> resync at the wrong record?
> 

HW asks for a resync when it is in tracking mode and identifies the 
magic, so it calculates the expected seq of next record.
This seq is not part of the completion (for now, this is a planned 
enhancement), so the device driver posts a request to the device to get 
the seq, and then the driver hopefully approve it (by another post to 
the HW) after comparing it to the stack sw seq.

As long as the device driver does not know the HW expected seq, it 
cannot provide a seq to the stack. So force resync is used.

We can think of an optimization here, it is doable.

  reply	other threads:[~2020-06-03  7:02 UTC|newest]

Thread overview: 29+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-05-29 19:46 [pull request][net-next 00/11] mlx5 kTLS RX offload support 2020-05-29 Saeed Mahameed
2020-05-29 19:46 ` [net-next 01/11] net/mlx5: kTLS, Improve TLS params layout structures Saeed Mahameed
2020-05-29 19:46 ` [net-next 02/11] net/mlx5e: Turn XSK ICOSQ into a general asynchronous one Saeed Mahameed
2020-05-29 19:46 ` [net-next 03/11] net/mlx5e: API to manipulate TTC rules destinations Saeed Mahameed
2020-05-29 19:46 ` [net-next 04/11] net/mlx5e: Receive flow steering framework for accelerated TCP flows Saeed Mahameed
2020-05-29 19:46 ` [net-next 05/11] net/mlx5e: Accel, Expose flow steering API for rules add/del Saeed Mahameed
2020-05-29 19:46 ` [net-next 06/11] net/mlx5e: kTLS, Improve TLS feature modularity Saeed Mahameed
2020-05-29 19:46 ` [net-next 07/11] net/mlx5e: kTLS, Use kernel API to extract private offload context Saeed Mahameed
2020-05-29 19:46 ` [net-next 08/11] net/mlx5e: kTLS, Add kTLS RX HW offload support Saeed Mahameed
2020-05-29 19:46 ` [net-next 09/11] net/mlx5e: kTLS, Add kTLS RX stats Saeed Mahameed
2020-05-29 20:09   ` Jakub Kicinski
2020-05-29 20:33     ` Saeed Mahameed
2020-05-29 19:46 ` [net-next 10/11] net/mlx5e: kTLS, Add kTLS RX resync support Saeed Mahameed
2020-05-29 20:16   ` Jakub Kicinski
2020-05-29 20:44     ` Saeed Mahameed
2020-05-29 21:50       ` Jakub Kicinski
2020-05-29 22:47         ` Saeed Mahameed
2020-05-30  4:07           ` Saeed Mahameed
2020-05-31 12:06         ` Boris Pismenny
2020-06-01 22:12           ` Jakub Kicinski
2020-06-02  4:23             ` Boris Pismenny
2020-06-02 18:27               ` Jakub Kicinski
2020-06-03  6:29                 ` Tariq Toukan
2020-06-04 11:04                 ` Boris Pismenny
2020-06-02 11:32             ` Tariq Toukan
2020-06-02 18:31               ` Jakub Kicinski
2020-06-03  7:02                 ` Tariq Toukan [this message]
2020-06-04  2:56                   ` Jakub Kicinski
2020-05-29 19:46 ` [net-next 11/11] net/mlx5e: kTLS, Improve rx handler function call 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=3895f115-6a0b-29ff-83b9-7e099819a570@mellanox.com \
    --to=tariqt@mellanox.com \
    --cc=borisp@mellanox.com \
    --cc=davem@davemloft.net \
    --cc=kuba@kernel.org \
    --cc=netdev@vger.kernel.org \
    --cc=saeedm@mellanox.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.