Giter VIP home page Giter VIP logo

Comments (2)

hmaarrfk avatar hmaarrfk commented on July 29, 2024

So I'm not too exactly how to recreate it, but basically you can try to mess with the driver a little bit, by trying to repeatidly add a queue that has already been added

Running

dmactl qdma01000 q add idx 0 dir h2c idx_ringsz 5
dmactl qdma01000 q start idx 0 dir h2c idx_ringsz 5
dmactl qdma01000 q add idx 0 dir h2c idx_ringsz 5
dmactl qdma01000 q start idx 0 dir h2c idx_ringsz 5
dmactl qdma01000 q stop idx 0 dir h2c idx_ringsz 5
dmactl qdma01000 q add idx 0 dir h2c idx_ringsz 5
dmactl qdma01000 q start idx 0 dir h2c idx_ringsz 5
dmactl qdma01000 q stop idx 0 dir h2c idx_ringsz 5
dmactl qdma01000 q del idx 0 dir h2c idx_ringsz 5

A few times you get

[  114.054856] qdma:qdma_queue_add: descq idx 0 already added.
[  114.054859] qdma:xnl_q_add: xpdev_queue_add() failed: -12
[  114.056097] qdma:qdma_queue_reconfig: qdma01000-MM-0 invalid state, q_state 2.
[  114.056099] qdma:xnl_q_start: qdma_queue_reconfig() failed: -8
[  114.058385] qdma:qdma_queue_add: descq idx 0 already added.
[  114.058389] qdma:xnl_q_add: xpdev_queue_add() failed: -12
[  123.732637] qdma:qdma_queue_add: descq idx 0 already added.
[  123.732641] qdma:xnl_q_add: xpdev_queue_add() failed: -12
[  123.734470] qdma:qdma_queue_reconfig: qdma01000-MM-0 invalid state, q_state 2.
[  123.734473] qdma:xnl_q_start: qdma_queue_reconfig() failed: -8
[  123.737047] qdma:qdma_queue_add: descq idx 0 already added.
[  123.737049] qdma:xnl_q_add: xpdev_queue_add() failed: -12
[  131.492421] qdma:qdma_queue_add: descq idx 0 already added.
[  131.492424] qdma:xnl_q_add: xpdev_queue_add() failed: -12
[  131.494234] qdma:qdma_queue_reconfig: qdma01000-MM-0 invalid state, q_state 2.
[  131.494237] qdma:xnl_q_start: qdma_queue_reconfig() failed: -8
[  131.496782] qdma:qdma_queue_add: descq idx 0 already added.
[  131.496785] qdma:xnl_q_add: xpdev_queue_add() failed: -12
[  150.450714] qdma:qdma_queue_add: descq idx 0 already added.
[  150.450716] qdma:xnl_q_add: xpdev_queue_add() failed: -12
[  150.456352] qdma:qdma_queue_reconfig: qdma01000-MM-0 invalid state, q_state 2.
[  150.456353] qdma:xnl_q_start: qdma_queue_reconfig() failed: -8
[  150.463805] qdma:qdma_queue_add: descq idx 0 already added.
[  150.463808] qdma:xnl_q_add: xpdev_queue_add() failed: -12
[  150.469872] qdma:qdma_queue_reconfig: qdma01000-MM-0 invalid state, q_state 2.
[  150.469874] qdma:xnl_q_start: qdma_queue_reconfig() failed: -8
[  150.483322] qdma:qdma_queue_add: descq idx 0 already added.
[  150.483326] qdma:xnl_q_add: xpdev_queue_add() failed: -12

Then dma util will hang

$ sudo ./dmautils -c config/dmautils_config/mm-bi/mm_1_1/bi_mm_1_1_64                                
[sudo] password for mark: 
dmactl qdma01000 q add idx 0 mode mm dir h2c

qdma01000-MM-0 H2C added.
Added 1 Queues.

dmactl qdma01000 q start idx 0 dir h2c idx_ringsz 5

1 Queues started, idx 0 ~ 0.

dmactl qdma01000 q add idx 0 mode mm dir c2h

q idx 0 already added.

dmactl qdma01000 q start idx 0 dir c2h idx_ringsz 5

qdma01000-MM-0 invalid state, q_state 2.

dmautils(16) threads
dmactl qdma01000 q stop idx 0 dir h2c
dmactl qdma01000 q stop idx 0 dir h2c

Stopped Queues 0 -> 0.


queue qdma01000-MM-0, idx 0 stop failed.

qdma01000, 01:00.00, bar#2, reg 0x8 -> 0x240000, read back 0x104.
qdma01000, 01:00.00, bar#2, reg 0x8 -> 0x240000, read back 0x104.

and the following dmesgs have been added to the kernel log

[  156.876911] qdma:qdma_queue_add: descq idx 0 already added.
[  156.876914] qdma:xnl_q_add: xpdev_queue_add() failed: -12
[  156.879239] qdma:qdma_queue_reconfig: qdma01000-MM-0 invalid state, q_state 2.
[  156.879241] qdma:xnl_q_start: qdma_queue_reconfig() failed: -8
[  186.977445] qdma:qdma_queue_stop: qdma01000-MM-0 invalid state, q_state 1.

It seems logical that the kernel logic should tell the user program that it asked for something unreasonable, and keep going with the status quo, instead of putting itself in an invalid state (and hanging the QDMA driver).

from dma_ip_drivers.

sujathabanoth-xlnx avatar sujathabanoth-xlnx commented on July 29, 2024

Issue is addressed in latest driver driver, Hence closing it.

from dma_ip_drivers.

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.