netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Jakub Kicinski <jakub.kicinski@netronome.com>
To: "Patel, Vedang" <vedang.patel@intel.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 15:02:43 -0700	[thread overview]
Message-ID: <20190607150243.369f6e2c@cakuba.netronome.com> (raw)
In-Reply-To: <FF3C8B8E-421E-4C93-8895-C21A38BB55EE@intel.com>

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?

  reply	other threads:[~2019-06-07 22:02 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 [this message]
2019-06-07 22:27         ` Patel, Vedang
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=20190607150243.369f6e2c@cakuba.netronome.com \
    --to=jakub.kicinski@netronome.com \
    --cc=davem@davemloft.net \
    --cc=intel-wired-lan@lists.osuosl.org \
    --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=vedang.patel@intel.com \
    --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).