[Click] Activation of optional handlers in NIC elements
Alessandro Coli
alessandro.coli at studio.unibo.it
Fri Mar 26 03:31:18 EST 2004
Hi Eddie, i am Alex again. I read your answer (thanks): i am working on the
file anydevice.hh, and made some changes. This was the original starting of
the file:
-----------------------------------------------------------
// -*- mode: c++; c-basic-offset: 4 -*-
#ifndef ANYDEVICE_HH
#define ANYDEVICE_HH
#include <click/element.hh>
#include <click/task.hh>
#include <click/cxxprotect.h>
CLICK_CXX_PROTECT
#include <linux/netdevice.h>
CLICK_CXX_UNPROTECT
#include <click/cxxunprotect.h>
// #define CLICK_DEVICE_CYCLES 1
// #define CLICK_DEVICE_PRFCTR 1
// #define CLICK_DEVICE_THESIS_STATS 1
// #define _DEV_OVRN_STATS_ 1
#define CLICK_CYCLE_COMPENSATION 0
#ifdef HAVE_STRIDE_SCHED
# define CLICK_DEVICE_ADJUST_TICKETS 1
#endif
#if CLICK_DEVICE_PRFCTR && __i386__
#define CLICK_DEVICE_STATS 1
#define SET_STATS(p0mark, p1mark, time_mark) \
----------------------------------------------------
and i changed it this way (this is how the file appears now on my pc):
// -*- mode: c++; c-basic-offset: 4 -*-
#ifndef ANYDEVICE_HH
#define ANYDEVICE_HH
#include <click/element.hh>
#include <click/task.hh>
#include <click/cxxprotect.h>
CLICK_CXX_PROTECT
#include <linux/netdevice.h>
CLICK_CXX_UNPROTECT
#include <click/cxxunprotect.h>
// #define CLICK_DEVICE_CYCLES 1
// #define CLICK_DEVICE_PRFCTR 1
#define CLICK_DEVICE_THESIS_STATS 1
// #define _DEV_OVRN_STATS_ 1
#define CLICK_CYCLE_COMPENSATION 0
#define CLICK_DEVICE_STATS 1
#ifdef HAVE_STRIDE_SCHED
# define CLICK_DEVICE_ADJUST_TICKETS 1
#endif
#if CLICK_DEVICE_PRFCTR && __i386__
#define CLICK_DEVICE_STATS 1
#define SET_STATS(p0mark, p1mark, time_mark) \
I just did these 2 things:
1) I enabled #define CLICK_DEVICE_THESIS_STATS 1 deleting the \\ at the 15th
line (considering even the blank lines) ;
2) I added a #define CLICK_DEVICE_STATS 1 at the 18th line (after the #define
CLICK_CYCLE_COMPENSATION 0, line which already was present).
then compiled, and i got working some of the handlers i was talking about
(great!), i.e. the handlers on DMA requests and replies, but still not the
ones which tell me how many packets have been dropped in the NIC (is "missed
frame" its name?)
What else have i got to do? I'd be grateful if you could indicate me the exact
lines i have to edit, and which way.
Many thanks again :)
Alex
More information about the click
mailing list