also sizeof(arr) gets you wrong output, and hence the loop executed for 0-16 (which is around 17 iterations.
sizeof() gets the size of a data-type in general. But array is a collection of items. And so the confusion. So in general always this is th…
for_each_net(...) is not a standard API in C. It is implemented somewhere as you can see here:
#define for_each_net(VAR) \
And then there is the skb_clone() vs skb_copy().
You can refer the documentation in the API comment of its source:
* skb_clone - duplicate an sk_buff
* @skb: buffer to clone
* @gfp_mask: allocation priority
* Duplicate an &sk_buff…
In general you get the basic answer via man fork and man clone. But as we know it is not that sufficient
So to explain the same, I did this picture (doodle) for you. Imagine case 1, you have a large process with few threads (in this cas…
Just take a simple example from any of these: http://elixir.free-electrons.com/linux/latest/ident/list_for_each_entry
Write an independent kernel module with all sample init, add, traverse, and del provided apis for managing linked lists.
In the t…
Once I did a video on a kernel's API tcp_parse_options():
Although this is not related and not even about TCP, the approach done/followed will give us some direction.
I suggest similar way first you can have a look of the existing kernel APIs wh…
Also check this example, in which flags are defined. Looks bit different, but more or less same concept.
/* shm_mode upper byte flags */
#define SHM_DEST 01000 /* segment wi…
Kernel patch has advantage of inserting the code direct and bit easier. But this leads to complete kernel compilation which is its drawback.
vs. a module needs a complex registration mechanism.
I am still bit new to ipv6, since I never deeply yet …
as you can see the complete code other than this part:
* Copyright (C) 2001 Deep Blue Solutions Ltd.
* This program is free software; you can redistribute it and/or modify
* it under the terms o…
BTW, here is a video I shot on the same FreeNAS vm setup simulating scenarios like: upgrade of drives and failed drives
in multiple iterations. And successfully be able to rebuild/resilver the ZFS pool (RAID level10).
I too initially thought getting an exclusive hw RAID PCIe card. But later discovered the true advantages of software RAID. Such as mdadm, or via zfs pools, or btrfs, etc.
In the case of hw raid, the raid controller probably works much faste…
Hi, interesting question. Later during the day I go through the link which you shared. It is quite interesting and since it is huge page it may quite take time to get some overall picture.
But BTW, like they showed in the link, I can see a GPS modu…