Code Monkey home page Code Monkey logo

Comments (2)

malebeau avatar malebeau commented on August 21, 2024 1

@sknat As discussed last week at Calicocon, I tried with 24.02 VPP release without more luck. Same behaviour.

from govpp.

sknat avatar sknat commented on August 21, 2024

Hi @surfmax
This is probably due to the way the ping operates in VPP,
It was worth trying over the binary API as well (snippet below), but the problem seems to persist.
As this is most probably a VPP issue, can you try reporting it to [email protected] ?

func doPing(conn api.Connection) {
	sub, err := conn.WatchEvent(context.Background(), (*ping.PingFinishedEvent)(nil))
	if err != nil {
		log.Fatalln("ERROR:", err)
	}
	var wg sync.WaitGroup
	wg.Add(1)


	go func() {
		fmt.Println("waiting for events")
		defer fmt.Println("done waiting for events")

		for notif := range sub.Events() {
			e, ok := notif.(*ping.PingFinishedEvent)
			if !ok {
				fmt.Printf("invalid notification type: %#v\n", e)
				continue
			}
			fmt.Printf("Ping %+v\n", e)
			wg.Done()
		}
	}()

	c := ping.NewServiceClient(conn)

	reply, err := c.WantPingFinishedEvents(context.Background(), &ping.WantPingFinishedEvents{
		Address: ip_types.NewAddress(net.ParseIP("20.0.0.2")),
		Repeat: 10,
		Interval: 1.0,
	})
	if err != nil {
		log.Fatalln("ERROR:", err)
	}
	fmt.Printf("ping ok: %+v\n", reply)
	wg.Wait()
}

from govpp.

Related Issues (20)

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.