Commit d11ba0c4 authored by Peter Tiedemann's avatar Peter Tiedemann Committed by Jeff Garzik

qeth: improving debug message handling

Improving debug message handling, moving ipa into messages from kernel
to dbf, some cleanups and typo fixes.
Signed-off-by: default avatarPeter Tiedemann <ptiedem@de.ibm.com>
Signed-off-by: default avatarFrank Blaschka <frank.blaschka@de.ibm.com>
Signed-off-by: default avatarJeff Garzik <jgarzik@redhat.com>
parent b7624ec1
...@@ -34,59 +34,53 @@ ...@@ -34,59 +34,53 @@
#include "qeth_core_mpc.h" #include "qeth_core_mpc.h"
#define KMSG_COMPONENT "qeth"
/** /**
* Debug Facility stuff * Debug Facility stuff
*/ */
#define QETH_DBF_SETUP_NAME "qeth_setup" enum qeth_dbf_names {
#define QETH_DBF_SETUP_LEN 8 QETH_DBF_SETUP,
#define QETH_DBF_SETUP_PAGES 8 QETH_DBF_QERR,
#define QETH_DBF_SETUP_NR_AREAS 1 QETH_DBF_TRACE,
#define QETH_DBF_SETUP_LEVEL 5 QETH_DBF_MSG,
QETH_DBF_SENSE,
#define QETH_DBF_MISC_NAME "qeth_misc" QETH_DBF_MISC,
#define QETH_DBF_MISC_LEN 128 QETH_DBF_CTRL,
#define QETH_DBF_MISC_PAGES 2 QETH_DBF_INFOS /* must be last element */
#define QETH_DBF_MISC_NR_AREAS 1 };
#define QETH_DBF_MISC_LEVEL 2
struct qeth_dbf_info {
#define QETH_DBF_DATA_NAME "qeth_data" char name[DEBUG_MAX_NAME_LEN];
#define QETH_DBF_DATA_LEN 96 int pages;
#define QETH_DBF_DATA_PAGES 8 int areas;
#define QETH_DBF_DATA_NR_AREAS 1 int len;
#define QETH_DBF_DATA_LEVEL 2 int level;
struct debug_view *view;
#define QETH_DBF_CONTROL_NAME "qeth_control" debug_info_t *id;
#define QETH_DBF_CONTROL_LEN 256 };
#define QETH_DBF_CONTROL_PAGES 8
#define QETH_DBF_CONTROL_NR_AREAS 1 #define QETH_DBF_CTRL_LEN 256
#define QETH_DBF_CONTROL_LEVEL 5
#define QETH_DBF_TRACE_NAME "qeth_trace"
#define QETH_DBF_TRACE_LEN 8
#define QETH_DBF_TRACE_PAGES 4
#define QETH_DBF_TRACE_NR_AREAS 1
#define QETH_DBF_TRACE_LEVEL 3
#define QETH_DBF_SENSE_NAME "qeth_sense"
#define QETH_DBF_SENSE_LEN 64
#define QETH_DBF_SENSE_PAGES 2
#define QETH_DBF_SENSE_NR_AREAS 1
#define QETH_DBF_SENSE_LEVEL 2
#define QETH_DBF_QERR_NAME "qeth_qerr"
#define QETH_DBF_QERR_LEN 8
#define QETH_DBF_QERR_PAGES 2
#define QETH_DBF_QERR_NR_AREAS 1
#define QETH_DBF_QERR_LEVEL 2
#define QETH_DBF_TEXT(name, level, text) \ #define QETH_DBF_TEXT(name, level, text) \
do { \ debug_text_event(qeth_dbf[QETH_DBF_##name].id, level, text)
debug_text_event(qeth_dbf_##name, level, text); \
} while (0)
#define QETH_DBF_HEX(name, level, addr, len) \ #define QETH_DBF_HEX(name, level, addr, len) \
debug_event(qeth_dbf[QETH_DBF_##name].id, level, (void *)(addr), len)
#define QETH_DBF_MESSAGE(level, text...) \
debug_sprintf_event(qeth_dbf[QETH_DBF_MSG].id, level, text)
#define QETH_DBF_TEXT_(name, level, text...) \
do { \ do { \
debug_event(qeth_dbf_##name, level, (void *)(addr), len); \ if (qeth_dbf_passes(qeth_dbf[QETH_DBF_##name].id, level)) { \
char *dbf_txt_buf = \
get_cpu_var(QETH_DBF_TXT_BUF); \
sprintf(dbf_txt_buf, text); \
debug_text_event(qeth_dbf[QETH_DBF_##name].id, \
level, dbf_txt_buf); \
put_cpu_var(QETH_DBF_TXT_BUF); \
} \
} while (0) } while (0)
/* Allow to sort out low debug levels early to avoid wasted sprints */ /* Allow to sort out low debug levels early to avoid wasted sprints */
...@@ -826,13 +820,8 @@ void qeth_core_remove_osn_attributes(struct device *); ...@@ -826,13 +820,8 @@ void qeth_core_remove_osn_attributes(struct device *);
/* exports for qeth discipline device drivers */ /* exports for qeth discipline device drivers */
extern struct qeth_card_list_struct qeth_core_card_list; extern struct qeth_card_list_struct qeth_core_card_list;
extern debug_info_t *qeth_dbf_setup;
extern debug_info_t *qeth_dbf_data; extern struct qeth_dbf_info qeth_dbf[QETH_DBF_INFOS];
extern debug_info_t *qeth_dbf_misc;
extern debug_info_t *qeth_dbf_control;
extern debug_info_t *qeth_dbf_trace;
extern debug_info_t *qeth_dbf_sense;
extern debug_info_t *qeth_dbf_qerr;
void qeth_set_allowed_threads(struct qeth_card *, unsigned long , int); void qeth_set_allowed_threads(struct qeth_card *, unsigned long , int);
int qeth_threads_running(struct qeth_card *, unsigned long); int qeth_threads_running(struct qeth_card *, unsigned long);
......
This diff is collapsed.
...@@ -230,7 +230,7 @@ static struct ipa_cmd_names qeth_ipa_cmd_names[] = { ...@@ -230,7 +230,7 @@ static struct ipa_cmd_names qeth_ipa_cmd_names[] = {
{IPA_CMD_STARTLAN, "startlan"}, {IPA_CMD_STARTLAN, "startlan"},
{IPA_CMD_STOPLAN, "stoplan"}, {IPA_CMD_STOPLAN, "stoplan"},
{IPA_CMD_SETVMAC, "setvmac"}, {IPA_CMD_SETVMAC, "setvmac"},
{IPA_CMD_DELVMAC, "delvmca"}, {IPA_CMD_DELVMAC, "delvmac"},
{IPA_CMD_SETGMAC, "setgmac"}, {IPA_CMD_SETGMAC, "setgmac"},
{IPA_CMD_DELGMAC, "delgmac"}, {IPA_CMD_DELGMAC, "delgmac"},
{IPA_CMD_SETVLAN, "setvlan"}, {IPA_CMD_SETVLAN, "setvlan"},
......
...@@ -31,7 +31,7 @@ int qeth_eddp_check_buffers_for_context(struct qeth_qdio_out_q *queue, ...@@ -31,7 +31,7 @@ int qeth_eddp_check_buffers_for_context(struct qeth_qdio_out_q *queue,
int skbs_in_buffer; int skbs_in_buffer;
int buffers_needed = 0; int buffers_needed = 0;
QETH_DBF_TEXT(trace, 5, "eddpcbfc"); QETH_DBF_TEXT(TRACE, 5, "eddpcbfc");
while (elements_needed > 0) { while (elements_needed > 0) {
buffers_needed++; buffers_needed++;
if (atomic_read(&queue->bufs[index].state) != if (atomic_read(&queue->bufs[index].state) !=
...@@ -51,7 +51,7 @@ static void qeth_eddp_free_context(struct qeth_eddp_context *ctx) ...@@ -51,7 +51,7 @@ static void qeth_eddp_free_context(struct qeth_eddp_context *ctx)
{ {
int i; int i;
QETH_DBF_TEXT(trace, 5, "eddpfctx"); QETH_DBF_TEXT(TRACE, 5, "eddpfctx");
for (i = 0; i < ctx->num_pages; ++i) for (i = 0; i < ctx->num_pages; ++i)
free_page((unsigned long)ctx->pages[i]); free_page((unsigned long)ctx->pages[i]);
kfree(ctx->pages); kfree(ctx->pages);
...@@ -76,7 +76,7 @@ void qeth_eddp_buf_release_contexts(struct qeth_qdio_out_buffer *buf) ...@@ -76,7 +76,7 @@ void qeth_eddp_buf_release_contexts(struct qeth_qdio_out_buffer *buf)
{ {
struct qeth_eddp_context_reference *ref; struct qeth_eddp_context_reference *ref;
QETH_DBF_TEXT(trace, 6, "eddprctx"); QETH_DBF_TEXT(TRACE, 6, "eddprctx");
while (!list_empty(&buf->ctx_list)) { while (!list_empty(&buf->ctx_list)) {
ref = list_entry(buf->ctx_list.next, ref = list_entry(buf->ctx_list.next,
struct qeth_eddp_context_reference, list); struct qeth_eddp_context_reference, list);
...@@ -91,7 +91,7 @@ static int qeth_eddp_buf_ref_context(struct qeth_qdio_out_buffer *buf, ...@@ -91,7 +91,7 @@ static int qeth_eddp_buf_ref_context(struct qeth_qdio_out_buffer *buf,
{ {
struct qeth_eddp_context_reference *ref; struct qeth_eddp_context_reference *ref;
QETH_DBF_TEXT(trace, 6, "eddprfcx"); QETH_DBF_TEXT(TRACE, 6, "eddprfcx");
ref = kmalloc(sizeof(struct qeth_eddp_context_reference), GFP_ATOMIC); ref = kmalloc(sizeof(struct qeth_eddp_context_reference), GFP_ATOMIC);
if (ref == NULL) if (ref == NULL)
return -ENOMEM; return -ENOMEM;
...@@ -112,7 +112,7 @@ int qeth_eddp_fill_buffer(struct qeth_qdio_out_q *queue, ...@@ -112,7 +112,7 @@ int qeth_eddp_fill_buffer(struct qeth_qdio_out_q *queue,
int must_refcnt = 1; int must_refcnt = 1;
int i; int i;
QETH_DBF_TEXT(trace, 5, "eddpfibu"); QETH_DBF_TEXT(TRACE, 5, "eddpfibu");
while (elements > 0) { while (elements > 0) {
buf = &queue->bufs[index]; buf = &queue->bufs[index];
if (atomic_read(&buf->state) != QETH_QDIO_BUF_EMPTY) { if (atomic_read(&buf->state) != QETH_QDIO_BUF_EMPTY) {
...@@ -166,7 +166,7 @@ int qeth_eddp_fill_buffer(struct qeth_qdio_out_q *queue, ...@@ -166,7 +166,7 @@ int qeth_eddp_fill_buffer(struct qeth_qdio_out_q *queue,
} }
out_check: out_check:
if (!queue->do_pack) { if (!queue->do_pack) {
QETH_DBF_TEXT(trace, 6, "fillbfnp"); QETH_DBF_TEXT(TRACE, 6, "fillbfnp");
/* set state to PRIMED -> will be flushed */ /* set state to PRIMED -> will be flushed */
if (buf->next_element_to_fill > 0) { if (buf->next_element_to_fill > 0) {
atomic_set(&buf->state, QETH_QDIO_BUF_PRIMED); atomic_set(&buf->state, QETH_QDIO_BUF_PRIMED);
...@@ -175,7 +175,7 @@ int qeth_eddp_fill_buffer(struct qeth_qdio_out_q *queue, ...@@ -175,7 +175,7 @@ int qeth_eddp_fill_buffer(struct qeth_qdio_out_q *queue,
} else { } else {
if (queue->card->options.performance_stats) if (queue->card->options.performance_stats)
queue->card->perf_stats.skbs_sent_pack++; queue->card->perf_stats.skbs_sent_pack++;
QETH_DBF_TEXT(trace, 6, "fillbfpa"); QETH_DBF_TEXT(TRACE, 6, "fillbfpa");
if (buf->next_element_to_fill >= if (buf->next_element_to_fill >=
QETH_MAX_BUFFER_ELEMENTS(queue->card)) { QETH_MAX_BUFFER_ELEMENTS(queue->card)) {
/* /*
...@@ -199,7 +199,7 @@ static void qeth_eddp_create_segment_hdrs(struct qeth_eddp_context *ctx, ...@@ -199,7 +199,7 @@ static void qeth_eddp_create_segment_hdrs(struct qeth_eddp_context *ctx,
int pkt_len; int pkt_len;
struct qeth_eddp_element *element; struct qeth_eddp_element *element;
QETH_DBF_TEXT(trace, 5, "eddpcrsh"); QETH_DBF_TEXT(TRACE, 5, "eddpcrsh");
page = ctx->pages[ctx->offset >> PAGE_SHIFT]; page = ctx->pages[ctx->offset >> PAGE_SHIFT];
page_offset = ctx->offset % PAGE_SIZE; page_offset = ctx->offset % PAGE_SIZE;
element = &ctx->elements[ctx->num_elements]; element = &ctx->elements[ctx->num_elements];
...@@ -257,7 +257,7 @@ static void qeth_eddp_copy_data_tcp(char *dst, struct qeth_eddp_data *eddp, ...@@ -257,7 +257,7 @@ static void qeth_eddp_copy_data_tcp(char *dst, struct qeth_eddp_data *eddp,
int copy_len; int copy_len;
u8 *src; u8 *src;
QETH_DBF_TEXT(trace, 5, "eddpcdtc"); QETH_DBF_TEXT(TRACE, 5, "eddpcdtc");
if (skb_shinfo(eddp->skb)->nr_frags == 0) { if (skb_shinfo(eddp->skb)->nr_frags == 0) {
skb_copy_from_linear_data_offset(eddp->skb, eddp->skb_offset, skb_copy_from_linear_data_offset(eddp->skb, eddp->skb_offset,
dst, len); dst, len);
...@@ -305,7 +305,7 @@ static void qeth_eddp_create_segment_data_tcp(struct qeth_eddp_context *ctx, ...@@ -305,7 +305,7 @@ static void qeth_eddp_create_segment_data_tcp(struct qeth_eddp_context *ctx,
struct qeth_eddp_element *element; struct qeth_eddp_element *element;
int first_lap = 1; int first_lap = 1;
QETH_DBF_TEXT(trace, 5, "eddpcsdt"); QETH_DBF_TEXT(TRACE, 5, "eddpcsdt");
page = ctx->pages[ctx->offset >> PAGE_SHIFT]; page = ctx->pages[ctx->offset >> PAGE_SHIFT];
page_offset = ctx->offset % PAGE_SIZE; page_offset = ctx->offset % PAGE_SIZE;
element = &ctx->elements[ctx->num_elements]; element = &ctx->elements[ctx->num_elements];
...@@ -346,7 +346,7 @@ static __wsum qeth_eddp_check_tcp4_hdr(struct qeth_eddp_data *eddp, ...@@ -346,7 +346,7 @@ static __wsum qeth_eddp_check_tcp4_hdr(struct qeth_eddp_data *eddp,
{ {
__wsum phcsum; /* pseudo header checksum */ __wsum phcsum; /* pseudo header checksum */
QETH_DBF_TEXT(trace, 5, "eddpckt4"); QETH_DBF_TEXT(TRACE, 5, "eddpckt4");
eddp->th.tcp.h.check = 0; eddp->th.tcp.h.check = 0;
/* compute pseudo header checksum */ /* compute pseudo header checksum */
phcsum = csum_tcpudp_nofold(eddp->nh.ip4.h.saddr, eddp->nh.ip4.h.daddr, phcsum = csum_tcpudp_nofold(eddp->nh.ip4.h.saddr, eddp->nh.ip4.h.daddr,
...@@ -361,7 +361,7 @@ static __wsum qeth_eddp_check_tcp6_hdr(struct qeth_eddp_data *eddp, ...@@ -361,7 +361,7 @@ static __wsum qeth_eddp_check_tcp6_hdr(struct qeth_eddp_data *eddp,
__be32 proto; __be32 proto;
__wsum phcsum; /* pseudo header checksum */ __wsum phcsum; /* pseudo header checksum */
QETH_DBF_TEXT(trace, 5, "eddpckt6"); QETH_DBF_TEXT(TRACE, 5, "eddpckt6");
eddp->th.tcp.h.check = 0; eddp->th.tcp.h.check = 0;
/* compute pseudo header checksum */ /* compute pseudo header checksum */
phcsum = csum_partial((u8 *)&eddp->nh.ip6.h.saddr, phcsum = csum_partial((u8 *)&eddp->nh.ip6.h.saddr,
...@@ -378,7 +378,7 @@ static struct qeth_eddp_data *qeth_eddp_create_eddp_data(struct qeth_hdr *qh, ...@@ -378,7 +378,7 @@ static struct qeth_eddp_data *qeth_eddp_create_eddp_data(struct qeth_hdr *qh,
{ {
struct qeth_eddp_data *eddp; struct qeth_eddp_data *eddp;
QETH_DBF_TEXT(trace, 5, "eddpcrda"); QETH_DBF_TEXT(TRACE, 5, "eddpcrda");
eddp = kzalloc(sizeof(struct qeth_eddp_data), GFP_ATOMIC); eddp = kzalloc(sizeof(struct qeth_eddp_data), GFP_ATOMIC);
if (eddp) { if (eddp) {
eddp->nhl = nhl; eddp->nhl = nhl;
...@@ -398,7 +398,7 @@ static void __qeth_eddp_fill_context_tcp(struct qeth_eddp_context *ctx, ...@@ -398,7 +398,7 @@ static void __qeth_eddp_fill_context_tcp(struct qeth_eddp_context *ctx,
int data_len; int data_len;
__wsum hcsum; __wsum hcsum;
QETH_DBF_TEXT(trace, 5, "eddpftcp"); QETH_DBF_TEXT(TRACE, 5, "eddpftcp");
eddp->skb_offset = sizeof(struct qeth_hdr) + eddp->nhl + eddp->thl; eddp->skb_offset = sizeof(struct qeth_hdr) + eddp->nhl + eddp->thl;
if (eddp->qh.hdr.l2.id == QETH_HEADER_TYPE_LAYER2) { if (eddp->qh.hdr.l2.id == QETH_HEADER_TYPE_LAYER2) {
eddp->skb_offset += sizeof(struct ethhdr); eddp->skb_offset += sizeof(struct ethhdr);
...@@ -457,7 +457,7 @@ static int qeth_eddp_fill_context_tcp(struct qeth_eddp_context *ctx, ...@@ -457,7 +457,7 @@ static int qeth_eddp_fill_context_tcp(struct qeth_eddp_context *ctx,
{ {
struct qeth_eddp_data *eddp = NULL; struct qeth_eddp_data *eddp = NULL;
QETH_DBF_TEXT(trace, 5, "eddpficx"); QETH_DBF_TEXT(TRACE, 5, "eddpficx");
/* create our segmentation headers and copy original headers */ /* create our segmentation headers and copy original headers */
if (skb->protocol == htons(ETH_P_IP)) if (skb->protocol == htons(ETH_P_IP))
eddp = qeth_eddp_create_eddp_data(qhdr, eddp = qeth_eddp_create_eddp_data(qhdr,
...@@ -473,7 +473,7 @@ static int qeth_eddp_fill_context_tcp(struct qeth_eddp_context *ctx, ...@@ -473,7 +473,7 @@ static int qeth_eddp_fill_context_tcp(struct qeth_eddp_context *ctx,
tcp_hdrlen(skb)); tcp_hdrlen(skb));
if (eddp == NULL) { if (eddp == NULL) {
QETH_DBF_TEXT(trace, 2, "eddpfcnm"); QETH_DBF_TEXT(TRACE, 2, "eddpfcnm");
return -ENOMEM; return -ENOMEM;
} }
if (qhdr->hdr.l2.id == QETH_HEADER_TYPE_LAYER2) { if (qhdr->hdr.l2.id == QETH_HEADER_TYPE_LAYER2) {
...@@ -499,7 +499,7 @@ static void qeth_eddp_calc_num_pages(struct qeth_eddp_context *ctx, ...@@ -499,7 +499,7 @@ static void qeth_eddp_calc_num_pages(struct qeth_eddp_context *ctx,
{ {
int skbs_per_page; int skbs_per_page;
QETH_DBF_TEXT(trace, 5, "eddpcanp"); QETH_DBF_TEXT(TRACE, 5, "eddpcanp");
/* can we put multiple skbs in one page? */ /* can we put multiple skbs in one page? */
skbs_per_page = PAGE_SIZE / (skb_shinfo(skb)->gso_size + hdr_len); skbs_per_page = PAGE_SIZE / (skb_shinfo(skb)->gso_size + hdr_len);
if (skbs_per_page > 1) { if (skbs_per_page > 1) {
...@@ -524,30 +524,30 @@ static struct qeth_eddp_context *qeth_eddp_create_context_generic( ...@@ -524,30 +524,30 @@ static struct qeth_eddp_context *qeth_eddp_create_context_generic(
u8 *addr; u8 *addr;
int i; int i;
QETH_DBF_TEXT(trace, 5, "creddpcg"); QETH_DBF_TEXT(TRACE, 5, "creddpcg");
/* create the context and allocate pages */ /* create the context and allocate pages */
ctx = kzalloc(sizeof(struct qeth_eddp_context), GFP_ATOMIC); ctx = kzalloc(sizeof(struct qeth_eddp_context), GFP_ATOMIC);
if (ctx == NULL) { if (ctx == NULL) {
QETH_DBF_TEXT(trace, 2, "ceddpcn1"); QETH_DBF_TEXT(TRACE, 2, "ceddpcn1");
return NULL; return NULL;
} }
ctx->type = QETH_LARGE_SEND_EDDP; ctx->type = QETH_LARGE_SEND_EDDP;
qeth_eddp_calc_num_pages(ctx, skb, hdr_len); qeth_eddp_calc_num_pages(ctx, skb, hdr_len);
if (ctx->elements_per_skb > QETH_MAX_BUFFER_ELEMENTS(card)) { if (ctx->elements_per_skb > QETH_MAX_BUFFER_ELEMENTS(card)) {
QETH_DBF_TEXT(trace, 2, "ceddpcis"); QETH_DBF_TEXT(TRACE, 2, "ceddpcis");
kfree(ctx); kfree(ctx);
return NULL; return NULL;
} }
ctx->pages = kcalloc(ctx->num_pages, sizeof(u8 *), GFP_ATOMIC); ctx->pages = kcalloc(ctx->num_pages, sizeof(u8 *), GFP_ATOMIC);
if (ctx->pages == NULL) { if (ctx->pages == NULL) {
QETH_DBF_TEXT(trace, 2, "ceddpcn2"); QETH_DBF_TEXT(TRACE, 2, "ceddpcn2");
kfree(ctx); kfree(ctx);
return NULL; return NULL;
} }
for (i = 0; i < ctx->num_pages; ++i) { for (i = 0; i < ctx->num_pages; ++i) {
addr = (u8 *)get_zeroed_page(GFP_ATOMIC); addr = (u8 *)get_zeroed_page(GFP_ATOMIC);
if (addr == NULL) { if (addr == NULL) {
QETH_DBF_TEXT(trace, 2, "ceddpcn3"); QETH_DBF_TEXT(TRACE, 2, "ceddpcn3");
ctx->num_pages = i; ctx->num_pages = i;
qeth_eddp_free_context(ctx); qeth_eddp_free_context(ctx);
return NULL; return NULL;
...@@ -557,7 +557,7 @@ static struct qeth_eddp_context *qeth_eddp_create_context_generic( ...@@ -557,7 +557,7 @@ static struct qeth_eddp_context *qeth_eddp_create_context_generic(
ctx->elements = kcalloc(ctx->num_elements, ctx->elements = kcalloc(ctx->num_elements,
sizeof(struct qeth_eddp_element), GFP_ATOMIC); sizeof(struct qeth_eddp_element), GFP_ATOMIC);
if (ctx->elements == NULL) { if (ctx->elements == NULL) {
QETH_DBF_TEXT(trace, 2, "ceddpcn4"); QETH_DBF_TEXT(TRACE, 2, "ceddpcn4");
qeth_eddp_free_context(ctx); qeth_eddp_free_context(ctx);
return NULL; return NULL;
} }
...@@ -573,7 +573,7 @@ static struct qeth_eddp_context *qeth_eddp_create_context_tcp( ...@@ -573,7 +573,7 @@ static struct qeth_eddp_context *qeth_eddp_create_context_tcp(
{ {
struct qeth_eddp_context *ctx = NULL; struct qeth_eddp_context *ctx = NULL;
QETH_DBF_TEXT(trace, 5, "creddpct"); QETH_DBF_TEXT(TRACE, 5, "creddpct");
if (skb->protocol == htons(ETH_P_IP)) if (skb->protocol == htons(ETH_P_IP))
ctx = qeth_eddp_create_context_generic(card, skb, ctx = qeth_eddp_create_context_generic(card, skb,
(sizeof(struct qeth_hdr) + (sizeof(struct qeth_hdr) +
...@@ -584,14 +584,14 @@ static struct qeth_eddp_context *qeth_eddp_create_context_tcp( ...@@ -584,14 +584,14 @@ static struct qeth_eddp_context *qeth_eddp_create_context_tcp(
sizeof(struct qeth_hdr) + sizeof(struct ipv6hdr) + sizeof(struct qeth_hdr) + sizeof(struct ipv6hdr) +
tcp_hdrlen(skb)); tcp_hdrlen(skb));
else else
QETH_DBF_TEXT(trace, 2, "cetcpinv"); QETH_DBF_TEXT(TRACE, 2, "cetcpinv");
if (ctx == NULL) { if (ctx == NULL) {
QETH_DBF_TEXT(trace, 2, "creddpnl"); QETH_DBF_TEXT(TRACE, 2, "creddpnl");
return NULL; return NULL;
} }
if (qeth_eddp_fill_context_tcp(ctx, skb, qhdr)) { if (qeth_eddp_fill_context_tcp(ctx, skb, qhdr)) {
QETH_DBF_TEXT(trace, 2, "ceddptfe"); QETH_DBF_TEXT(TRACE, 2, "ceddptfe");
qeth_eddp_free_context(ctx); qeth_eddp_free_context(ctx);
return NULL; return NULL;
} }
...@@ -603,12 +603,12 @@ struct qeth_eddp_context *qeth_eddp_create_context(struct qeth_card *card, ...@@ -603,12 +603,12 @@ struct qeth_eddp_context *qeth_eddp_create_context(struct qeth_card *card,
struct sk_buff *skb, struct qeth_hdr *qhdr, struct sk_buff *skb, struct qeth_hdr *qhdr,
unsigned char sk_protocol) unsigned char sk_protocol)
{ {
QETH_DBF_TEXT(trace, 5, "creddpc"); QETH_DBF_TEXT(TRACE, 5, "creddpc");
switch (sk_protocol) { switch (sk_protocol) {
case IPPROTO_TCP: case IPPROTO_TCP:
return qeth_eddp_create_context_tcp(card, skb, qhdr); return qeth_eddp_create_context_tcp(card, skb, qhdr);
default: default:
QETH_DBF_TEXT(trace, 2, "eddpinvp"); QETH_DBF_TEXT(TRACE, 2, "eddpinvp");
} }
return NULL; return NULL;
} }
...@@ -622,7 +622,7 @@ void qeth_tso_fill_header(struct qeth_card *card, struct qeth_hdr *qhdr, ...@@ -622,7 +622,7 @@ void qeth_tso_fill_header(struct qeth_card *card, struct qeth_hdr *qhdr,
struct iphdr *iph = ip_hdr(skb); struct iphdr *iph = ip_hdr(skb);
struct ipv6hdr *ip6h = ipv6_hdr(skb); struct ipv6hdr *ip6h = ipv6_hdr(skb);
QETH_DBF_TEXT(trace, 5, "tsofhdr"); QETH_DBF_TEXT(TRACE, 5, "tsofhdr");
/*fix header to TSO values ...*/ /*fix header to TSO values ...*/
hdr->hdr.hdr.l3.id = QETH_HEADER_TYPE_TSO; hdr->hdr.hdr.l3.id = QETH_HEADER_TYPE_TSO;
......
This diff is collapsed.
...@@ -13,16 +13,7 @@ ...@@ -13,16 +13,7 @@
#include "qeth_core.h" #include "qeth_core.h"
#define QETH_DBF_TEXT_(name, level, text...) \ #define QETH_DBF_TXT_BUF qeth_l3_dbf_txt_buf
do { \
if (qeth_dbf_passes(qeth_dbf_##name, level)) { \
char *dbf_txt_buf = get_cpu_var(qeth_l3_dbf_txt_buf); \
sprintf(dbf_txt_buf, text); \
debug_text_event(qeth_dbf_##name, level, dbf_txt_buf); \
put_cpu_var(qeth_l3_dbf_txt_buf); \
} \
} while (0)
DECLARE_PER_CPU(char[256], qeth_l3_dbf_txt_buf); DECLARE_PER_CPU(char[256], qeth_l3_dbf_txt_buf);
struct qeth_ipaddr { struct qeth_ipaddr {
......
This diff is collapsed.
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment