Current Server Time: 13:36 (Central Europe)

#apertus IRC Channel Logs

2020/03/17

Timezone: UTC


00:25
HEGAZY
left the channel
00:38
Oscar
left the channel
01:24
intracube
left the channel
01:25
intrac
joined the channel
01:25
intrac
left the channel
01:28
intrac
joined the channel
03:07
namibj
left the channel
03:14
namibj
joined the channel
03:26
Bertl_oO
changed nick to: Bertl_zZ
03:41
intrac
changed nick to: intracube
05:13
rajdeep
joined the channel
07:44
rajdeep
left the channel
09:12
Bertl_zZ
changed nick to: Bertl
09:12
Bertl
morning folks!
09:47
se6ast1an
good day
09:50
intracube
left the channel
09:52
intracube
joined the channel
10:04
intracube
left the channel
10:05
intracube
joined the channel
11:02
BAndiT1983|away
changed nick to: BAndiT1983
11:11
BAndiT1983
changed nick to: BAndiT1983|away
11:32
omar31
joined the channel
11:46
pratyush
joined the channel
11:46
pratyush
left the channel
11:46
pratyush
joined the channel
11:48
pratyush
left the channel
11:50
pratyush
joined the channel
11:51
pratyush
Hi I have completed T884 Task 1
11:54
pratyush
Bertl: The output looks like
11:54
pratyush
root@pratyush-HP-Laptop-15g-dr0xxx:/home/pratyush/Desktop/kc-final/kc# ./chrdev_test chrdevfile chrdev openedwrote 15 bytes into file chrdevdata written are: 50 72 61 74 79 75 73 68 20 48 61 72 73 48 00 file chrdev reopenedread 15 bytes from file chrdevdata read are: 50 72 61 74 79 75 73 68 20 48 61 72 73 48 00 The String Read is:Pratyush
11:54
pratyush
HarsH======PROCFILE OPERATIONS======THE CALCULATED CHECKSUM =678236The calculated length of checksum integer 6Parameters=678236Reading From the procfile:checksum = 678236���=====IOCTL OPERATIONS=====Writing checksum Value to device file using ioctl callReading Checksum Value from device file using ioctlValue is 678236Closing Driver
11:55
pratyush
I will be sharing the code :)
11:56
pratyush
:) :) :)
11:56
Bertl
please do so and use a pastebin in the future :)
11:56
pratyush
okay
11:58
pratyush
<script src="https://pastebin.com/embed_js/NrqrBHAS"></script>
12:01
Bertl
way better :)
12:01
Bertl
btw, this is the simplest and most effective link:
12:01
Bertl
https://pastebin.com/raw/NrqrBHAS
12:07
pratyush
pratyush: :)
12:47
HEGAZY
joined the channel
13:00
omar31
Hi Bertl, I submitted a draft proposal for review
13:01
Bertl
great,
13:01
Bertl
will check shortly
13:22
bluez_[m]
Hi Bertl ! I partly completed the task 1 of kernel challenge. Currently only procfs is implemented.
13:24
bluez_[m]
Here is a test run: https://pastebin.com/FGs1CNtH
13:24
Bertl
great, link to the code?
13:24
bluez_[m]
How should I share code with you?
13:25
Bertl
you can upload it somewhere or check it in with github
13:26
Bertl
then send me a link via e-mail, private message or simply paste it here ... whatever you prefer
13:26
bluez_[m]
Okay! Gimme a minute.
13:41
bluez_[m]
Bertl: Here is the code: https://github.com/Swaraj1998/apertus-kernel-challenge
13:42
BAndiT1983|away
changed nick to: BAndiT1983
13:42
BAndiT1983
bluez_[m]: it's rather old practice to put variables at the top of the function, usually they should be placed where they are used
13:42
BAndiT1983
e.g. len in checksum_read
13:43
BAndiT1983
it's not used until len = sprintf(buf, "checksum: %ld\n", checksum);, so you can also write int len = ...
13:44
BAndiT1983
also the if check can be moved to the top of the function, as it should do an early return
13:44
bluez_[m]
BAndiT1983: ohh, ok got it! Actually I was in doubt weather that is allowed in the version of C that linux kernel uses...
13:44
bluez_[m]
BAndiT1983: sure, will do that
13:44
BAndiT1983
it's up to Bertl to approve stuff, just giving hints of what i see and usually expect
13:45
BAndiT1983
also braces for if() and for() are a good practice, even if there is only one line
13:46
bluez_[m]
BAndiT1983: also, can i initialize the loop counter "i" in the for loop, iirc its a feature of c99 but I dont koow if it is allowed in linux kernel
13:47
bluez_[m]
<BAndiT1983 "also braces for if() and for() a"> ok, noted
13:47
BAndiT1983
just try what happens when you do it
13:47
Bertl
bluez_[m]: do not let BAndiT1983 confuse you, follow the Linux kernel style
13:47
pratyush
Bertl: I have shared code via email
13:48
Bertl
bluez_[m]: https://www.kernel.org/doc/html/v4.10/process/coding-style.html
13:49
bluez_[m]
Bertl: Actually I was in doubt weather its according to linux kernel style or not... will check again
13:49
Bertl
e.g.: Do not unnecessarily use braces where a single statement will do.
13:51
Bertl
also variables go to the top of a function/block, as the kernel doesn't use C99
13:51
BAndiT1983
so kernel development follows all the practices which are bad nowadays, nice
13:51
bluez_[m]
Bertl: Thanks! I did follow that, but missed a few things I guess, but nevertheless it was correct
13:51
Bertl
bluez_[m]: what you want to do is to use proper spacing and indentation
13:52
Bertl
e.g. separate variables from code with an empty line
13:52
Bertl
separate blocks with empty lines, etc
13:52
bluez_[m]
Bertl: what about initialization in the for loop? Can we do that in kernel?
13:53
Bertl
sure
13:53
bluez_[m]
i did use 8 spaces as suggested
13:54
bluez_[m]
for indentation
13:54
bluez_[m]
<Bertl "e.g. separate variables from cod"> yes! will do that
13:55
bluez_[m]
Bertl: Okay will check with the style thoroughly
13:55
bluez_[m]
Should I start with ioctl?
13:56
Bertl
there are a bunch of issues with the code so far
13:56
Bertl
did you test it?
13:56
bluez_[m]
yes I did
13:57
bluez_[m]
what issues did you find?
13:57
Bertl
well, first, what is size_t used for?
13:57
Bertl
(the name is probably a good hint :)
13:57
bluez_[m]
i can replace it with unsigned int
13:57
preetimenghwani[
Hello Bertl
13:57
preetimenghwani[
I have partly implemented T871.
13:57
preetimenghwani[
I implemented the bitslip part too but i am a bit confused how to train my model in such a way that it takes testpattern as input when the data is under training and takes user input when the data is trained.
13:59
bluez_[m]
<Bertl "(the name is probably a good hin"> yeah your are right, will change that ':D
13:59
Bertl
preetimenghwani[: you are talking about a testbench?
13:59
bluez_[m]
any other issues?
13:59
Bertl
bluez_[m]: be aware that 'normal' C types like 'unsigned int' may have different sizes :)
13:59
Bertl
why is there an arbitrary limit (BUFSIZE) on the input?
14:00
Bertl
why do you allocate the buffer on the stack?
14:00
bluez_[m]
<Bertl "bluez_: be aware that 'normal' C"> should I use uint32_t and types like that?
14:01
BAndiT1983
is it available at all there?
14:01
Bertl
bluez_[m]: probably a better choice, yes
14:02
Bertl
how did reading back the data go in your tests?
14:03
bluez_[m]
<Bertl "why do you allocate the buffer o"> is there kmalloc or something I should use? I am currently learning...
14:03
BAndiT1983
check the link from Bertl, seen it there
14:07
bluez_[m]
<Bertl "how did reading back the data go"> reading was fine afai checked... I sent you that pastebin....
14:08
bluez_[m]
<BAndiT1983 "check the link from Bertl, seen "> yeah found it!
14:10
bluez_[m]
I will make the changes then... will be back
14:11
preetimenghwani[
In reply to Bertl
14:11
preetimenghwani[
I can do this using a testbench too but do we have to send a signal from deserializer to serialzer indicating that the model is trained so that serializer sends the input data accordingly.
14:12
Bertl
bluez_[m]: also check for any warning when you compile your code against the kernel
14:13
Bertl
preetimenghwani[: you can do that in several ways in a testbench ... the simplest is probably to wait for a specific time
14:13
Bertl
the smarter way is to have a signal which you want in your hardware design anyway
14:16
preetimenghwani[
The signal you are talking about is the signal from deserializer to serializer right?
14:21
bluez_[m]
> bluez_: also check for any warning when you compile your code against the kernel
14:21
bluez_[m]
Sure will do... none as of now though
14:21
BAndiT1983
bluez_[m]: have you cranked up the compiler flags for more inspections?
14:22
BAndiT1983
sometimes it's better to see more probable problems in the build log, although some are false positive, than to miss important error-prone places
14:24
bluez_[m]
> bluez_: have you cranked up the compiler flags for more inspections?
14:24
bluez_[m]
None yet... will add more flags and check...thanks!
14:26
HEGAZY
left the channel
14:33
RexOrCine1
joined the channel
14:33
RexOrCine
left the channel
14:37
pratyush
changed nick to: pratyush1
14:41
pratyush1
left the channel
14:44
pratyush
joined the channel
14:46
Bertl
pratyush: you go by the pseudonym Rodolfo Giometti ?
14:46
pratyush
No
14:49
pratyush
Bertl:NO
14:49
BAndiT1983
:D NSA at it again
14:50
Bertl
nah, was just wondering about the MODULE_AUTHOR entry in the code :)
14:54
BAndiT1983
and i've thought that you're a bit bored because of curfew at your place
14:55
Bertl
for me, basically nothing changed :)
14:56
BAndiT1983
same thing was told me exactly the second you've wrote it, that i'm happy about home office and residing at my computer table
14:58
pratyush
Bertl : Shall I start to work on a proposal
14:59
Bertl
it wouldn't hurt to have a proposal, but I would also suggest to address the challenge task a little better :)
15:00
pratyush
Bertl : What improvements I need to make
15:02
Bertl
well, you obviously copied a lot of example code without really understanding the parts
15:03
Bertl
so my suggestion would be to go through 'your' code line by line and make sure you know what it does and that it is really required
15:04
Bertl
also adhering to the kernel coding style and making the code readable by proper formating is a good idea (see the discussion on the channel here today for more hints)
15:04
pratyush
Bertl : sure
15:04
Bertl
finally, solving the actual task would be great!
15:06
Bertl
maybe discuss your solution with other potential applicants here to identify potential problems and get some ideas ...
15:06
pratyush
okay
15:07
pratyush
Bertl : I will make the code more compact
15:10
pratyush
left the channel
15:24
Bertl
off for now ... bbl
15:24
Bertl
changed nick to: Bertl_oO
15:57
BAndiT1983
changed nick to: BAndiT1983|away
16:07
BAndiT1983|away
changed nick to: BAndiT1983
16:30
omar98
joined the channel
16:32
omar31
left the channel
16:33
omar31
joined the channel
16:35
omar98
left the channel
16:38
omar31
left the channel
16:49
abeljj[m]
left the channel
16:49
abeljj[m]
joined the channel
17:51
se6ast1an
new Team Talk is out!
17:51
se6ast1an
https://www.apertus.org/axiom-team-talk-15-3-packaging--axiom-micro-article-march-2020
17:52
apurvanandan[m]
Yayy!
18:13
bluez_[m]
Bertl: Hey! I have made appropriate changes, can you review once? Here's the link again: https://github.com/Swaraj1998/apertus-kernel-challenge
18:24
bluez_[m]
Also, I am getting warnings about unused variables like file pointer in the read write function (should i remove them? how?)... other then that rest of the warnings are in the kernel source tree itself...
18:49
Bertl_oO
bluez_[m]: will check shortly ... but unused variables should be removed.
19:19
BAndiT1983
if they are coming from the API and are argument of a function, then a macro can be used to mark them
19:19
BAndiT1983
https://stackoverflow.com/questions/7090998/portable-unused-parameter-macro-used-on-function-signature-for-c-and-c
19:28
bluez_[m]
> bluez_: will check shortly ... but unused variables should be removed.
19:28
bluez_[m]
Sorry I meant to say unused parameters... from api functions
19:32
bluez_[m]
> if they are coming from the API and are argument of a function, then a macro can be used to mark them
19:32
bluez_[m]
Is there an already defined macro in headers or I have to define those? I guess its better if its pre existing, I'll try it. Thanks!
20:03
Bertl_oO
note that parameters are usually there for a reason
20:04
Bertl_oO
i.e. unused parameters are probably a good indication that you are doing something wrong
22:12
HEGAZY
joined the channel
22:34
se6ast1an
of to bed
22:34
se6ast1an
good night
22:34
BAndiT1983
changed nick to: BAndiT1983|away
22:36
HEGAZY
left the channel
22:44
intracube
changed nick to: intrac
22:48
futarisIRCcloud
left the channel
23:29
bluez_[m]
> i.e. unused parameters are probably a good indication that you are doing something wrong
23:29
bluez_[m]
Ohh, okay. Will try to find what's wrong. The ldd book did not mention anything yet though, maybe something in subsequent chapters. Will check. Thanks!!
23:30
bluez_[m]
Good night
23:33
Bertl_oO
nn
23:59
abc
joined the channel