From: "Sørensen, Stefan" <Stefan.Sorensen@spectralink.com>
To: "richardcochran@gmail.com" <richardcochran@gmail.com>
Cc: "netdev@vger.kernel.org" <netdev@vger.kernel.org>,
"dan.carpenter@oracle.com" <dan.carpenter@oracle.com>,
"f.fainelli@gmail.com" <f.fainelli@gmail.com>,
"andrew@lunn.ch" <andrew@lunn.ch>,
"kernel-janitors@vger.kernel.org"
<kernel-janitors@vger.kernel.org>
Subject: Re: [PATCH] dp83640: don't recieve time stamps twice
Date: Wed, 19 Apr 2017 11:28:34 +0000 [thread overview]
Message-ID: <1492601312.3108.3.camel@spectralink.com> (raw)
In-Reply-To: <20170419103135.GA1670@localhost.localdomain>
T24gV2VkLCAyMDE3LTA0LTE5IGF0IDEyOjMxICswMjAwLCBSaWNoYXJkIENvY2hyYW4gd3JvdGU6
DQo+IENhbiB3ZSBwbGVhc2UgZml4IHRoaXMgaW4gYW5vdGhlciB3YXk/wqDCoFRoZXJlIGlzIG5v
IG5lZWQgdG8gaG9sZCB0aGUNCj4gc3BpbiBsb2NrIGR1cmluZyB0aGUgY2FsbGJhY2sgaW50byB0
aGUgbmV0d29ya2luZyBzdGFjay7CoMKgSW5zdGVhZCwNCj4gaG93IGFib3V0IHRoZSBmb2xsb3dp
bmcgZGlmZiwgd2hpY2ggYWxzbyBmaXhlcyB0aGUgb3RoZXIgY2FsbCBzaXRlLi4uDQoNCg0KSSBh
Z3JlZSB0aGF0IHRoaXMgaXMgYSBiZXR0ZXIgd2F5IHRvIGZpeCBpdCAtIEkgdGhpbmsgdGhhdCB0
aGlzIHdhcyB0aGUNCnB1cnBvc2Ugb2YgdGhlIHBhdGNoIHRoYXQgZ290IGhhbGZ3YXkgbWl4ZWQg
aW4uDQoNCkBAIC04NzQsMTQgKzg3NCwxNSBAQCBzdGF0aWMgdm9pZCBkZWNvZGVfcnh0cyhzdHJ1
Y3QgZHA4MzY0MF9wcml2YXRlDQo+ICpkcDgzNjQwLA0KPiDCoAkJCXNoaHd0c3RhbXBzID0gc2ti
X2h3dHN0YW1wcyhza2IpOw0KPiDCoAkJCW1lbXNldChzaGh3dHN0YW1wcywgMCwNCj4gc2l6ZW9m
KCpzaGh3dHN0YW1wcykpOw0KPiDCoAkJCXNoaHd0c3RhbXBzLT5od3RzdGFtcCA9IG5zX3RvX2t0
aW1lKHJ4dHMtDQo+ID5ucyk7DQo+IC0JCQluZXRpZl9yeF9uaShza2IpOw0KPiDCoAkJCWxpc3Rf
YWRkKCZyeHRzLT5saXN0LCAmZHA4MzY0MC0+cnhwb29sKTsNCj4gwqAJCQlicmVhazsNCj4gwqAJ
CX0NCj4gwqAJfQ0KPiDCoAlzcGluX3VubG9jaygmZHA4MzY0MC0+cnhfcXVldWUubG9jayk7DQo+
IMKgDQo+IC0JaWYgKCFzaGh3dHN0YW1wcykNCj4gKwlpZiAoc2hod3RzdGFtcHMpDQo+ICsJCW5l
dGlmX3J4X25pKHNrYik7DQo+ICsJZWxzZQ0KPiDCoAkJbGlzdF9hZGRfdGFpbCgmcnh0cy0+bGlz
dCwgJmRwODM2NDAtPnJ4dHMpOw0KPiDCoG91dDoNCj4gwqAJc3Bpbl91bmxvY2tfaXJxcmVzdG9y
ZSgmZHA4MzY0MC0+cnhfbG9jaywgZmxhZ3MpOw0KDQpIZXJlIHdlIHN0aWxsIGhvbGQgcnhfbG9j
ayB3aGlsZSBkdXJpbmcgdGhlIGNhbGxiYWNrLCB3b3VsZG4ndCBpdCBiZQ0KYmVuZWZpY2lhbCB0
byByZWxlYXNlIHRoYXQgZmlyc3Q/DQoNClN0ZWZhbg0K
WARNING: multiple messages have this Message-ID (diff)
From: "Sørensen, Stefan" <Stefan.Sorensen@spectralink.com>
To: "richardcochran@gmail.com" <richardcochran@gmail.com>
Cc: "netdev@vger.kernel.org" <netdev@vger.kernel.org>,
"dan.carpenter@oracle.com" <dan.carpenter@oracle.com>,
"f.fainelli@gmail.com" <f.fainelli@gmail.com>,
"andrew@lunn.ch" <andrew@lunn.ch>,
"kernel-janitors@vger.kernel.org"
<kernel-janitors@vger.kernel.org>
Subject: Re: [PATCH] dp83640: don't recieve time stamps twice
Date: Wed, 19 Apr 2017 11:28:34 +0000 [thread overview]
Message-ID: <1492601312.3108.3.camel@spectralink.com> (raw)
In-Reply-To: <20170419103135.GA1670@localhost.localdomain>
On Wed, 2017-04-19 at 12:31 +0200, Richard Cochran wrote:
> Can we please fix this in another way? There is no need to hold the
> spin lock during the callback into the networking stack. Instead,
> how about the following diff, which also fixes the other call site...
I agree that this is a better way to fix it - I think that this was the
purpose of the patch that got halfway mixed in.
@@ -874,14 +874,15 @@ static void decode_rxts(struct dp83640_private
> *dp83640,
> shhwtstamps = skb_hwtstamps(skb);
> memset(shhwtstamps, 0,
> sizeof(*shhwtstamps));
> shhwtstamps->hwtstamp = ns_to_ktime(rxts-
> >ns);
> - netif_rx_ni(skb);
> list_add(&rxts->list, &dp83640->rxpool);
> break;
> }
> }
> spin_unlock(&dp83640->rx_queue.lock);
>
> - if (!shhwtstamps)
> + if (shhwtstamps)
> + netif_rx_ni(skb);
> + else
> list_add_tail(&rxts->list, &dp83640->rxts);
> out:
> spin_unlock_irqrestore(&dp83640->rx_lock, flags);
Here we still hold rx_lock while during the callback, wouldn't it be
beneficial to release that first?
Stefan
next prev parent reply other threads:[~2017-04-19 11:28 UTC|newest]
Thread overview: 18+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-04-18 19:14 [PATCH] dp83640: don't recieve time stamps twice Dan Carpenter
2017-04-18 19:14 ` Dan Carpenter
2017-04-18 20:19 ` Richard Cochran
2017-04-18 20:19 ` Richard Cochran
2017-04-19 9:16 ` Sørensen, Stefan
2017-04-19 9:16 ` Sørensen, Stefan
2017-04-19 10:31 ` Richard Cochran
2017-04-19 10:31 ` Richard Cochran
2017-04-19 10:53 ` Dan Carpenter
2017-04-19 10:53 ` Dan Carpenter
2017-04-19 11:28 ` Sørensen, Stefan [this message]
2017-04-19 11:28 ` Sørensen, Stefan
2017-04-19 11:54 ` Richard Cochran
2017-04-19 11:54 ` Richard Cochran
2017-04-20 20:02 ` David Miller
2017-04-20 20:02 ` David Miller
2017-04-20 21:30 ` Richard Cochran
2017-04-20 21:30 ` Richard Cochran
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=1492601312.3108.3.camel@spectralink.com \
--to=stefan.sorensen@spectralink.com \
--cc=andrew@lunn.ch \
--cc=dan.carpenter@oracle.com \
--cc=f.fainelli@gmail.com \
--cc=kernel-janitors@vger.kernel.org \
--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.