Commit 225b2f27 authored by Alessandro Rubini's avatar Alessandro Rubini

pp-instance: remove "netpath" substructure

This "netpath" is a pain, completely needless. The NP(ppi)
is overhead in the code and must be removed. It is now turned to
an identity function, so external patches won't conflict.
Signed-off-by: Alessandro Rubini's avatarAlessandro Rubini <rubini@gnudd.com>
parent 237af5c4
......@@ -102,24 +102,12 @@ struct pp_servo {
struct pp_avg_fltr mpd_fltr;
};
/*
* Net Path. Struct which contains the network configuration parameters and
* the event/general channels (sockets on most platforms, see above)
*/
enum {
enum { /* The two sockets. They are called "net path" for historical reasons */
PP_NP_GEN = 0,
PP_NP_EVT,
__NR_PP_NP,
};
struct pp_net_path {
struct pp_channel ch[__NR_PP_NP]; /* general and event ch */
Integer32 mcast_addr; /* FIXME: only ipv4/udp */
int ptp_offset;
};
/*
* Struct containg the result of ppsi.conf parsing: one for each link
* (see lib/conf.c). Actually, protocol and role are in the main ppi.
......@@ -159,7 +147,9 @@ struct pp_instance {
void *tx_frame, *rx_frame, *tx_ptp, *rx_ptp;
/* The net_path used to be allocated separately, but there's no need */
struct pp_net_path np;
struct pp_channel ch[__NR_PP_NP]; /* general and event ch */
Integer32 mcast_addr; /* FIXME: only ipv4/udp */
int ptp_offset;
/* Times, for the various offset computations */
TimeInternal t1, t2, t3, t4; /* *the* stamps */
......
......@@ -88,9 +88,10 @@ static inline struct DSTimeProperties *DSPRO(struct pp_instance *ppi)
return GLBS(ppi)->timePropertiesDS;
}
static inline struct pp_net_path *NP(struct pp_instance *ppi)
/* We used to have a "netpath" structure. Keep this until we merge pdelay */
static inline struct pp_instance *NP(struct pp_instance *ppi)
{
return &ppi->np;
return ppi;
}
static inline struct pp_servo *SRV(struct pp_instance *ppi)
......
......@@ -12,7 +12,7 @@
#include <ppsi/lib.h>
#include "wr-constants.h"
#define WRS_PPSI_SHMEM_VERSION 7 /* added vlans */
#define WRS_PPSI_SHMEM_VERSION 8 /* removed netpath in ppsi */
/*
* 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