aboutsummaryrefslogtreecommitdiffstats
path: root/sysgen
diff options
context:
space:
mode:
authorDmitry Vyukov <dvyukov@google.com>2016-12-06 20:09:17 +0100
committerDmitry Vyukov <dvyukov@google.com>2016-12-06 20:09:17 +0100
commit99b473cb4b8aba49fc6258fbfb4ce029f4d60fe3 (patch)
tree103ec95113b629e3fdffa587595a197030aa648f /sysgen
parentad8354e9bd5b0e81ec74c9d52516476bdc448f2b (diff)
executor: use different address for our network card
IP addresses like 192.168.0.1/192.168.1.1 are often used for routing between VM and the host. Offset our IP addresses to start from 192.168.218.0 to reduce potential conflicts.
Diffstat (limited to 'sysgen')
-rw-r--r--sysgen/sysgen.go3
1 files changed, 2 insertions, 1 deletions
diff --git a/sysgen/sysgen.go b/sysgen/sysgen.go
index b0b5f6f52..5bda2ed2b 100644
--- a/sysgen/sysgen.go
+++ b/sysgen/sysgen.go
@@ -561,7 +561,8 @@ func generateArg(
if valuesStartInt >= (1 << (size * 8)) {
failf("values starting from '%v' overflow desired type of size '%v'", valuesStartInt, size)
}
- if valuesStartInt+32*valuesPerProcInt >= (1 << (size * 8)) {
+ const maxPids = 32 // executor knows about this constant (MAX_PIDS)
+ if valuesStartInt+maxPids*valuesPerProcInt >= (1 << (size * 8)) {
failf("not enough values starting from '%v' with step '%v' and type size '%v' for 32 procs", valuesStartInt, valuesPerProcInt, size)
}
fmt.Fprintf(out, "&ProcType{%v, TypeSize: %v, BigEndian: %v, ValuesStart: %v, ValuesPerProc: %v}", common(), size, bigEndian, valuesStartInt, valuesPerProcInt)