[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <BL2PR07MB2306B4233E972F10012DF7398D5A0@BL2PR07MB2306.namprd07.prod.outlook.com>
Date: Thu, 16 Feb 2017 12:45:43 +0000
From: "Mintz, Yuval" <Yuval.Mintz@...ium.com>
To: Eric Dumazet <eric.dumazet@...il.com>,
"richardcochran@...il.com" <richardcochran@...il.com>
CC: "davem@...emloft.net" <davem@...emloft.net>,
"netdev@...r.kernel.org" <netdev@...r.kernel.org>,
"Kalluru, Sudarsana" <Sudarsana.Kalluru@...ium.com>
Subject: RE: [PATCH net-next v7 2/2] qede: Add driver support for PTP
> > > +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().
Powered by blists - more mailing lists