Skip to content
Snippets Groups Projects
Commit 377ac203 authored by Alessandro Rubini's avatar Alessandro Rubini Committed by Adam Wujek
Browse files

ppsi: use new master, with vlans, Also, pick related changes for shmem


Signed-off-by: default avatarAlessandro Rubini <rubini@gnudd.com>
parent d710ba3c
Branches
Tags
No related merge requests found
ppsi @ 78b2d08c
Subproject commit b8ebe5fee29e094175bb7d349483fdc651de146e Subproject commit 78b2d08c4d744358567aedb55c0f3cf9ef735b19
...@@ -6,6 +6,7 @@ TOOLS += sdb-read ...@@ -6,6 +6,7 @@ TOOLS += sdb-read
TOOLS += nbtee TOOLS += nbtee
TOOLS += wrs_auxclk TOOLS += wrs_auxclk
TOOLS += wrs_checkcfg TOOLS += wrs_checkcfg
PPSI_CONFIG = ../ppsi/include/generated/autoconf.h
WR_INSTALL_ROOT ?= /usr/lib/white-rabbit WR_INSTALL_ROOT ?= /usr/lib/white-rabbit
...@@ -30,6 +31,7 @@ CFLAGS = -O2 -g -Wall \ ...@@ -30,6 +31,7 @@ CFLAGS = -O2 -g -Wall \
-I../libsdb \ -I../libsdb \
-I../include \ -I../include \
-I../libwr/include \ -I../libwr/include \
-include $(PPSI_CONFIG) \
-I../ppsi/include \ -I../ppsi/include \
-I../ppsi/arch-wrs/include -I../ppsi/arch-wrs/include
...@@ -43,7 +45,16 @@ LDFLAGS = -L../mini-rpc \ ...@@ -43,7 +45,16 @@ LDFLAGS = -L../mini-rpc \
-L../libsdb \ -L../libsdb \
-lwr -lminipc -lsdbfs -lm -ldl -lwr -lminipc -lsdbfs -lm -ldl
all: $(TOOLS) all:
all: check $(TOOLS)
check:
@if [ ! -f $(PPSI_CONFIG) ]; then echo ""; echo ""; \
echo "##### Please configure ppsi before building tools"; \
echo ""; echo ""; \
exit 1; \
fi
%: %.c %: %.c
$(CC) $(CFLAGS) $*.c $(LDFLAGS) -o $* $(CC) $(CFLAGS) $*.c $(LDFLAGS) -o $*
...@@ -63,3 +74,4 @@ clean: ...@@ -63,3 +74,4 @@ clean:
install: all install: all
install -d $(WR_INSTALL_ROOT)/bin install -d $(WR_INSTALL_ROOT)/bin
install $(TOOLS) $(WR_INSTALL_ROOT)/bin install $(TOOLS) $(WR_INSTALL_ROOT)/bin
...@@ -41,6 +41,7 @@ enum dump_type { ...@@ -41,6 +41,7 @@ enum dump_type {
dump_type_bina, /* for binary stull in MAC format */ dump_type_bina, /* for binary stull in MAC format */
/* normal types follow */ /* normal types follow */
dump_type_uint32_t, dump_type_uint32_t,
dump_type_uint16_t,
dump_type_int, dump_type_int,
dump_type_unsigned_long, dump_type_unsigned_long,
dump_type_unsigned_char, dump_type_unsigned_char,
...@@ -128,6 +129,7 @@ void dump_one_field(void *addr, struct dump_info *info) ...@@ -128,6 +129,7 @@ void dump_one_field(void *addr, struct dump_info *info)
printf("%i\n", *(unsigned char *)p); printf("%i\n", *(unsigned char *)p);
break; break;
case dump_type_UInteger16: case dump_type_UInteger16:
case dump_type_uint16_t:
case dump_type_unsigned_short: case dump_type_unsigned_short:
printf("%i\n", *(unsigned short *)p); printf("%i\n", *(unsigned short *)p);
break; break;
...@@ -530,23 +532,23 @@ struct dump_info ppi_info [] = { ...@@ -530,23 +532,23 @@ struct dump_info ppi_info [] = {
DUMP_FIELD(pointer, tx_ptp), DUMP_FIELD(pointer, tx_ptp),
DUMP_FIELD(pointer, rx_ptp), DUMP_FIELD(pointer, rx_ptp),
/* This is a sub-structure with a ch sub-sub-structure */ /* This is a sub-structure */
DUMP_FIELD(int, np.ch[0].fd), DUMP_FIELD(int, ch[0].fd),
DUMP_FIELD(pointer, np.ch[0].custom), DUMP_FIELD(pointer, ch[0].custom),
DUMP_FIELD(pointer, np.ch[0].arch_data), DUMP_FIELD(pointer, ch[0].arch_data),
DUMP_FIELD_SIZE(bina, np.ch[0].addr, 6), DUMP_FIELD_SIZE(bina, ch[0].addr, 6),
DUMP_FIELD_SIZE(bina, np.ch[0].peer, 6), DUMP_FIELD(int, ch[0].pkt_present),
DUMP_FIELD(int, np.ch[0].pkt_present), DUMP_FIELD(int, ch[1].fd),
DUMP_FIELD(pointer, ch[1].custom),
DUMP_FIELD(int, np.ch[1].fd), DUMP_FIELD(pointer, ch[1].arch_data),
DUMP_FIELD(pointer, np.ch[1].custom), DUMP_FIELD_SIZE(bina, ch[1].addr, 6),
DUMP_FIELD(pointer, np.ch[1].arch_data), DUMP_FIELD(int, ch[1].pkt_present),
DUMP_FIELD_SIZE(bina, np.ch[1].addr, 6),
DUMP_FIELD_SIZE(bina, np.ch[1].peer, 6), DUMP_FIELD(ip_address, mcast_addr),
DUMP_FIELD(int, np.ch[1].pkt_present), DUMP_FIELD(int, tx_offset),
DUMP_FIELD(int, rx_offset),
DUMP_FIELD(ip_address, np.mcast_addr), DUMP_FIELD_SIZE(bina, peer, 6),
DUMP_FIELD(int, np.ptp_offset), DUMP_FIELD(uint16_t, peer_vid),
DUMP_FIELD(TimeInternal, t1), DUMP_FIELD(TimeInternal, t1),
DUMP_FIELD(TimeInternal, t2), DUMP_FIELD(TimeInternal, t2),
...@@ -567,12 +569,18 @@ struct dump_info ppi_info [] = { ...@@ -567,12 +569,18 @@ struct dump_info ppi_info [] = {
//DUMP_FIELD(pointer, iface_name), //DUMP_FIELD(pointer, iface_name),
//DUMP_FIELD(pointer, port_name), //DUMP_FIELD(pointer, port_name),
DUMP_FIELD(int, port_idx), DUMP_FIELD(int, port_idx),
DUMP_FIELD(int, vlans_array_len),
/* FIXME: array */
DUMP_FIELD(int, nvlans),
/* sub structure */ /* sub structure */
DUMP_FIELD_SIZE(char, cfg.port_name, 16), DUMP_FIELD_SIZE(char, cfg.port_name, 16),
DUMP_FIELD_SIZE(char, cfg.iface_name, 16), DUMP_FIELD_SIZE(char, cfg.iface_name, 16),
DUMP_FIELD(int, cfg.ext), DUMP_FIELD(int, cfg.ext),
DUMP_FIELD(UInteger32, ptp_tx_count), DUMP_FIELD(int, cfg.ext),
DUMP_FIELD(UInteger32, ptp_rx_count),
DUMP_FIELD(unsigned_long, ptp_tx_count),
DUMP_FIELD(unsigned_long, ptp_rx_count),
}; };
int dump_ppsi_mem(struct wrs_shm_head *head) int dump_ppsi_mem(struct wrs_shm_head *head)
......
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment