Page Menu
Home
FreeBSD
Search
Configure Global Search
Log In
Files
F133023972
D36868.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Flag For Later
Award Token
Size
602 B
Referenced Files
None
Subscribers
None
D36868.diff
View Options
diff --git a/sys/net/bpf.c b/sys/net/bpf.c
--- a/sys/net/bpf.c
+++ b/sys/net/bpf.c
@@ -2265,6 +2265,7 @@
static int
bpf_gettime(struct bintime *bt, int tstype, struct mbuf *m)
{
+ struct timespec ts;
struct m_tag *tag;
int quality;
@@ -2273,6 +2274,11 @@
return (quality);
if (m != NULL) {
+ if ((m->m_flags & (M_PKTHDR | M_TSTMP)) == (M_PKTHDR | M_TSTMP)) {
+ mbuf_tstmp2timespec(m, &ts);
+ timespec2bintime(&ts, bt);
+ return (BPF_TSTAMP_EXTERN);
+ }
tag = m_tag_locate(m, MTAG_BPF, MTAG_BPF_TIMESTAMP, NULL);
if (tag != NULL) {
*bt = *(struct bintime *)(tag + 1);
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Thu, Oct 23, 4:22 AM (1 h, 2 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
24037852
Default Alt Text
D36868.diff (602 B)
Attached To
Mode
D36868: bpf: obtain timestamps from controller via pkthdr if available
Attached
Detach File
Event Timeline
Log In to Comment