aoe  87
About: AoE (ATA over Ethernet) Protocol Driver (Linux kernel 4.8.x and greater are not supported).
  Fossies Dox: aoe-87.tar.gz  ("inofficial" and yet experimental doxygen-generated source code documentation)  

aoedbg.c File Reference
#include <linux/skbuff.h>
#include <linux/hdreg.h>
#include <linux/mempool.h>
#include <linux/debugfs.h>
#include <linux/relay.h>
#include "aoe.h"
Include dependency graph for aoedbg.c:

Go to the source code of this file.

Data Structures

struct  ddbg
 

Macros

#define SUBBUF_SIZE   262144
 
#define N_SUBBUFS   8
 

Functions

static DEFINE_SPINLOCK (buflock)
 
static struct dentry * cfile (const char *filename, struct dentry *parent, umode_t mode, struct rchan_buf *buf, int *is_global)
 
static int rfile (struct dentry *dentry)
 
static int subbuf_start (struct rchan_buf *buf, void *subbuf, void *prev_subbuf, size_t prev_padding)
 
static struct rchan * xrelay_open (const char *base_fnam, struct dentry *parent, size_t subbuf_size, size_t n_subbufs)
 
void __init aoedbg_init (void)
 
static void aoedbg_write (const void *data, size_t length)
 
void aoedbg_print (char *fmt,...)
 
static int rttstart (struct aoedev *d)
 
static void rttstop (struct ddbg *dbg)
 
void aoedbg_devinit (struct aoedev *d)
 
void aoedbg_rtt (struct aoedev *d, struct aoe_hdr *h, struct frame *f, int rtt)
 
void aoedbg_undbg (struct aoedev *d)
 
void aoedbg_exit (void)
 

Variables

static struct rchan * chan
 
static struct timeval start
 
static char buf [PAGE_SIZE]
 
static struct rchan_callbacks cb
 

Macro Definition Documentation

◆ N_SUBBUFS

#define N_SUBBUFS   8

Definition at line 9 of file aoedbg.c.

◆ SUBBUF_SIZE

#define SUBBUF_SIZE   262144

Definition at line 8 of file aoedbg.c.

Function Documentation

◆ aoedbg_devinit()

void aoedbg_devinit ( struct aoedev d)

◆ aoedbg_exit()

void aoedbg_exit ( void  )

Definition at line 268 of file aoedbg.c.

References chan.

Referenced by aoe_exit().

◆ aoedbg_init()

void __init aoedbg_init ( void  )

Definition at line 80 of file aoedbg.c.

References AOEDBG_ACTIVE, chan, start, and xrelay_open().

Referenced by aoe_init().

◆ aoedbg_print()

void aoedbg_print ( char *  fmt,
  ... 
)

Definition at line 107 of file aoedbg.c.

References aoedbg_write(), and chan.

◆ aoedbg_rtt()

◆ aoedbg_undbg()

void aoedbg_undbg ( struct aoedev d)

Definition at line 253 of file aoedbg.c.

References aoedev::dbg, and rttstop().

Referenced by freedev().

◆ aoedbg_write()

static void aoedbg_write ( const void *  data,
size_t  length 
)
static

Definition at line 97 of file aoedbg.c.

References chan.

Referenced by aoedbg_print().

◆ cfile()

static struct dentry* cfile ( const char *  filename,
struct dentry *  parent,
umode_t  mode,
struct rchan_buf *  buf,
int is_global 
)
static

Definition at line 27 of file aoedbg.c.

◆ DEFINE_SPINLOCK()

static DEFINE_SPINLOCK ( buflock  )
static

◆ rfile()

static int rfile ( struct dentry *  dentry)
static

Definition at line 37 of file aoedbg.c.

◆ rttstart()

static int rttstart ( struct aoedev d)
static

◆ rttstop()

static void rttstop ( struct ddbg dbg)
static

Definition at line 145 of file aoedbg.c.

References ddbg::rttchan.

Referenced by aoedbg_undbg().

◆ subbuf_start()

static int subbuf_start ( struct rchan_buf *  buf,
void *  subbuf,
void *  prev_subbuf,
size_t  prev_padding 
)
static

Definition at line 44 of file aoedbg.c.

◆ xrelay_open()

static struct rchan* xrelay_open ( const char *  base_fnam,
struct dentry *  parent,
size_t  subbuf_size,
size_t  n_subbufs 
)
static

Definition at line 59 of file aoedbg.c.

References cb.

Referenced by aoedbg_init(), and rttstart().

Variable Documentation

◆ buf

char buf[PAGE_SIZE]
static

Definition at line 22 of file aoedbg.c.

Referenced by aoecmd_ata_rw(), flush(), ktiocomplete(), and nextbuf().

◆ cb

struct rchan_callbacks cb
static
Initial value:
= {
.subbuf_start = subbuf_start,
.create_buf_file = cfile,
.remove_buf_file = rfile,
}

Definition at line 51 of file aoedbg.c.

Referenced by xrelay_open().

◆ chan

struct rchan* chan
static

Definition at line 12 of file aoedbg.c.

Referenced by aoedbg_exit(), aoedbg_init(), aoedbg_print(), and aoedbg_write().

◆ start

struct timeval start
static

Definition at line 14 of file aoedbg.c.

Referenced by aoedbg_init(), and aoedbg_rtt().

cfile
static struct dentry * cfile(const char *filename, struct dentry *parent, umode_t mode, struct rchan_buf *buf, int *is_global)
Definition: aoedbg.c:27
subbuf_start
static int subbuf_start(struct rchan_buf *buf, void *subbuf, void *prev_subbuf, size_t prev_padding)
Definition: aoedbg.c:44
rfile
static int rfile(struct dentry *dentry)
Definition: aoedbg.c:37