Pages

Thursday, August 27, 2015

Linux kernel module

I am working on a driver for NetFPGA-1G card. I found this Linux Kernel Programming Guide
is a good place for whom wants to write a kernel module or hardware driver to start with
Install/remove a kernel module
Commands must be executed under root privilege

To install insmod <path_to_module/module_name.ko>
To remove modprobe -r module_name
or rmmod -f module_name
-f: force removal

If it fails to remove, there could be the module is in use by a process or it has dependencies
Run lsmod to display all loaded module, its use and dependencies
Ex. lsmod | grep module_name
Output:
Module     Size     Used by

Used by is a number and may be followed by a list of dependencies
If the number > 0, modprode will fail.

Sometimes, a positive number means the kernel module has bugs. It crashes during installation can lead to the case. Then, the only solution is to reboot the computer and check the code.
A look at /var/log/syslog can provide some infos.


Wednesday, January 11, 2012

SPEC.org

Qouted: "The Standard Performance Evaluation Corporation (SPEC) is a non-profit corporation formed to establish, maintain and endorse a standardized set of relevant benchmarks that can be applied to the newest generation of high-performance computers. SPEC develops benchmark suites and also reviews and publishes submitted results from our member organizations and other benchmark licensees"

Saturday, October 1, 2011

Limit PPPoE PADI per specific time period

In ISP environment, some of the clients have their internet service disabled or somehow their modem is configured with wrong username and password. That will produce massive Accept-Rejects, because client modem continually try to request PPPOE connection.
That could cause high cpu consumption for Radius Servers and produce much log which burden troubleshooting effort.

Session throttle feature of Cisco IOS allows us to limit number of PPPoE PADI over period of time and help to prevent this situation.
How to use:
In the Ethernet environment:
       bba-group pppoe group1
            virtual-template 1
            sessions per-mac throttle 10 60 300
The above configuration cause BRAS not to answer PPPOE PADI if 10 request has passed within 60 seconds. The silent time will last for 300 seconds.