From f9d846d9cdcfbc17689fed9167dc56c2bc9a57fa Mon Sep 17 00:00:00 2001 From: Adam Wujek <dev_public@wujek.eu> Date: Tue, 23 Apr 2024 00:32:21 +0200 Subject: [PATCH] snmpd/snmp_shmem: reduce timeout Give up after 100x100=10s. Signed-off-by: Adam Wujek <dev_public@wujek.eu> --- userspace/snmpd/snmp_shmem.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/userspace/snmpd/snmp_shmem.c b/userspace/snmpd/snmp_shmem.c index a16596011..a4bc17976 100644 --- a/userspace/snmpd/snmp_shmem.c +++ b/userspace/snmpd/snmp_shmem.c @@ -282,7 +282,7 @@ int shmem_rtu_read_vlans(struct rtu_vlan_table_entry *vlan_tab_local) return -1; if (!wrs_shm_seqretry(rtud_head, ii)) break; /* consistent read */ - usleep(1000); + usleep(100); } return 0; @@ -315,7 +315,7 @@ int shmem_rtu_read_htab(struct rtu_filtering_entry *rtu_htab_local, int *read_en return -1; if (!wrs_shm_seqretry(rtud_head, ii)) break; /* consistent read */ - usleep(1000); + usleep(100); } /* Convert hash table to ordered table. Table will be qsorted later, @@ -362,7 +362,7 @@ int shmem_rtu_read_ports(struct rtu_port_entry *ports_tab_local, int *nports) } if (!wrs_shm_seqretry(rtud_head, ii)) break; /* consistent read */ - usleep(1000); + usleep(100); } return 0; } -- GitLab