Commit 314d8605 authored by Alessandro Rubini's avatar Alessandro Rubini

pp-instance: include the VLAN list

Signed-off-by: Alessandro Rubini's avatarAlessandro Rubini <rubini@gnudd.com>
parent 09fe3233
......@@ -106,6 +106,7 @@ int main(int argc, char **argv)
for (i = 0; i < ppg->max_links; i++) {
ppi = INST(ppg, i);
ppi->glbs = ppg; // must be done before using sim_set_global_DS
ppi->vlans_array_len = CONFIG_VLAN_ARRAY_SIZE;
if (sim_ppi_init(ppi, i))
return -1;
}
......
......@@ -88,6 +88,7 @@ int main(int argc, char **argv)
NP(ppi)->ch[PP_NP_GEN].fd = -1;
ppi->glbs = ppg;
ppi->vlans_array_len = CONFIG_VLAN_ARRAY_SIZE,
ppi->iface_name = ppi->cfg.iface_name;
ppi->port_name = ppi->cfg.port_name;
......
......@@ -78,6 +78,7 @@ struct pp_instance ppi_static = {
.portDS = &portDS,
.n_ops = &wrpc_net_ops,
.t_ops = &wrpc_time_ops,
.vlans_array_len = CONFIG_VLAN_ARRAY_SIZE,
.proto = PP_DEFAULT_PROTO,
.iface_name = "wr1",
.port_name = "wr1",
......
......@@ -203,6 +203,7 @@ int main(int argc, char **argv)
NP(ppi)->ch[PP_NP_GEN].fd = -1;
ppi->glbs = ppg;
ppi->vlans_array_len = CONFIG_VLAN_ARRAY_SIZE;
ppi->iface_name = ppi->cfg.iface_name;
ppi->port_name = ppi->cfg.port_name;
ppi->portDS = calloc(1, sizeof(*ppi->portDS));
......
......@@ -185,7 +185,9 @@ struct pp_instance {
char *iface_name; /* for direct actions on hardware */
char *port_name; /* for diagnostics, mainly */
int port_idx;
int vlans_array_len; /* those looking at shared mem must check */
int vlans[CONFIG_VLAN_ARRAY_SIZE];
int nvlans; /* according to configuration */
struct pp_instance_cfg cfg;
unsigned long ptp_tx_count;
......
......@@ -41,6 +41,7 @@ static struct pp_instance ppi_static = {
.t_ops = &bare_time_ops,
.iface_name = "eth0",
.port_name = "eth0",
.vlans_array_len = CONFIG_VLAN_ARRAY_SIZE,
.proto = PP_DEFAULT_PROTO,
.__tx_buffer = __tx_buffer,
.__rx_buffer = __rx_buffer,
......
......@@ -12,9 +12,7 @@
#include <ppsi/lib.h>
#include "wr-constants.h"
#define WRS_PPSI_SHMEM_VERSION 6 /* added fields n_err_state, n_err_offset,
* n_err_rtt, n_err_deltas to
* wr_servo_state_t */
#define WRS_PPSI_SHMEM_VERSION 7 /* added vlans */
/*
* This structure is used as extension-specific data in the DSPort
......
Markdown is supported
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