Code Monkey home page Code Monkey logo

go-dpdk's Issues

when build in arm64,there was an error will be promted, as the below

env:

Linux localhost.localdomain 5.10.0-182.0.0.95.oe2203sp3.aarch64 #1 SMP Sat Dec 30 13:16:24 CST 2023 aarch64 aarch64 aarch64 GNU/Linux

COLLECT_GCC=gcc
COLLECT_LTO_WRAPPER=/usr/libexec/gcc/aarch64-linux-gnu/10.3.1/lto-wrapper
Target:aarch64-linux-gnu

build the test-sniffer demo,the error as below:
go-dpdk/mempool/mbuf.go:39:8: could not determine kind of name for C.free
if change the stdint.h to stdlib.h,then it passed, any other way to bypass it?

pid.RxBurst always return 0

after I use pid.RxBurst so many times, it always return 0,so I can't get any packet
`func delivery(pq test.PortQueue) func(*eal.LcoreCtx) {
return func(ctx *eal.LcoreCtx) {
pid := pq.Pid
qid := pq.Qid

	uid := uuid.New().String()[:10]
	mp, err := mempool.CreateMbufPool(uid, 10000, 15000, mempool.OptSocket(int(eal.SocketID())),
		mempool.OptCacheSize(512),
		mempool.OptPrivateDataSize(512))
	if err != nil {
		log.Fatalln("here", err)
	}
	defer mp.Free()

	var mbufs = make([]*mbuf.Mbuf, 5000)
	if err = mbuf.PktMbufAllocBulk(mp, mbufs); err != nil {
		panic(err)
	}

	count := 0
	log.Printf("delivery processing pid=%d, qid=%d, lcore=%d\n", pid, qid, eal.LcoreID())
	for {
		n := pid.RxBurst(qid, mbufs)
		for i := 0; i < int(n); i++ {
			if mbufs[i] != nil {
				data := mbufs[i].Data()
				mbufs[i].PktMbufFree()
				mbufs[i].PktMbufReset()
				atomic.AddUint64(&netflow.Rate.MessageCount, 1)
				atomic.AddUint64(&netflow.Rate.MessageByteRate, uint64(len(data)))
				if len(data) > 42 {
					num := count % 4
					if num == 3 {
						num = 2
					}
					test.DelkiveryChan[num] <- data
					count++
				}
			}
		}
	}
}

}`

sth is wrong

hello, Sir:
After dpdk was installed, the examples app helloworld run well.
then build helloworld,get such an error,what should I do?

[root@localhost helloworld]# go build main.go

github.com/yerden/go-dpdk/eal

../../eal/eal.go:141:9: could not determine kind of name for C.free

After added "#include <stdlib.h>" to the eal.go, It passed. Has any other way to avoid modifying the code?

btw:Does it support dpdk 22.11

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.