Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in
Toggle navigation
P
PPSi
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
50
Issues
50
List
Board
Labels
Milestones
Merge Requests
1
Merge Requests
1
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
PPSi
Commits
d755255f
Commit
d755255f
authored
Jan 25, 2017
by
Adam Wujek
💬
Committed by
Alessandro Rubini
Jan 31, 2017
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
exclude some code when p2p is not compiled
Saves ~150 bytes Signed-off-by:
Adam Wujek
<
adam.wujek@cern.ch
>
parent
28fe78eb
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
6 additions
and
1 deletion
+6
-1
wrc_ptp_ppsi.c
arch-wrpc/wrc_ptp_ppsi.c
+3
-0
conf.c
lib/conf.c
+2
-0
wrpc-socket.c
time-wrpc/wrpc-socket.c
+1
-1
No files found.
arch-wrpc/wrc_ptp_ppsi.c
View file @
d755255f
...
@@ -194,6 +194,9 @@ int wrc_ptp_sync_mech(int e2e_p2p_qry)
...
@@ -194,6 +194,9 @@ int wrc_ptp_sync_mech(int e2e_p2p_qry)
struct
pp_instance
*
ppi
=
&
ppi_static
;
struct
pp_instance
*
ppi
=
&
ppi_static
;
int
running
;
int
running
;
if
(
!
CONFIG_HAS_P2P
)
return
ppi
->
mech
;
switch
(
e2e_p2p_qry
)
{
switch
(
e2e_p2p_qry
)
{
case
PP_E2E_MECH
:
case
PP_E2E_MECH
:
case
PP_P2P_MECH
:
case
PP_P2P_MECH
:
...
...
lib/conf.c
View file @
d755255f
...
@@ -221,9 +221,11 @@ static struct pp_argname arg_mech[] = {
...
@@ -221,9 +221,11 @@ static struct pp_argname arg_mech[] = {
{
"request-response"
,
PP_E2E_MECH
},
{
"request-response"
,
PP_E2E_MECH
},
{
"delay"
,
PP_E2E_MECH
},
{
"delay"
,
PP_E2E_MECH
},
{
"e2e"
,
PP_E2E_MECH
},
{
"e2e"
,
PP_E2E_MECH
},
#ifdef CONFIG_P2P
{
"peer-delay"
,
PP_P2P_MECH
},
{
"peer-delay"
,
PP_P2P_MECH
},
{
"pdelay"
,
PP_P2P_MECH
},
{
"pdelay"
,
PP_P2P_MECH
},
{
"p2p"
,
PP_P2P_MECH
},
{
"p2p"
,
PP_P2P_MECH
},
#endif
{},
{},
};
};
...
...
time-wrpc/wrpc-socket.c
View file @
d755255f
...
@@ -29,7 +29,7 @@ static int wrpc_open_ch(struct pp_instance *ppi)
...
@@ -29,7 +29,7 @@ static int wrpc_open_ch(struct pp_instance *ppi)
struct
wr_sockaddr
addr
;
struct
wr_sockaddr
addr
;
char
*
macaddr
=
PP_MCAST_MACADDRESS
;
char
*
macaddr
=
PP_MCAST_MACADDRESS
;
if
(
ppi
->
mech
==
PP_P2P_MECH
)
if
(
CONFIG_HAS_P2P
&&
ppi
->
mech
==
PP_P2P_MECH
)
macaddr
=
PP_PDELAY_MACADDRESS
;
macaddr
=
PP_PDELAY_MACADDRESS
;
addr
.
ethertype
=
htons
(
ETH_P_1588
);
addr
.
ethertype
=
htons
(
ETH_P_1588
);
memcpy
(
addr
.
mac
,
macaddr
,
sizeof
(
mac_addr_t
));
memcpy
(
addr
.
mac
,
macaddr
,
sizeof
(
mac_addr_t
));
...
...
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