netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: "Patel, Vedang" <vedang.patel@intel.com>
To: Jakub Kicinski <jakub.kicinski@netronome.com>
Cc: "netdev@vger.kernel.org" <netdev@vger.kernel.org>,
	"Kirsher, Jeffrey T" <jeffrey.t.kirsher@intel.com>,
	"David S . Miller" <davem@davemloft.net>,
	Jamal Hadi Salim <jhs@mojatatu.com>,
	Cong Wang <xiyou.wangcong@gmail.com>,
	Jiri Pirko <jiri@resnulli.us>,
	"intel-wired-lan@lists.osuosl.org"
	<intel-wired-lan@lists.osuosl.org>,
	"Gomes, Vinicius" <vinicius.gomes@intel.com>,
	"l@dorileo.org" <l@dorileo.org>,
	Murali Karicheri <m-karicheri2@ti.com>
Subject: Re: [PATCH net-next v2 4/6] taprio: Add support for txtime-assist mode.
Date: Fri, 7 Jun 2019 22:27:07 +0000	[thread overview]
Message-ID: <0ED5E88B-E95A-4899-975D-00912685CEEF@intel.com> (raw)
In-Reply-To: <20190607150243.369f6e2c@cakuba.netronome.com>

Hi Jacub, 

> On Jun 7, 2019, at 3:02 PM, Jakub Kicinski <jakub.kicinski@netronome.com> wrote:
> 
> On Fri, 7 Jun 2019 20:42:55 +0000, Patel, Vedang wrote:
>>> Thanks for the changes, since you now validate no unknown flags are
>>> passed, perhaps there is no need to check if flags are == ~0?
>>> 
>>> IS_ENABLED() could just do: (flags) & TCA_TAPRIO_ATTR_FLAG_TXTIME_ASSIST
>>> No?
>>> 
>> This is specifically done so that user does not have to specify the
>> offload flags when trying to install the another schedule which will
>> be switched to at a later point of time (i.e. the admin schedule
>> introduced in Vinicius’ last series). Setting taprio_flags to ~0
>> will help us distinguish between the flags parameter not specified
>> and flags set to 0.
> 
> I'm not super clear on this, because of backward compat you have to
> treat attr not present as unset.  Let's see:
> 
> new qdisc:
> - flags attr = 0 -> txtime not used
> - flags attr = 1 -> txtime used
> -> no flags attr -> txtime not used
> change qdisc:
> - flags attr = old flags attr -> leave unchanged
> - flags attr != old flags attr -> error
> - no flags attr -> leave txtime unchanged
> 
> Doesn't that cover the cases?  Were you planning to have no flag attr
> on change mean disabled rather than no change?

You covered all the cases above.

Thinking a bit more about it, yes you are right. Initiializing flags to 0 will work.  I will incorporate this change in the next version.

Thanks,
Vedang

  reply	other threads:[~2019-06-07 22:27 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-06-06 17:50 [PATCH net-next v2 0/6] net/sched: Add txtime-assist support for taprio Vedang Patel
2019-06-06 17:50 ` [PATCH net-next v2 1/6] igb: clear out tstamp after sending the packet Vedang Patel
2019-06-06 17:50 ` [PATCH net-next v2 2/6] etf: Add skip_sock_check Vedang Patel
2019-06-06 17:50 ` [PATCH net-next v2 3/6] taprio: calculate cycle_time when schedule is installed Vedang Patel
2019-06-06 17:50 ` [PATCH net-next v2 4/6] taprio: Add support for txtime-assist mode Vedang Patel
2019-06-06 23:21   ` Jakub Kicinski
2019-06-07 20:42     ` Patel, Vedang
2019-06-07 22:02       ` Jakub Kicinski
2019-06-07 22:27         ` Patel, Vedang [this message]
2019-06-07 22:34           ` Jakub Kicinski
2019-06-06 17:50 ` [PATCH net-next v2 5/6] taprio: make clock reference conversions easier Vedang Patel
2019-06-06 17:50 ` [PATCH net-next v2 6/6] taprio: Adjust timestamps for TCP packets Vedang Patel

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=0ED5E88B-E95A-4899-975D-00912685CEEF@intel.com \
    --to=vedang.patel@intel.com \
    --cc=davem@davemloft.net \
    --cc=intel-wired-lan@lists.osuosl.org \
    --cc=jakub.kicinski@netronome.com \
    --cc=jeffrey.t.kirsher@intel.com \
    --cc=jhs@mojatatu.com \
    --cc=jiri@resnulli.us \
    --cc=l@dorileo.org \
    --cc=m-karicheri2@ti.com \
    --cc=netdev@vger.kernel.org \
    --cc=vinicius.gomes@intel.com \
    --cc=xiyou.wangcong@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).