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
47
Issues
47
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
e8b88ab5
Commit
e8b88ab5
authored
Nov 07, 2014
by
Alessandro Rubini
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
general: remove 2 cfg fields, duplicated from ppi
Signed-off-by:
Alessandro Rubini
<
rubini@gnudd.com
>
parent
884bcf0a
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
5 additions
and
15 deletions
+5
-15
sim-startup.c
arch-sim/sim-startup.c
+1
-2
unix-startup.c
arch-unix/unix-startup.c
+0
-5
wrs-startup.c
arch-wrs/wrs-startup.c
+0
-2
pp-instance.h
include/ppsi/pp-instance.h
+1
-3
conf.c
lib/conf.c
+2
-2
hooks.c
proto-ext-whiterabbit/hooks.c
+1
-1
No files found.
arch-sim/sim-startup.c
View file @
e8b88ab5
...
...
@@ -140,12 +140,11 @@ int main(int argc, char **argv)
sim_set_global_DS
(
ppi
);
ppi
->
iface_name
=
ppi
->
cfg
.
iface_name
;
ppi
->
port_name
=
ppi
->
cfg
.
port_name
;
if
(
ppi
->
cfg
.
proto
==
PPSI_PROTO_RAW
)
if
(
ppi
->
proto
==
PPSI_PROTO_RAW
)
pp_printf
(
"Warning: simulator doesn't support raw "
"ethernet. Using UDP
\n
"
);
NP
(
ppi
)
->
ch
[
PP_NP_GEN
].
fd
=
-
1
;
NP
(
ppi
)
->
ch
[
PP_NP_EVT
].
fd
=
-
1
;
ppi
->
role
=
ppi
->
cfg
.
role
;
ppi
->
t_ops
=
&
DEFAULT_TIME_OPS
;
ppi
->
n_ops
=
&
DEFAULT_NET_OPS
;
if
(
pp_sim_is_master
(
ppi
))
...
...
arch-unix/unix-startup.c
View file @
e8b88ab5
...
...
@@ -86,11 +86,6 @@ int main(int argc, char **argv)
ppi
->
glbs
=
ppg
;
ppi
->
iface_name
=
ppi
->
cfg
.
iface_name
;
ppi
->
port_name
=
ppi
->
cfg
.
port_name
;
/* this old-fashioned "ethernet_mode" is a single bit */
ppi
->
proto
=
ppi
->
cfg
.
proto
;
ppi
->
role
=
ppi
->
cfg
.
role
;
/* FIXME set ppi ext enable as defined in its pp_link */
ppi
->
portDS
=
calloc
(
1
,
sizeof
(
*
ppi
->
portDS
));
...
...
arch-wrs/wrs-startup.c
View file @
e8b88ab5
...
...
@@ -155,8 +155,6 @@ int main(int argc, char **argv)
ppi
->
glbs
=
ppg
;
ppi
->
iface_name
=
ppi
->
cfg
.
iface_name
;
ppi
->
port_name
=
ppi
->
cfg
.
port_name
;
ppi
->
proto
=
ppi
->
cfg
.
proto
;
ppi
->
role
=
ppi
->
cfg
.
role
;
ppi
->
portDS
=
calloc
(
1
,
sizeof
(
*
ppi
->
portDS
));
if
(
!
ppi
->
portDS
)
exit
(
__LINE__
);
...
...
include/ppsi/pp-instance.h
View file @
e8b88ab5
...
...
@@ -122,13 +122,11 @@ struct pp_net_path {
/*
* Struct containg the result of ppsi.conf parsing: one for each link
* (see lib/conf.c)
* (see lib/conf.c)
. Actually, protocol and role are in the main ppi.
*/
struct
pp_instance_cfg
{
char
port_name
[
16
];
char
iface_name
[
16
];
int
proto
;
/* 0: raw, 1: udp */
int
role
;
/* 0: auto, 1: master, 2: slave */
int
ext
;
/* 0: none, 1: whiterabbit */
/* FIXME extension enumeration */
};
...
...
lib/conf.c
View file @
e8b88ab5
...
...
@@ -73,14 +73,14 @@ static int f_if(int lineno, struct pp_globals *ppg, union pp_cfg_arg *arg)
static
int
f_proto
(
int
lineno
,
struct
pp_globals
*
ppg
,
union
pp_cfg_arg
*
arg
)
{
CHECK_PPI
(
1
);
CUR_PPI
(
ppg
)
->
cfg
.
proto
=
arg
->
i
;
CUR_PPI
(
ppg
)
->
proto
=
arg
->
i
;
return
0
;
}
static
int
f_role
(
int
lineno
,
struct
pp_globals
*
ppg
,
union
pp_cfg_arg
*
arg
)
{
CHECK_PPI
(
1
);
CUR_PPI
(
ppg
)
->
cfg
.
role
=
arg
->
i
;
CUR_PPI
(
ppg
)
->
role
=
arg
->
i
;
return
0
;
}
...
...
proto-ext-whiterabbit/hooks.c
View file @
e8b88ab5
...
...
@@ -43,7 +43,7 @@ static int wr_open(struct pp_globals *ppg, struct pp_runtime_opts *rt_opts)
INST
(
ppg
,
i
)
->
ext_data
=
&
wr_data
;
if
(
ppi
->
cfg
.
ext
==
PPSI_EXT_WR
)
{
switch
(
ppi
->
cfg
.
role
)
{
switch
(
ppi
->
role
)
{
case
PPSI_ROLE_MASTER
:
WR_DSPOR
(
ppi
)
->
wrConfig
=
WR_M_ONLY
;
break
;
...
...
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