Original post here.
NETIF_F_NETNS_LOCAL a flag to indicate
a network device is local to a single network namespace and
should never be moved. Useful for pseudo devices that we
need an instance in each network namespace (like the loopback
device) and for any device we find that cannot handle multiple
network namespaces so we may trap them in the initial network
Original post here.
“So what are network namespaces? Generally speaking, an installation of Linux shares a single set of network interfaces and routing table entries. You can modify the routing table entries using policy routing (here’s an introduction I wrote and here’s a write-up on a potential use case for policy routing), but that doesn’t fundamentally change the fact that the set of network interfaces and routing tables/entries are shared across the entire OS. Network namespaces change that fundamental assumption. With network namespaces, you can have different and separate instances of network interfaces and routing tables that operate independent of each other.”
Original post here.
DEFINE_MUTEX defines and initializes mutex. It is useful for define global mutexes.
mutex_init initializes already allocated mutex. It is used for per-object mutexes, when mutex is just a field in a heap-allocated object.
Any of these methods is sufficient for initialize mutex.
Text extracted form the original post here.
The default ->sk_data_ready() callback is sock_def_readable():
static void sock_def_readable(struct sock *sk, int len)
struct socket_wq *wq;
wq = rcu_dereference(sk->sk_wq);
wake_up_interruptible_sync_poll(&wq->wait, POLLIN | POLLPRI |
POLLRDNORM | POLLRDBAND);
sk_wake_async(sk, SOCK_WAKE_WAITD, POLL_IN);
which basically wakes up the process waiting for these data, for example, recv(), and let them process the data in ->sk_receive_queue.
Some protocol may override this, for example, netlink, see __netlink_kernel_create().
BTW, you can use
perf top command to see which kernel function consumes most CPU cycles.
“There exists a device driver for each kind of NIC. Inside it, Linux will ALWAYS call a standard high level routing: “netif_rx [net/core/dev.c]”, which will controls what 3 level protocol the frame belong to, and it will call the right 3 level function (so we’ll use a pointer to the function to determine which is right).”
Downgrading or forcing an installation of a specific package. Example:
# pacman -S --force qt4
Original post from Arch Linux Wiki
Frequently used options
The following lists options that many users may wish to configure. This example configuration file enables vertical, horizontal and circular scrolling as well as touchpad tap to click:
Option "TapButton1" "1"
Option "TapButton2" "3"
Option "TapButton3" "2"
Option "VertEdgeScroll" "on"
Option "VertTwoFingerScroll" "on"
Option "HorizEdgeScroll" "on"
Option "HorizTwoFingerScroll" "on"
Option "CircularScrolling" "on"
Option "CircScrollTrigger" "2"
Option "EmulateTwoFingerMinZ" "40"
Option "EmulateTwoFingerMinW" "8"
Option "CoastingSpeed" "0"
Option "FingerLow" "30"
Option "FingerHigh" "50"
Option "MaxTapTime" "125"
- (integer) configures which mouse-button is reported on a non-corner, one finger tap.
- (integer) configures which mouse-button is reported on a non-corner, two finger tap
- (integer) configures which mouse-button is reported on a non-corner, three finger tap
- (integer) configures which mouse-button is reported on a right bottom corner, one finger tap (use
Option "RBCornerButton" "3" to achieve Ubuntu style tap behaviour for right mouse button in lower right corner)
- (integer) as above, but for top right corner, one finger tap.
- (boolean) enables vertical scrolling while dragging across the right edge of the touch pad.
- (boolean) enables horizontal scrolling while dragging across the bottom edge of the touch pad.
- (boolean) enables vertical scrolling using two fingers.
- (boolean) enables horizontal scrolling using two fingers.
- (integer) play with this value to set the precision of two finger scroll.
- (integer) when finger pressure drops below this value, the driver counts it as a release.
- (integer) when finger pressure goes above this value, the driver counts it as a touch.
- Determines how “crisp” a tap must be to be considered a real tap. Decrease the value to require a more crisp tap. Properly adjusting this parameter can reduce false positives when the hands hover over or lightly touch the pad.
- VertScrollDelta and HorizScrollDelta
- (integer) configures the speed of scrolling, it is a bit counter-intuitive because higher values produce greater precision and thus slower scrolling. Negative values cause natural scrolling like in OS X.