[Click] Still unable to find the handler on NIC packet losses

Alessandro Coli alessandro.coli at studio.unibo.it
Mon Mar 29 17:23:51 EST 2004



Hi. In order to enable the handlers that help you monitoring the packet losses 
in the NIC and the DMA requests and replies, i partially modified some lines of 
the file "elements/linuxmodule/anydevice.hh", as Eddie Kohler told me to do.

The default starting of the file was:

--------------------------------------------------------------------------------
----

// -*- 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) \

-----------------------------------------------------------------------------




 I changed it this way: 

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).

And so now this is the copy of the file 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) \

--------------------------------------------------------------------------------

Unfortunately, after this I still could not find in PollDevice and ToDevice the 
handler which tells you how many packets have been dropped by the NIC. 

Didn't I already enable it, changing the file that way? If yes, in which 
element should i look for that handler? If not, how can i enable it?

What do the other constants (still disabled in my copy of the file) do? What's 
their use?

Hope in a kind answer :)

Many thanks

Alex



More information about the click mailing list