DPDK patches and discussions
 help / color / Atom feed
From: Andrew Rybchenko <arybchenko@solarflare.com>
To: Jerin Jacob <jerinjacobk@gmail.com>
Cc: Thomas Monjalon <thomas@monjalon.net>,
	Ferruh Yigit <ferruh.yigit@intel.com>,
	Pavan Nikhilesh <pbhagavatula@marvell.com>,
	"Neil Horman" <nhorman@tuxdriver.com>,
	John McNamara <john.mcnamara@intel.com>,
	Marko Kovacevic <marko.kovacevic@intel.com>,
	dpdk-dev <dev@dpdk.org>, Ori Kam <orika@mellanox.com>,
	David Marchand <david.marchand@redhat.com>,
	"Olivier Matz" <olivier.matz@6wind.com>,
	"Ananyev, Konstantin" <konstantin.ananyev@intel.com>
Subject: Re: [dpdk-dev] [PATCH v2 3/3] ethdev: improve flow mark Rx offload deprecation notice
Date: Mon, 16 Dec 2019 13:02:07 +0300
Message-ID: <05551069-2352-127b-19e6-6b1dee4ca697@solarflare.com> (raw)
In-Reply-To: <CALBAE1OEjcLN+bmah4j5ZBRMNo=4_jDQgS=oEM9PpuYiSA6LXw@mail.gmail.com>

