[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[lwip-devel] [patch #5785] Integrate SNMP initialization in tcpip.c
From: |
Frédéric Bernon |
Subject: |
[lwip-devel] [patch #5785] Integrate SNMP initialization in tcpip.c |
Date: |
Sun, 11 Mar 2007 17:51:13 +0000 |
User-agent: |
Mozilla/5.0 (Windows; U; Windows NT 5.1; fr; rv:1.8.1.2) Gecko/20070219 Firefox/2.0.0.2 |
Follow-up Comment #7, patch #5785 (project lwip):
To reduce timer overhead for snmp_get_sysuptime, I propose to write something
like that :
in snmp.h :
#if (sys_get_tickcount==0)
void snmp_get_sysuptime(u32_t *value);
#else
#define snmp_get_sysuptime(t) sys_get_tickcount(t)
#endif /* (sys_get_tickcount==0) */
in mib2.c :
#if (sys_get_tickcount==0)
/**
* Must be called at regular 10 msec interval from a timer interrupt
* or signal handler depending on your runtime environment.
*/
void snmp_inc_sysuptime(void)
{
sysuptime++;
}
void snmp_get_sysuptime(u32_t *value)
{
*value = sysuptime;
}
#endif /* (sys_get_tickcount==0) */
// There is also a little patch to do in system_get_value to use the function
and not directly sysuptime variable/
in opt.h :
#ifndef sys_get_tickcount
#define sys_get_tickcount 0
#endif
So, if we already get a target "tickcount", we can write in lwipopts.h :
#define sys_get_tickcount(t) sys_arch_get_tickcount(t)
It would be better (no overhead, only call when SNMP are process, and more
accurate, because not based on sys_timeout).
Your comments?
_______________________________________________________
Reply to this item at:
<http://savannah.nongnu.org/patch/?5785>
_______________________________________________
Message posté via/par Savannah
http://savannah.nongnu.org/
- [lwip-devel] [patch #5785] Integrate SNMP initialization in tcpip.c, Frédéric Bernon, 2007/03/06
- [lwip-devel] [patch #5785] Integrate SNMP initialization in tcpip.c, Simon Goldschmidt, 2007/03/07
- [lwip-devel] [patch #5785] Integrate SNMP initialization in tcpip.c, Frédéric Bernon, 2007/03/07
- [lwip-devel] [patch #5785] Integrate SNMP initialization in tcpip.c, Kieran Mansley, 2007/03/07
- [lwip-devel] [patch #5785] Integrate SNMP initialization in tcpip.c, Frédéric Bernon, 2007/03/07
- [lwip-devel] [patch #5785] Integrate SNMP initialization in tcpip.c, Kieran Mansley, 2007/03/07
- [lwip-devel] [patch #5785] Integrate SNMP initialization in tcpip.c, Frédéric Bernon, 2007/03/07
- [lwip-devel] [patch #5785] Integrate SNMP initialization in tcpip.c,
Frédéric Bernon <=
- [lwip-devel] [patch #5785] Integrate SNMP initialization in tcpip.c, Simon Goldschmidt, 2007/03/11
- [lwip-devel] [patch #5785] Integrate SNMP initialization in tcpip.c, Frédéric Bernon, 2007/03/11
- [lwip-devel] [patch #5785] Integrate SNMP initialization in tcpip.c, Simon Goldschmidt, 2007/03/11
- [lwip-devel] [patch #5785] Integrate SNMP initialization in tcpip.c, Frédéric Bernon, 2007/03/11
- [lwip-devel] [patch #5785] Integrate SNMP initialization in tcpip.c, Dmitry Potapov, 2007/03/11
- [lwip-devel] [patch #5785] Integrate SNMP initialization in tcpip.c, Frédéric Bernon, 2007/03/12
- [lwip-devel] [patch #5785] Integrate SNMP initialization in tcpip.c, Simon Goldschmidt, 2007/03/12
- [lwip-devel] [patch #5785] Integrate SNMP initialization in tcpip.c, Kieran Mansley, 2007/03/12
- [lwip-devel] [patch #5785] Integrate SNMP initialization in tcpip.c, Dmitry Potapov, 2007/03/12
- [lwip-devel] [patch #5785] Integrate SNMP initialization in tcpip.c, Frédéric Bernon, 2007/03/12