hxge_rxdma.c revision 57c5371a68b0454ec94109f38027ab6099bad130
3853N/A * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
3853N/A * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
3853N/A#include <hxge_impl.h>
3853N/A#include <hxge_rxdma.h>
3853N/A int n_init_kick);
3853N/A int n_init_kick)
3853N/A case RBR_BKSIZE_4K:
3853N/A case RBR_BKSIZE_8K:
3853N/Astatic hxge_status_t
3853N/A switch (pktbufsz_type) {
3853N/A case RCR_SINGLE_BLOCK:
3853N/A anchor_index = 0;
3853N/A return (HXGE_ERROR);
3853N/A anchor_index = 0;
3853N/A goto found_index;
3853N/A case BOTH_RIGHT:
3853N/A return (HXGE_ERROR);
3853N/A return (HXGE_ERROR);
#if defined(__i386)
offset);
return (HXGE_OK);
rxbuf_index_info_t *a, *b;
int g, i, j, ii;
unsigned int tmp;
ASSERT(s > 0);
p1 = (unsigned *)(v + j * s);
p2 = (unsigned *)(v + (j + g) * s);
static hxge_status_t
int index;
max_iteration = 0;
return (HXGE_OK);
#ifdef HXGE_DEBUG
bptr,
int i, ndmas;
return (HXGE_ERROR);
return (HXGE_ERROR);
return (HXGE_ERROR);
if (!ndmas) {
return (HXGE_ERROR);
for (i = 0; i < ndmas; i++) {
if (enable) {
channel));
channel));
return (status);
int i, ndmas;
if (!ndmas) {
for (i = 0; i < ndmas; i++) {
static p_rx_msg_t
goto hxge_allocb_exit;
if (dmabuf_p) {
goto hxge_allocb_fail1;
goto hxge_allocb_fail2;
goto hxge_allocb_exit;
return (hxge_mp);
goto hxge_dupb_exit;
return (mp);
goto hxge_dupb_bcopy_exit;
return (mp);
int ref_cnt;
if (!ref_cnt) {
return (DDI_INTR_UNCLAIMED);
return (DDI_INTR_CLAIMED);
return (serviced);
#ifdef HXGE_DEBUG
mblk_t *
return (NULL);
return (NULL);
if (!qlen) {
return (NULL);
while (qlen_hw) {
#ifdef HXGE_DEBUG
invalid_rcr_entry = 0;
if (invalid_rcr_entry != 0) {
if (nmp) {
if (!multi) {
qlen_hw--;
npkt_read++;
nrcr_read++;
return (head_mp);
#if defined(__i386)
if (!l2_len) {
#if defined(__i386)
if (first_entry) {
switch (pktbufsz_type) {
case RCR_PKTBUFSZ_0:
case RCR_PKTBUFSZ_1:
case RCR_PKTBUFSZ_2:
case RCR_SINGLE_BLOCK:
pktbufsz_type))) {
bsize));
if (error_type) {
if (first_entry) {
if (first_entry) {
- skip_len];
if (first_entry) {
if (first_entry)
if (first_entry) {
if (is_valid) {
if (first_entry) {
static hxge_status_t
if (rxchan_fatal) {
channel));
return (status);
static hxge_status_t
int i, ndmas;
return (HXGE_ERROR);
if (!ndmas) {
return (HXGE_ERROR);
for (i = 0; i < ndmas; i++) {
num_chunks[i],
goto hxge_map_rxdma_fail1;
goto hxge_map_rxdma_exit;
return (status);
int i, ndmas;
if (!ndmas) {
for (i = 0; i < ndmas; i++) {
return (status);
static hxge_status_t
switch (hxge_rx_threshold_hi) {
case HXGE_RX_COPY_NONE:
case HXGE_RX_COPY_1:
case HXGE_RX_COPY_2:
case HXGE_RX_COPY_3:
case HXGE_RX_COPY_4:
case HXGE_RX_COPY_5:
case HXGE_RX_COPY_6:
case HXGE_RX_COPY_7:
case HXGE_RX_COPY_ALL:
switch (hxge_rx_threshold_lo) {
case HXGE_RX_COPY_NONE:
case HXGE_RX_COPY_1:
case HXGE_RX_COPY_2:
case HXGE_RX_COPY_3:
case HXGE_RX_COPY_4:
case HXGE_RX_COPY_5:
case HXGE_RX_COPY_6:
case HXGE_RX_COPY_7:
case HXGE_RX_COPY_ALL:
sizeof (rcr_entry_t));
#if defined(__i386)
return (status);
static hxge_status_t
int i, j, index;
nmsgs = 0;
if (!nmsgs) {
KM_SLEEP);
case RBR_BKSIZE_4K:
case RBR_BKSIZE_8K:
index = 0;
#if defined(__i386)
#if defined(__i386)
for (j = 0; j < nblocks; j++) {
index, i, j));
index++;
index--;
return (status);
static hxge_status_t
return (status);
static hxge_status_t
int i, ndmas;
return (HXGE_ERROR);
if (ndmas == 0) {
return (HXGE_ERROR);
if (rx_mbox_areas_p) {
for (i = 0; i < ndmas; i++) {
goto hxge_rxdma_hw_start_exit;
return (status);
int i, ndmas;
if (!ndmas) {
for (i = 0; i < ndmas; i++) {
static hxge_status_t
int n_init_kick)
return (status);
return (status);
return (status);
return (HXGE_OK);
static hxge_status_t
return (status);
return (status);
return (HXGE_OK);
return (HXGE_OK);
static hxge_status_t
int ring_idx;
int n_init_kick = 0;
goto fail;
goto fail;
#if defined(__i386)
n_init_kick++;
goto fail;
return (HXGE_OK);
fail:
static hxge_status_t
int ndmas;
goto fail;
goto fail;
for (i = 0; i < ndmas; i++) {
goto fail;
goto fail;
goto fail;
return (HXGE_OK);
fail:
return (status);
(void) hpi_vmac_rx_set_framesize(