All of lore.kernel.org
 help / color / mirror / Atom feed
From: "Mintz, Yuval" <Yuval.Mintz@cavium.com>
To: Eric Dumazet <eric.dumazet@gmail.com>,
	"richardcochran@gmail.com" <richardcochran@gmail.com>
Cc: "davem@davemloft.net" <davem@davemloft.net>,
	"netdev@vger.kernel.org" <netdev@vger.kernel.org>,
	"Kalluru, Sudarsana" <Sudarsana.Kalluru@cavium.com>
Subject: RE: [PATCH net-next v7 2/2] qede: Add driver support for PTP
Date: Thu, 16 Feb 2017 12:45:43 +0000	[thread overview]
Message-ID: <BL2PR07MB2306B4233E972F10012DF7398D5A0@BL2PR07MB2306.namprd07.prod.outlook.com> (raw)
In-Reply-To: <BL2PR07MB2306CD2B1CFECEE4AAB425108D5A0@BL2PR07MB2306.namprd07.prod.outlook.com>


> > > +void qede_ptp_tx_ts(struct qede_dev *edev, struct sk_buff *skb) {
> > > +	struct qede_ptp *ptp;
> > > +
> > > +	ptp = edev->ptp;
> > > +	if (!ptp)
> > > +		return;
> > > +
> > > +	if (unlikely(!(edev->flags & QEDE_TX_TIMESTAMPING_EN))) {
> > > +		DP_NOTICE(edev,
> > > +			  "Tx timestamping was not enabled, this packet will
> > not be timestamped\n");
> > > +	} else if (unlikely(ptp->tx_skb)) {
> > > +		DP_NOTICE(edev,
> > > +			  "The device supports only a single outstanding
> > packet to timestamp, this packet will not be timestamped\n");
> > > +	} else {
> > > +		skb_shinfo(skb)->tx_flags |= SKBTX_IN_PROGRESS;
> > > +		/* schedule check for Tx timestamp */
> > > +		ptp->tx_skb = skb_get(skb);
> > > +		schedule_work(&ptp->work);
> > > +	}
> > > +}
> >
> >
> > This is a multi queue device.
> >
> > Therefore multiple cpus could call this function at the same time.
> >
> > ptp->tx_skb needs some kind of SMP protection.
> 
> IIs it a real issue or odd corner-case in actual scenario?

we have a print going to out at default when encountering
this; So assuming it's a real life scenario, we should probably
remove it as well.
If it's not, I can simply convert it to WARN_ONCE().


  reply	other threads:[~2017-02-16 12:45 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-02-15  8:24 [PATCH net-next v7 0/2] qed*: Add support for PTP Yuval Mintz
2017-02-15  8:24 ` [PATCH net-next v7 1/2] qed: Add infrastructure for PTP support Yuval Mintz
2017-02-16 12:41   ` Eric Dumazet
2017-02-16 12:48     ` Mintz, Yuval
2017-02-15  8:24 ` [PATCH net-next v7 2/2] qede: Add driver support for PTP Yuval Mintz
2017-02-16 12:23   ` Eric Dumazet
2017-02-16 12:38     ` Mintz, Yuval
2017-02-16 12:45       ` Mintz, Yuval [this message]
2017-02-15 17:43 ` [PATCH net-next v7 0/2] qed*: Add " David Miller

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=BL2PR07MB2306B4233E972F10012DF7398D5A0@BL2PR07MB2306.namprd07.prod.outlook.com \
    --to=yuval.mintz@cavium.com \
    --cc=Sudarsana.Kalluru@cavium.com \
    --cc=davem@davemloft.net \
    --cc=eric.dumazet@gmail.com \
    --cc=netdev@vger.kernel.org \
    --cc=richardcochran@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 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.