linux-fpga.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* riffa linux driver modification with round-robin scheduling
@ 2018-08-14  4:24 fei phung
  2018-08-14 18:31 ` Moritz Fischer
  0 siblings, 1 reply; 2+ messages in thread
From: fei phung @ 2018-08-14  4:24 UTC (permalink / raw)
  To: linux-fpga, linux-c-programming

For https://paste.ubuntu.com/p/FvgjPns75v/ (modified riffa_driver.c) ,
why am I having the following error: invalid use of undefined type
‘struct sched_param’ ?

I have included
https://github.com/promach/riffa/blob/full_duplex/driver/linux/riffa_driver.c#L55-L59
(sched.h header)

I am trying to make
https://github.com/promach/riffa/blob/full_duplex/driver/linux/riffa_driver.c#L1011-L1027
(this un-modified riffa_driver.c) scheduled with round-robin policy

Note: For the riffa_driver.c, please refer to the ubuntu paste.
Mailing list receivers do not generally favour inline posting of long
code.

>phung@UbuntuHW15:~/Documents/fpga_overlay/riffa/driver/linux$ make clean && make debug
> rm -Rf *.ko *.cmd *.o *.so *.so.* .*.cmd Module.symvers Module.markers modules.order *.mod.c .tmp_versions
> Compiling driver for kernel: 4.17.4-041704-generic with the following values
>      NAME: 'riffa'
>    MAJNUM: '100'
> VENDOR_ID0: '10EE'
> VENDOR_ID1: '1172'
>
> sed -i 's/#define MAJOR_NUM [^\n]*/#define MAJOR_NUM 100/g' riffa_driver.h
> sed -i 's/#define DEVICE_NAME [^\n]*/#define DEVICE_NAME "riffa"/g' riffa_driver.h
> sed -i 's/#define VENDOR_ID0 [^\n]*/#define VENDOR_ID0 0x10EE/g' riffa_driver.h
> sed -i 's/#define VENDOR_ID1 [^\n]*/#define VENDOR_ID1 0x1172/g' riffa_driver.h
> sed -i 's/#define DEBUG [^\n]*/#define DBUG 1/g' riffa_driver.h
> sed -i 's/#define DBUG [^\n]*/#define DEBUG 1/g' riffa_driver.h
> make -C /lib/modules/`uname -r`/build SUBDIRS=`pwd` modules
> make[1]: Entering directory '/usr/src/linux-headers-4.17.4-041704-generic'
>   CC [M]  /home/phung/Documents/fpga_overlay/riffa/driver/linux/riffa_driver.o
> /home/phung/Documents/fpga_overlay/riffa/driver/linux/riffa_driver.c: In function ‘chnl_recv’:
> /home/phung/Documents/fpga_overlay/riffa/driver/linux/riffa_driver.c:601:12: error: invalid use of undefined type ‘struct sched_param’
>   recv_param.sched_priority = 1;
>             ^
> /home/phung/Documents/fpga_overlay/riffa/driver/linux/riffa_driver.c: In function ‘chnl_send’:
> /home/phung/Documents/fpga_overlay/riffa/driver/linux/riffa_driver.c:831:12: error: invalid use of undefined type ‘struct sched_param’
>   send_param.sched_priority = 1;
>             ^
> /home/phung/Documents/fpga_overlay/riffa/driver/linux/riffa_driver.c: At top level:
> /home/phung/Documents/fpga_overlay/riffa/driver/linux/riffa_driver.c:133:27: error: storage size of ‘recv_param’ isn’t known
>  static struct sched_param recv_param;
>                            ^~~~~~~~~~
> /home/phung/Documents/fpga_overlay/riffa/driver/linux/riffa_driver.c:134:27: error: storage size of ‘send_param’ isn’t known
>  static struct sched_param send_param;
>                            ^~~~~~~~~~
> scripts/Makefile.build:312: recipe for target '/home/phung/Documents/fpga_overlay/riffa/driver/linux/riffa_driver.o' failed
> make[2]: *** [/home/phung/Documents/fpga_overlay/riffa/driver/linux/riffa_driver.o] Error 1
> Makefile:1577: recipe for target '_module_/home/phung/Documents/fpga_overlay/riffa/driver/linux' failed
> make[1]: *** [_module_/home/phung/Documents/fpga_overlay/riffa/driver/linux] Error 2
> make[1]: Leaving directory '/usr/src/linux-headers-4.17.4-041704-generic'
> Makefile:94: recipe for target 'riffa.ko' failed
> make: *** [riffa.ko] Error 2
>
> phung@UbuntuHW15:~/Documents/fpga_overlay/riffa/driver/linux$

^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: riffa linux driver modification with round-robin scheduling
  2018-08-14  4:24 riffa linux driver modification with round-robin scheduling fei phung
@ 2018-08-14 18:31 ` Moritz Fischer
  0 siblings, 0 replies; 2+ messages in thread
From: Moritz Fischer @ 2018-08-14 18:31 UTC (permalink / raw)
  To: fei phung; +Cc: linux-fpga, linux-c-programming

Hi Fei,

On Mon, Aug 13, 2018 at 9:24 PM, fei phung <feiphung27@gmail.com> wrote:
> For https://paste.ubuntu.com/p/FvgjPns75v/ (modified riffa_driver.c) ,
> why am I having the following error: invalid use of undefined type
> ‘struct sched_param’ ?
>
> I have included
> https://github.com/promach/riffa/blob/full_duplex/driver/linux/riffa_driver.c#L55-L59
> (sched.h header)

This list is not really associated with the riffa project. I don't think this is the right place 
to discuss issues in out of tree kernel code.

Thanks,

Moritz

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2018-08-14 18:31 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-08-14  4:24 riffa linux driver modification with round-robin scheduling fei phung
2018-08-14 18:31 ` Moritz Fischer

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).