func LcoresWorker() []uint {
	return getLcores(1)
}
LcoresWorker returns all worker lcores registered in EAL.
Lcore is worker if it is not main.
package eal
import "C"
const (
	PmdPath = C.RTE_EAL_PMD_PATH
)
func StopLcores() {
	lcores := Lcores()
	ch := make(chan error, len(lcores))
	for _, id := range lcores {
		ExecOnLcoreAsync(id, ch, func(ctx *LcoreCtx) {
			ctx.done = true
		})
	}
	for range lcores {
		<-ch
	}
}
func ExecOnLcoreAsync(lcoreID uint, ret chan error, fn func(*LcoreCtx)) <-chan error {
	if ctx, ok := goEAL.lcores[lcoreID]; ok {
		ctx.ch <- &lcoreJob{fn, ret}
	} else if ret != nil {
		ret <- ErrLcoreInvalid
	}
	return ret
}
func ExecOnLcore(lcoreID uint, fn func(*LcoreCtx)) error {
	return <-ExecOnLcoreAsync(lcoreID, make(chan error, 1), fn)
}
func ExecOnMainAsync(ret chan error, fn func(*LcoreCtx)) <-chan error {
	return ExecOnLcoreAsync(GetMainLcore(), ret, fn)
}
func ExecOnMain(fn func(*LcoreCtx)) error {
	return ExecOnLcore(GetMainLcore(), fn)
}
type lcoresIter struct {
	i  C.uint
	sm C.int
}
func (iter *lcoresIter) next() bool {
	iter.i = C.rte_get_next_lcore(iter.i, iter.sm, 0)
	return iter.i < C.RTE_MAX_LCORE
}
func getLcores(skipMain int) (out []uint) {
	c := &lcoresIter{i: ^C.uint(0), sm: C.int(skipMain)}
	for c.next() {
		out = append(out, uint(c.i))
	}
	return out
}
func Lcores() []uint {
	return getLcores(0)
}