On 12/16/19 10:38 AM, Jerin Jacob wrote:
> On Mon, Dec 9, 2019 at 2:47 PM Andrew Rybchenko
> <arybchenko@solarflare.com> wrote:
>> On 12/5/19 11:12 AM, Jerin Jacob wrote:
>>> On Mon, Dec 2, 2019 at 5:27 PM Andrew Rybchenko
>>> <arybchenko@solarflare.com> wrote:
>>>>> Ack.
>>>> Yes, I agree as well, but in general we already have an
>>>> exception MBUF_FAST_FREE which is just a nice wrap for
>>>> enabled by default support for mbufs from different
>>>> mempools and support for mbuf reference counters.
>>>> I don't suggest to change it. Just want to highlight
>>>> that we already have exceptions (nicely wrapped).
>>>> That's why I would not touch packet type parsing
>>>> "offload". Packet type parsing is not just on/off and
>>>> adding on/off in addition to existing API looks overkill.
>>>> Yes, it is one more exception, but nicely wrapped as well.
>>> I am all for making offloads disabled by default.
>>>>>>> And what would be DEFAULT behavior for the mbuf MARK updation feature?
>>>>>>> (That's where this thread started).
>>>>>> As all other features, mark is disabled by default.
>>>>>> Using a rte_flow rule, it can be enabled.
>>>>>> No need to pre-enable it.
>>>>> Ok.
>>>> But it returns us to the point where we started [1]:
>>>> The problem:
>>>> ~~~~~~~~~~~~
>>>> PMD wants to know before port start if application wants to
>>>> to use flow MARK/FLAG in the future. It is required because:
>>>> 1. HW may be configured in a different way to reserve resources
>>>>    for MARK/FLAG delivery.
>>>> 2. Datapath implementation choice may depend on it (e.g. vPMD
>>>>    is faster, but does not support MARK).
>>>> opt-in/opt-out solution has drawbacks mentioned above.
>>>> Also I'm not sure if opt-in/opt-out is per-queue or per-port.
>>>> (Offloads may be naturally per-queue and it is a big advantage).
>>>> IMHO feature which should be opt-out is almost equivalent to
>>>> offload enabled by default. It has the same negative properties
>>>> as enabled by default offloads.
>>>> Am I missing something again?
>>>> From my point of view I see no problem in necessity to say
>>>> in advance (before device start) that application would like
>>>> to use some features at run time.
>>> I agree with your problem definition and solution as offload.
>>> I think, our constraint is, we can not change functional ABI behavior
>>> for the next year. i.e The existing application should work for the
>>> next year without
>>> changing the code.
>>> I think, it all boiling down to adhere to that constraint or not for
>>> this specific case.
>> May be the escape is to avoid consistency checks in generic
>> code (not sure that such checks are doable/required in this
>> case, but anyway) and make the behaviour change vendor/driver-
>> specific. I understand that it is far from ideal solution.
>> May be offload should be combined with opt-out as a way to
>> disable. I.e. offload is positive (not negative), but enabled
>> by default (i.e. automatically added to offloads as we do
>> for RSS_HASH) with an experimental opt-out to disable it.
>> As the result:
>> 1. There is no changes in behaviour from application point of
>>    view.
>> 2. Application which care about performance and ready to use
>>    experimental opt-out to optimize performance can do it.
>>    (i.e. use opt-out to avoid the offload enabled by default).
>> 3. Later when window to normalize behaviour opens, opt-out
>>    becomes NOP (i.e. it still could be preserved for some
>>    time to simplify transition).
>> 4. The offload is enabled by default during transition
>>    period only since it represents a feature which had
>>    no offload flag before and was always enabled before.
>> 5. As an offload the feature may be controlled per-device
>>    and per-queue natively.
> Looks good to me.
> It makes sense to have a generic opt API to have for year ABI,
> which works on
> - per queue/per port
> - Enable by default to keep backward compatible.
> - Have a generic signature to allow probe() all the enabled opt-in features
> and then disable if required by the application.

I'd like to clarify to be sure that we're on the same page:
   - enabled by default till 20.11 to preserve behaviour
   - applications may migrate and explicitly enable
   - disabled by default since 20.11 to switch to generic
     policy which require offloads to be disabled by default
2. Add experimental opt-out which allow to disable the
   offload to optimize performance for applications which
   would like to care about it early
   - opt-out remains but becomes NOP in 20.11

> - I think, rte_eth_dev_set_ptypes()  needs to change to generic API as
> it comes under opt-in/out scheme.

I'm not sure that I understand how it should look like for

>> It still does not sort out "necessity to enable twice"
>> concern which for specified above "the problem", IMO,
>> contradicts to "disabled by default offloads" (I read
>> it as "the best performance" by default).
>>> Once that is decided, we can wrap it in offload flags vs opt scheme
>>> (by default enabled scheme).
>> Yes. May be I don't understand all the details of the opt
>> scheme right now, but I don't like what I can imagine as
>> described above.
>>>> Yes, all features which may be controlled at run-time are
>>>> headache for optimizations (VLAN offloads).
>>>> [1]
>>>> http://inbox.dpdk.org/dev/f170105b-9c60-1b04-cb18-52e0951ddcdb@solarflare.com/

  reply index

Thread overview: 28+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-11-19 12:05 [dpdk-dev] [PATCH 1/3] ethdev: remove deprecation notice for packet type set Andrew Rybchenko
2019-11-19 12:05 ` [dpdk-dev] [PATCH 2/3] ethdev: remove deprecation notice about RSS hash offload Andrew Rybchenko
2019-11-19 12:05 ` [dpdk-dev] [PATCH 3/3] ethdev: improve flow mark Rx offload deprecation notice Andrew Rybchenko
2019-11-19 12:12 ` [dpdk-dev] [PATCH v2 1/3] ethdev: remove deprecation notice for packet type set Andrew Rybchenko
2019-11-19 12:12   ` [dpdk-dev] [PATCH v2 2/3] ethdev: remove deprecation notice about RSS hash offload Andrew Rybchenko
2019-11-19 15:04     ` Ferruh Yigit
2019-11-25 16:38       ` Ferruh Yigit
2019-11-19 12:12   ` [dpdk-dev] [PATCH v2 3/3] ethdev: improve flow mark Rx offload deprecation notice Andrew Rybchenko
2019-11-21 22:01     ` Thomas Monjalon
2019-11-22 10:12       ` Andrew Rybchenko
2019-11-22 11:15         ` Thomas Monjalon
2019-11-22 11:53           ` Andrew Rybchenko
2019-11-22 13:32             ` Jerin Jacob
2019-11-22 18:58             ` Thomas Monjalon
2019-11-23  9:42               ` Jerin Jacob
2019-11-23 18:12                 ` Thomas Monjalon
2019-11-25 10:44                   ` Jerin Jacob
2019-11-25 11:39                     ` Thomas Monjalon
2019-12-02  4:21                       ` Jerin Jacob
2019-12-02  9:15                         ` Thomas Monjalon
2019-12-02 11:09                           ` Jerin Jacob
2019-12-02 11:57                             ` Andrew Rybchenko
2019-12-05  8:12                               ` Jerin Jacob
2019-12-09  9:17                                 ` Andrew Rybchenko
2019-12-16  7:38                                   ` Jerin Jacob
2019-12-16 10:02                                     ` Andrew Rybchenko [this message]
2019-11-19 15:04   ` [dpdk-dev] [PATCH v2 1/3] ethdev: remove deprecation notice for packet type set Ferruh Yigit
2019-11-25 16:38     ` Ferruh Yigit

Reply instructions:

You may reply publically 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:

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

  git send-email \
    --in-reply-to=05551069-2352-127b-19e6-6b1dee4ca697@solarflare.com \
    --to=arybchenko@solarflare.com \
    --cc=david.marchand@redhat.com \
    --cc=dev@dpdk.org \
    --cc=ferruh.yigit@intel.com \
    --cc=jerinjacobk@gmail.com \
    --cc=john.mcnamara@intel.com \
    --cc=konstantin.ananyev@intel.com \
    --cc=marko.kovacevic@intel.com \
    --cc=nhorman@tuxdriver.com \
    --cc=olivier.matz@6wind.com \
    --cc=orika@mellanox.com \
    --cc=pbhagavatula@marvell.com \
    --cc=thomas@monjalon.net \


* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link

DPDK patches and discussions

Archives are clonable:
	git clone --mirror http://inbox.dpdk.org/dev/0 dev/git/0.git

	# If you have public-inbox 1.1+ installed, you may
	# initialize and index your mirror using the following commands:
	public-inbox-init -V2 dev dev/ http://inbox.dpdk.org/dev \
	public-inbox-index dev

Newsgroup available over NNTP:

AGPL code for this site: git clone https://public-inbox.org/ public-inbox