Re: ASH: why ash_ptr_to_globals_misc is declared as const pointer

2018-01-20 Thread Ralf Friedl
Mike Frysinger wrote: the pointer itself is the thing that is const, not the memory it points to. this lets the compiler optimize the loads by generating relocations via the pointer ... there's the fixup at the initial load time, but after that, it's just offsets to a constant memory location.

Re: ASH: why ash_ptr_to_globals_misc is declared as const pointer

2018-01-20 Thread Mike Frysinger
On 20 Jan 2018 12:18, Xabier Oneca -- xOneca wrote: > >> My question is. > >>the ash_ptr_to_globals_misc, ash_ptr_to_globals_memstack > >> and ash_ptr_to_globals_var > >> are defined in ash_ptr_hack.c as normal pointers. But in ash.c, they are > >> declared as const > >> pointers. What is the

Re: [PATCH v2] - Add support for link without MAC (like PPPoE/PPPoA)

2018-01-20 Thread 蔡崴丞
Unfortunately, it doesn't work. I'll get NAK response from my ISP because of client id difference between dhcp6 solicit and dhcp6 request. The random mac address should keep the same across dhcp session. Maybe we can derive pseudo mac address from ipv6 local link address? Denys Vlasenko

Re: ASH: why ash_ptr_to_globals_misc is declared as const pointer

2018-01-20 Thread Xabier Oneca -- xOneca
Hi Mike, >> My question is. >>the ash_ptr_to_globals_misc, ash_ptr_to_globals_memstack >> and ash_ptr_to_globals_var >> are defined in ash_ptr_hack.c as normal pointers. But in ash.c, they are >> declared as const >> pointers. What is the benefit of doing that? > > the pointer itself is the