The issue is that ndb/cs refuses to serve ipv6 only
protocols (such as icmpv6) when it doesnt know we
have ipv6 addresses (link local).
So refreshing here is mandatory when we add/remove
our link-local addresses. As link-local addresses
are not added to ndb, so there is no change,
but ndb/cs still needs to get refreshed.
If rexflag is non-zero, it's used to insert an REX prefix byte in
asmins. That's a while after put4 and put8 take note of the address
of a relocation. So let them be aware that if rexflag is non-zero,
the relocation's address is to be higher.
Reproduction:
The program
int global;
int f(void){return global;}
is compiled to the IR assembly
TEXT f+0(SB),0,$0
MOVL global+0(SB),AX
RET ,
RET ,
GLOBL global+0(SB),$4
END ,
and (using 6l -u) the machine code
8b042508 000000c3
The relocation (see a.out(6)) correctly applies to the 08 00 00 00.
The program
int *global;
int *f(void){return global;}
is compiled to
TEXT f+0(SB),0,$0
MOVQ global+0(SB),AX
RET ,
RET ,
GLOBL global+0(SB),$8
END ,
and the machine code
488b0425 10000000 c3020000 00000000
What's different is the added REX prefix 0x48, but the relocation is
done at the same place in the binary, which now is 25 10 00 00 instead
of the correct 10 00 00 00.
We do not need a QLock per Netfile, just
serializing open/close/write with Netif.QLock
should be sufficient. This avoids the
lock ordering violation in netifclose().
Netfile's are accessed without locking by
ethermux(), so ensure coherence before
setting the pointer. This also ensures:
Netif.f[x] == nil || Netif.f[x]->in != nil.
Netaddr's for multicast are accessed without
locking by activemulti(), so do coherence()
before linking them into the hashtable.
Remove "Lock netlock" for netown() permission
check. This is now all serialized thru
Netif.QLock.
Put waserror() guards for all the Netif
driver callbacks and wifi qwrite().
keep track of changes by calculating a hash in putndb() and only
update /net/ndb when something changed. use this to also only call refresh()
after changes and to garbage collect stale ipv6 networks after we receive
router advertisements.
when the interface is bypassed, use a fixed large
receive queue (1MB) and ignore speed/link state
changes.
also, zap the mac table when the link state changes.
when the interface is bypassed, stop trying to
associate/authenticate to the access point.
just scan and collect beacon statistics.
my asus access point sends spoofed ethernet
frames otherwise on the lan, breaking
ethermultilink.
Some ethernet drivers implemented their own buffer pools
using Block.free() callbacks.
Usually, these implementations have the defect that the
driver only allocates a fixed number of buffers total.
This upper bound is impossible to predict (depends
on protocol queue limits).
Also, allocation is not space efficient when large
alignments are needed.
This change removes the Block.free() callback and
replaces it with a common buffer pool implementation:
A Bpool struct, containing the block size and
alignment needed for the blocks. Block.pool
is non-nil when the block is from a pool.
growbp(Bpool*,int) supplies new blocks to a pool.
Allocation is done such that the data area and
Block headers are in separate allocations.
All the blocks share the same allocation for
data avoiding waste as not every block needs
to add alignment slack individually.
Block *iallocbp(Bpool*) allocates a block,
growing the pool if neccessary.
freeb(): returns the block back to the pool.
We also tweak the input queue sizes for devether,
making it twice as large as the transmit queue.
when we imported gefs, we put the manpages in the right
place, and moved the paper to /sys/doc; we don't need
the rules to build and install them any more
We used to reject media info if FD was not specified
in plan9.ini. Instead, initialize fd override to -1
which makes us use it if the infoblock tells us to
and provide a "HD" option to force half-duplex mode.
This makes the media detection work on hyper-v.
When the link-speed changes, we want to adjust not
only the output queue limit (done by some drivers)
but also the input queue limit per netif file.
Now, instead of setting Ether->mbps directly,
drivers should call ethersetspeed(ether, mbps).
Kprof rounded the pc to 8 byte boundaries in order to save memory.
With x86 instruction rounding this can lead to some pretty misleading
results.
With the old rounding kpdata was ~680kb for a pc64 kernel, with this
change we use ~5.4M (8x) and considering we only allocate when we
first attach this seems reasonable.
We used to rely on there being a draw(3) there in order to render the
characters in to, this resulted in flashing the rio window white and
made some documents only buildable under a terminal environment. This
fixes both of those issues.
Subfonts for non ascii characters are offset by some minimum rune,
typically specified within the parent font file. Because libmemdraw
only deals in subfonts, if we want to have it draw non ascii runes we
need some method of providing that base offset.
This function is only used in one place, so update the function
signature and fix the only caller.
cgnarne experienced issues with his xbox controller when
connected to uhci root-port.
doing some experiments, we determined that the delay
between clearing reset and setting enable needed to
be between 5µs and 2.7ms for it to attach successfully.
this timing is close to the 3ms idle time that makes
devices enter suspend mode, so we concluded that the
delay here must be shortend (50ms -> 2ms).