Skip to content
Snippets Groups Projects
Commit fea1d9ec authored by Michal Wasiak's avatar Michal Wasiak Committed by Adam Wujek
Browse files

RTU: remove *_offset from rtu_shmem


The following were defined, initialized, but never used
--filters_offset
--vlans_offset
--mirror_offset
--rtu_ports_offset

Signed-off-by: default avatarMichal Wasiak <michal.wasiak@gmail.com>
parent 430c8be4
Branches
Tags
No related merge requests found
......@@ -186,17 +186,13 @@ struct rtu_port_entry {
};
/* This is the overall structure stored in shared memory */
#define RTU_SHMEM_VERSION 5 /* Version 5, added rtu_ports */
#define RTU_SHMEM_VERSION 6 /* Version 6, remove *_offset */
struct rtu_shmem_header {
struct rtu_filtering_entry *filters;
struct rtu_vlan_table_entry *vlans;
struct rtu_mirror_info *mirror;
struct rtu_port_entry *rtu_ports;
uint32_t rtu_nports;
unsigned long filters_offset;
unsigned long vlans_offset;
unsigned long mirror_offset;
unsigned long rtu_ports_offset;
};
#endif /* __LIBWR_RTU_SHMEM_H__ */
......@@ -168,8 +168,6 @@ int rtu_fd_init(uint16_t poly, unsigned long aging)
rtu_htab = wrs_shm_alloc(rtu_shmem_p,
sizeof(*rtu_htab) * HTAB_ENTRIES);
rtu_hdr->filters = (struct rtu_filtering_entry *) rtu_htab;
rtu_hdr->filters_offset =
(void *)rtu_htab - (void *)rtu_shmem_p;
pr_debug("Clean filtering database.\n");
clean_fd(SHM_NOT_LOCK); /* clean filtering database,
shem already locked */
......@@ -185,8 +183,6 @@ int rtu_fd_init(uint16_t poly, unsigned long aging)
vlan_tab = wrs_shm_alloc(rtu_shmem_p,
sizeof(*vlan_tab) * NUM_VLANS);
rtu_hdr->vlans = vlan_tab;
rtu_hdr->vlans_offset =
(void *)vlan_tab - (void *)rtu_shmem_p;
pr_debug("Clean vlan database.\n");
clean_vd(SHM_NOT_LOCK); /* clean VLAN database,
shem already locked */
......@@ -202,8 +198,6 @@ int rtu_fd_init(uint16_t poly, unsigned long aging)
mirror_cfg = wrs_shm_alloc(rtu_shmem_p,
sizeof(*mirror_cfg) * NUM_MIRROR);
rtu_hdr->mirror = mirror_cfg;
rtu_hdr->mirror_offset =
(void *)mirror_cfg - (void *)rtu_shmem_p;
pr_debug("Clean vlan database.\n");
clean_mc(SHM_NOT_LOCK); /* clean port mirroring config,
shem already locked */
......@@ -219,8 +213,6 @@ int rtu_fd_init(uint16_t poly, unsigned long aging)
ports_cfg = wrs_shm_alloc(rtu_shmem_p,
sizeof(*ports_cfg) * HAL_MAX_PORTS);
rtu_hdr->rtu_ports = ports_cfg;
rtu_hdr->rtu_ports_offset =
(void *)ports_cfg - (void *)rtu_shmem_p;
pr_debug("Clean ports database.\n");
rtu_hdr->rtu_nports = hal_nports_local;
rtu_clean_ports(SHM_NOT_LOCK); /* clean port ports config,
......
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