Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in
Toggle navigation
S
Software for White Rabbit PTP Core
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
32
Issues
32
List
Board
Labels
Milestones
Merge Requests
4
Merge Requests
4
CI / CD
CI / CD
Pipelines
Schedules
Wiki
Wiki
image/svg+xml
Discourse
Discourse
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Commits
Issue Boards
Open sidebar
Projects
Software for White Rabbit PTP Core
Commits
f695c5d0
Commit
f695c5d0
authored
Feb 15, 2016
by
Alessandro Rubini
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
net: update_rx_queues returns 1 or 0 too
Signed-off-by:
Alessandro Rubini
<
rubini@gnudd.com
>
parent
b86b45c7
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
6 additions
and
5 deletions
+6
-5
wrc.h
include/wrc.h
+1
-1
net.c
lib/net.c
+5
-4
No files found.
include/wrc.h
View file @
f695c5d0
...
...
@@ -53,7 +53,7 @@ extern int abs(int val);
/* The following from ptp-noposix */
extern
void
wr_servo_reset
(
void
);
void
update_rx_queues
(
void
);
int
update_rx_queues
(
void
);
/* refresh period for _gui_ and _stat_ commands */
extern
int
wrc_ui_refperiod
;
...
...
lib/net.c
View file @
f695c5d0
...
...
@@ -308,7 +308,7 @@ int ptpd_netif_sendto(struct wrpc_socket * sock, struct wr_sockaddr *to, void *d
}
void
update_rx_queues
()
int
update_rx_queues
()
{
struct
wrpc_socket
*
s
=
NULL
;
struct
sockq
*
q
;
...
...
@@ -323,7 +323,7 @@ void update_rx_queues()
&
hwts
);
if
(
recvd
<=
0
)
/* No data received? */
return
;
return
0
;
for
(
i
=
0
;
i
<
ARRAY_SIZE
(
socks
);
i
++
)
{
s
=
socks
[
i
];
...
...
@@ -352,7 +352,7 @@ void update_rx_queues()
if
(
i
==
ARRAY_SIZE
(
socks
))
{
net_verbose
(
"%s: could not find socket for packet
\n
"
,
__FUNCTION__
);
return
;
return
1
;
}
q
=
&
s
->
queue
;
...
...
@@ -363,7 +363,7 @@ void update_rx_queues()
net_verbose
(
"%s: queue for socket full; [avail %d required %d]
\n
"
,
__FUNCTION__
,
q
->
avail
,
q_required
);
return
;
return
1
;
}
size
=
recvd
;
...
...
@@ -383,4 +383,5 @@ void update_rx_queues()
ntohs
(
s
->
bind_addr
.
ethertype
),
s
->
bind_addr
.
udpport
,
q
->
avail
,
q
->
n
,
q_required
);
return
1
;
}
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment