left = count;
pos = rxd->data;
- for (i = 0; i < m->DL_COUNT && left > 0; i += batch) {
+ for (i = 0; i < m->m_net_netdrv_dl_readv_s.count && left > 0; i += batch) {
/* Copy in the next batch. */
- batch = MIN(m->DL_COUNT - i, NR_IOREQS);
+ batch = MIN(m->m_net_netdrv_dl_readv_s.count - i, NR_IOREQS);
- r = sys_safecopyfrom(m->m_source, m->DL_GRANT, off,
- (vir_bytes) iovec, batch * sizeof(iovec[0]));
+ r = sys_safecopyfrom(m->m_source,
+ m->m_net_netdrv_dl_readv_s.grant, off, (vir_bytes) iovec,
+ batch * sizeof(iovec[0]));
if (r != OK)
panic("vector copy failed: %d", r);
pos = (state.txd_tail + state.txd_num +
sizeof(u32_t)) % ATL2_TXD_BUFSIZE;
- for (i = 0; i < m->DL_COUNT; i += batch) {
+ for (i = 0; i < m->m_net_netdrv_dl_writev_s.count; i += batch) {
/* Copy in the next batch. */
- batch = MIN(m->DL_COUNT - i, NR_IOREQS);
+ batch = MIN(m->m_net_netdrv_dl_writev_s.count - i, NR_IOREQS);
- r = sys_safecopyfrom(m->m_source, m->DL_GRANT, off,
- (vir_bytes) iovec, batch * sizeof(iovec[0]));
+ r = sys_safecopyfrom(m->m_source,
+ m->m_net_netdrv_dl_writev_s.grant, off, (vir_bytes) iovec,
+ batch * sizeof(iovec[0]));
if (r != OK)
panic("vector copy failed: %d", r);
client layer
*/
dep->de_read_iovec.iod_proc_nr = mp->m_source;
- de_get_userdata_s(mp->m_source, (cp_grant_id_t) mp->DL_GRANT, 0,
- mp->DL_COUNT, dep->de_read_iovec.iod_iovec);
- dep->de_read_iovec.iod_iovec_s = mp->DL_COUNT;
- dep->de_read_iovec.iod_grant = (cp_grant_id_t) mp->DL_GRANT;
+ de_get_userdata_s(mp->m_source, mp->m_net_netdrv_dl_readv_s.grant, 0,
+ mp->m_net_netdrv_dl_readv_s.count,
+ dep->de_read_iovec.iod_iovec);
+ dep->de_read_iovec.iod_iovec_s = mp->m_net_netdrv_dl_readv_s.count;
+ dep->de_read_iovec.iod_grant = mp->m_net_netdrv_dl_readv_s.grant;
dep->de_read_iovec.iod_iovec_offset = 0;
size = de_calc_iov_size(&dep->de_read_iovec);
if (size < ETH_MAX_PACK_SIZE)
buffer = descr->buf1;
iovp = &dep->de_write_iovec;
iovp->iod_proc_nr = mp->m_source;
- de_get_userdata_s(mp->m_source, mp->DL_GRANT, 0,
- mp->DL_COUNT, iovp->iod_iovec);
- iovp->iod_iovec_s = mp->DL_COUNT;
- iovp->iod_grant = (cp_grant_id_t) mp->DL_GRANT;
+ de_get_userdata_s(mp->m_source, mp->m_net_netdrv_dl_writev_s.grant, 0,
+ mp->m_net_netdrv_dl_writev_s.count, iovp->iod_iovec);
+ iovp->iod_iovec_s = mp->m_net_netdrv_dl_writev_s.count;
+ iovp->iod_grant = mp->m_net_netdrv_dl_writev_s.grant;
iovp->iod_iovec_offset = 0;
totalsize = size = de_calc_iov_size(iovp);
if (size < ETH_MIN_PACK_SIZE || size > ETH_MAX_PACK_SIZE)
dep= &de_state;
- count = mp->DL_COUNT;
+ count = mp->m_net_netdrv_dl_writev_s.count;
dep->de_client= mp->m_source;
if (dep->de_mode == DEM_SINK)
}
assert(!(dep->de_flags & DEF_PACK_SEND));
- get_userdata_s(mp->m_source, mp->DL_GRANT, 0,
+ get_userdata_s(mp->m_source, mp->m_net_netdrv_dl_writev_s.grant, 0,
(count > IOVEC_NR ? IOVEC_NR : count) *
sizeof(dep->de_write_iovec_s.iod_iovec[0]),
dep->de_write_iovec_s.iod_iovec);
dep->de_write_iovec_s.iod_iovec_s = count;
dep->de_write_iovec_s.iod_proc_nr = mp->m_source;
- dep->de_write_iovec_s.iod_grant = mp->DL_GRANT;
+ dep->de_write_iovec_s.iod_grant = mp->m_net_netdrv_dl_writev_s.grant;
dep->de_write_iovec_s.iod_iovec_offset = 0;
dep->de_tmp_iovec_s = dep->de_write_iovec_s;
dep= &de_state;
- count = mp->DL_COUNT;
+ count = mp->m_net_netdrv_dl_readv_s.count;
dep->de_client= mp->m_source;
if (dep->de_mode == DEM_SINK)
{
if(dep->de_flags & DEF_READING)
panic("dp8390: read already in progress");
- get_userdata_s(mp->m_source, mp->DL_GRANT, 0,
+ get_userdata_s(mp->m_source, mp->m_net_netdrv_dl_readv_s.grant, 0,
(count > IOVEC_NR ? IOVEC_NR : count) *
sizeof(dep->de_read_iovec_s.iod_iovec[0]),
dep->de_read_iovec_s.iod_iovec);
dep->de_read_iovec_s.iod_iovec_s = count;
dep->de_read_iovec_s.iod_proc_nr = mp->m_source;
- dep->de_read_iovec_s.iod_grant = mp->DL_GRANT;
+ dep->de_read_iovec_s.iod_grant = mp->m_net_netdrv_dl_readv_s.grant;
dep->de_read_iovec_s.iod_iovec_offset = 0;
dep->de_tmp_iovec_s = dep->de_read_iovec_s;
panic("send already in progress ");
dep->de_write_iovec.iod_proc_nr = mp->m_source;
- get_userdata_s(mp->m_source, mp->DL_GRANT, 0,
- mp->DL_COUNT, dep->de_write_iovec.iod_iovec);
- dep->de_write_iovec.iod_iovec_s = mp->DL_COUNT;
- dep->de_write_iovec.iod_grant = (cp_grant_id_t) mp->DL_GRANT;
+ get_userdata_s(mp->m_source, mp->m_net_netdrv_dl_writev_s.grant, 0,
+ mp->m_net_netdrv_dl_writev_s.count, dep->de_write_iovec.iod_iovec);
+ dep->de_write_iovec.iod_iovec_s = mp->m_net_netdrv_dl_writev_s.count;
+ dep->de_write_iovec.iod_grant = mp->m_net_netdrv_dl_writev_s.grant;
dep->de_write_iovec.iod_iovec_offset = 0;
size = calc_iovec_size(&dep->de_write_iovec);
if (size < ETH_MIN_PACK_SIZE || size > ETH_MAX_PACK_SIZE)
panic("read already in progress");
dep->de_read_iovec.iod_proc_nr = mp->m_source;
- get_userdata_s(mp->m_source, (cp_grant_id_t) mp->DL_GRANT, 0,
- mp->DL_COUNT, dep->de_read_iovec.iod_iovec);
- dep->de_read_iovec.iod_iovec_s = mp->DL_COUNT;
- dep->de_read_iovec.iod_grant = (cp_grant_id_t) mp->DL_GRANT;
+ get_userdata_s(mp->m_source, mp->m_net_netdrv_dl_readv_s.grant, 0,
+ mp->m_net_netdrv_dl_readv_s.count, dep->de_read_iovec.iod_iovec);
+ dep->de_read_iovec.iod_iovec_s = mp->m_net_netdrv_dl_readv_s.count;
+ dep->de_read_iovec.iod_grant = mp->m_net_netdrv_dl_readv_s.grant;
dep->de_read_iovec.iod_iovec_offset = 0;
size = calc_iovec_size(&dep->de_read_iovec);
if (size < ETH_MAX_PACK_SIZE) panic(SizeErrMsg, size);
e->status |= E1000_WRITING;
/* Must be a sane vector count. */
- assert(e->tx_message.DL_COUNT > 0);
- assert(e->tx_message.DL_COUNT < E1000_IOVEC_NR);
+ assert(e->tx_message.m_net_netdrv_dl_writev_s.count > 0);
+ assert(e->tx_message.m_net_netdrv_dl_writev_s.count < E1000_IOVEC_NR);
/*
* Copy the I/O vector table.
*/
if ((r = sys_safecopyfrom(e->tx_message.m_source,
- e->tx_message.DL_GRANT, 0,
- (vir_bytes) iovec, e->tx_message.DL_COUNT *
+ e->tx_message.m_net_netdrv_dl_writev_s.grant, 0,
+ (vir_bytes) iovec,
+ e->tx_message.m_net_netdrv_dl_writev_s.count *
sizeof(iovec_s_t))) != OK)
{
panic("sys_safecopyfrom() failed: %d", r);
e->name, head, tail));
/* Loop vector elements. */
- for (i = 0; i < e->tx_message.DL_COUNT; i++)
+ for (i = 0; i < e->tx_message.m_net_netdrv_dl_writev_s.count; i++)
{
size = iovec[i].iov_size < (E1000_IOBUF_SIZE - bytes) ?
iovec[i].iov_size : (E1000_IOBUF_SIZE - bytes);
desc->length = size;
/* Marks End-of-Packet. */
- if (i == e->tx_message.DL_COUNT - 1)
+ if (i == e->tx_message.m_net_netdrv_dl_writev_s.count - 1)
{
desc->command = E1000_TX_CMD_EOP |
E1000_TX_CMD_FCS |
e->status |= E1000_READING;
e->rx_size = 0;
- assert(e->rx_message.DL_COUNT > 0);
- assert(e->rx_message.DL_COUNT < E1000_IOVEC_NR);
+ assert(e->rx_message.m_net_netdrv_dl_readv_s.count > 0);
+ assert(e->rx_message.m_net_netdrv_dl_readv_s.count < E1000_IOVEC_NR);
}
if (e->status & E1000_READING)
{
* Copy the I/O vector table first.
*/
if ((r = sys_safecopyfrom(e->rx_message.m_source,
- e->rx_message.DL_GRANT, 0,
- (vir_bytes) iovec, e->rx_message.DL_COUNT *
+ e->rx_message.m_net_netdrv_dl_readv_s.grant, 0,
+ (vir_bytes) iovec,
+ e->rx_message.m_net_netdrv_dl_readv_s.count *
sizeof(iovec_s_t))) != OK)
{
panic("sys_safecopyfrom() failed: %d", r);
/*
* Copy to vector elements.
*/
- for (i = 0; i < e->rx_message.DL_COUNT && bytes < desc->length; i++)
+ for (i = 0; i < e->rx_message.m_net_netdrv_dl_readv_s.count &&
+ bytes < desc->length; i++)
{
size = iovec[i].iov_size < (desc->length - bytes) ?
iovec[i].iov_size : (desc->length - bytes);
fp= fxp_state;
- count = mp->DL_COUNT;
+ count = mp->m_net_netdrv_dl_writev_s.count;
fp->fxp_client= mp->m_source;
assert(fp->fxp_mode == FM_ENABLED);
assert(!(fp->fxp_flags & FF_PACK_SENT));
iov_endpt= mp->m_source;
- iov_grant= mp->DL_GRANT;
+ iov_grant= mp->m_net_netdrv_dl_writev_s.grant;
size= 0;
o= 0;
fp= fxp_state;
- count = mp->DL_COUNT;
+ count = mp->m_net_netdrv_dl_readv_s.count;
fp->fxp_client= mp->m_source;
assert(fp->fxp_mode == FM_ENABLED);
packlen= rfd_res & RFDSZ_SIZE;
iov_endpt = mp->m_source;
- iov_grant = mp->DL_GRANT;
+ iov_grant = mp->m_net_netdrv_dl_readv_s.grant;
size= 0;
o= 0;
reply.m_type = DL_CONF_REPLY;
reply.m_netdrv_net_dl_conf.stat = OK;
memcpy(reply.m_netdrv_net_dl_conf.hw_addr,
- lan8710a_state.address,
+ lan8710a_state.address.ea_addr,
sizeof(reply.m_netdrv_net_dl_conf.hw_addr));
mess_reply(m, &reply);
}
e->status |= LAN8710A_WRITING;
/* verify vector count */
- assert(mp->DL_COUNT > 0);
- assert(mp->DL_COUNT < LAN8710A_IOVEC_NR);
+ assert(mp->m_net_netdrv_dl_writev_s.count > 0);
+ assert(mp->m_net_netdrv_dl_writev_s.count < LAN8710A_IOVEC_NR);
/*
* Copy the I/O vector table.
*/
- if ((r = sys_safecopyfrom(mp->m_source, mp->DL_GRANT, 0,
+ if ((r = sys_safecopyfrom(mp->m_source,
+ mp->m_net_netdrv_dl_writev_s.grant, 0,
(vir_bytes) iovec,
- mp->DL_COUNT * sizeof(iovec_s_t))) != OK) {
+ mp->m_net_netdrv_dl_writev_s.count *
+ sizeof(iovec_s_t))) != OK) {
panic("sys_safecopyfrom() failed: %d", r);
}
/* setup descriptors */
/* virtual address of buffer */
p_buf = e->p_tx_buf + e->tx_desc_idx * LAN8710A_IOBUF_SIZE;
buf_data_len = 0;
- for (i = 0; i < mp->DL_COUNT; i++) {
+ for (i = 0; i < mp->m_net_netdrv_dl_writev_s.count; i++) {
if ((buf_data_len + iovec[i].iov_size)
> LAN8710A_IOBUF_SIZE) {
panic("packet too long");
e->status |= LAN8710A_READING;
e->rx_size = 0;
- assert(e->rx_message.DL_COUNT > 0);
- assert(e->rx_message.DL_COUNT < LAN8710A_IOVEC_NR);
+ assert(e->rx_message.m_net_netdrv_dl_readv_s.count > 0);
+ assert(e->rx_message.m_net_netdrv_dl_readv_s.count < LAN8710A_IOVEC_NR);
}
if (e->status & LAN8710A_READING) {
/*
* Copy the I/O vector table first.
*/
if ((r = sys_safecopyfrom(e->rx_message.m_source,
- e->rx_message.DL_GRANT, 0, (vir_bytes) iovec,
- e->rx_message.DL_COUNT *
+ e->rx_message.m_net_netdrv_dl_readv_s.grant, 0,
+ (vir_bytes) iovec,
+ e->rx_message.m_net_netdrv_dl_readv_s.count *
sizeof(iovec_s_t))) != OK) {
panic("sys_safecopyfrom() failed: %d", r);
}
pkt_data_len = 0;
buf_bytes = 0;
p_buf = e->p_rx_buf + e->rx_desc_idx * LAN8710A_IOBUF_SIZE;
- for (i = 0; i < e->rx_message.DL_COUNT; i++) {
+ for (i = 0; i < e->rx_message.m_net_netdrv_dl_readv_s.count; i++) {
buf_len = p_rx_desc->buffer_length_off & 0xFFFF;
if (buf_bytes == buf_len) {
/* Whole buffer move to the next descriptor */
ec= &ec_state;
ec->client= mp->m_source;
- count = mp->DL_COUNT;
+ count = mp->m_net_netdrv_dl_readv_s.count;
- r = sys_safecopyfrom(mp->m_source, mp->DL_GRANT, 0,
+ r = sys_safecopyfrom(mp->m_source, mp->m_net_netdrv_dl_readv_s.grant, 0,
(vir_bytes)ec->read_iovec.iod_iovec,
(count > IOVEC_NR ? IOVEC_NR : count) *
sizeof(iovec_s_t));
panic("do_vread_s: sys_safecopyfrom failed: %d", r);
ec->read_iovec.iod_iovec_s = count;
ec->read_iovec.iod_proc_nr = mp->m_source;
- ec->read_iovec.iod_grant = (cp_grant_id_t) mp->DL_GRANT;
+ ec->read_iovec.iod_grant = mp->m_net_netdrv_dl_readv_s.grant;
ec->read_iovec.iod_iovec_offset = 0;
ec->tmp_iovec = ec->read_iovec;
ec = &ec_state;
ec->client= mp->m_source;
- count = mp->DL_COUNT;
+ count = mp->m_net_netdrv_dl_writev_s.count;
if (isstored[tx_slot_nr]==1)
{
}
/* convert the message to write_iovec */
- r = sys_safecopyfrom(mp->m_source, mp->DL_GRANT, 0,
+ r = sys_safecopyfrom(mp->m_source, mp->m_net_netdrv_dl_writev_s.grant, 0,
(vir_bytes)ec->write_iovec.iod_iovec,
(count > IOVEC_NR ? IOVEC_NR : count) *
sizeof(iovec_s_t));
panic("do_vwrite_s: sys_safecopyfrom failed: %d", r);
ec->write_iovec.iod_iovec_s = count;
ec->write_iovec.iod_proc_nr = mp->m_source;
- ec->write_iovec.iod_grant = mp->DL_GRANT;
+ ec->write_iovec.iod_grant = mp->m_net_netdrv_dl_writev_s.grant;
ec->write_iovec.iod_iovec_offset = 0;
ec->tmp_iovec = ec->write_iovec;
orp = &or_state;
- count = mp->DL_COUNT;
+ count = mp->m_net_netdrv_dl_writev_s.count;
orp->or_client = mp->m_source;
hw = &(orp->hw);
if (i + n > count)
n = count - i;
- cps = sys_safecopyfrom(mp->m_source, mp->DL_GRANT, iov_offset,
+ cps = sys_safecopyfrom(mp->m_source,
+ mp->m_net_netdrv_dl_writev_s.grant, iov_offset,
(vir_bytes) orp->or_iovec_s,
n * sizeof(orp->or_iovec_s[0]));
if (cps != OK)
orp = &or_state;
orp->or_client = mp->m_source;
- count = mp->DL_COUNT;
+ count = mp->m_net_netdrv_dl_readv_s.count;
assert (orp->or_mode == OR_M_ENABLED);
assert (orp->or_flags & OR_F_ENABLED);
if (i + n > count)
n = count - i;
- cps = sys_safecopyfrom(mp->m_source, mp->DL_GRANT, iov_offset,
+ cps = sys_safecopyfrom(mp->m_source,
+ mp->m_net_netdrv_dl_readv_s.grant, iov_offset,
(vir_bytes)orp->or_iovec_s,
n * sizeof(orp->or_iovec_s[0]));
if (cps != OK)
rep= &re_state;
rep->re_client= mp->m_source;
- count = mp->DL_COUNT;
+ count = mp->m_net_netdrv_dl_readv_s.count;
if (rep->re_clear_rx)
goto suspend; /* Buffer overflow */
if (i+n > count)
n= count-i;
- cps = sys_safecopyfrom(mp->m_source, mp->DL_GRANT, iov_offset,
+ cps = sys_safecopyfrom(mp->m_source,
+ mp->m_net_netdrv_dl_readv_s.grant, iov_offset,
(vir_bytes) rep->re_iovec_s,
n * sizeof(rep->re_iovec_s[0]));
if (cps != OK) {
rep= &re_state;
rep->re_client= mp->m_source;
- count = mp->DL_COUNT;
+ count = mp->m_net_netdrv_dl_writev_s.count;
assert(rep->re_mode == REM_ENABLED);
assert(rep->re_flags & REF_ENABLED);
n= IOVEC_NR;
if (i+n > count)
n= count-i;
- cps = sys_safecopyfrom(mp->m_source, mp->DL_GRANT, iov_offset,
+ cps = sys_safecopyfrom(mp->m_source,
+ mp->m_net_netdrv_dl_writev_s.grant, iov_offset,
(vir_bytes) rep->re_iovec_s,
n * sizeof(rep->re_iovec_s[0]));
if (cps != OK) {
rep = &re_state;
rep->re_client = mp->m_source;
- count = mp->DL_COUNT;
+ count = mp->m_net_netdrv_dl_readv_s.count;
assert(rep->re_mode == REM_ENABLED);
assert(rep->re_flags & REF_ENABLED);
n = IOVEC_NR;
if (i + n > count)
n = count-i;
- cps = sys_safecopyfrom(mp->m_source, mp->DL_GRANT, iov_offset,
+ cps = sys_safecopyfrom(mp->m_source,
+ mp->m_net_netdrv_dl_readv_s.grant, iov_offset,
(vir_bytes) rep->re_iovec_s,
n * sizeof(rep->re_iovec_s[0]));
if (cps != OK) {
rep = &re_state;
rep->re_client = mp->m_source;
- count = mp->DL_COUNT;
+ count = mp->m_net_netdrv_dl_writev_s.count;
assert(rep->setup);
assert(rep->re_mode == REM_ENABLED);
n = IOVEC_NR;
if (i + n > count)
n = count - i;
- cps = sys_safecopyfrom(mp->m_source, mp->DL_GRANT, iov_offset,
+ cps = sys_safecopyfrom(mp->m_source,
+ mp->m_net_netdrv_dl_writev_s.grant, iov_offset,
(vir_bytes) rep->re_iovec_s,
n * sizeof(rep->re_iovec_s[0]));
if (cps != OK) {
static void virtio_net_check_queues(void);
static void virtio_net_check_pending(void);
-static void virtio_net_fetch_iovec(iovec_s_t *iov, message *m);
+static void virtio_net_fetch_iovec(iovec_s_t *iov, message *m,
+ cp_grant_id_t grant, size_t count);
static int virtio_net_cpy_to_user(message *m);
static int virtio_net_cpy_from_user(message *m);
}
static void
-virtio_net_fetch_iovec(iovec_s_t *iov, message *m)
+virtio_net_fetch_iovec(iovec_s_t *iov, message *m, cp_grant_id_t grant, size_t count)
{
int r;
- r = sys_safecopyfrom(m->m_source, m->DL_GRANT, 0, (vir_bytes)iov,
- m->DL_COUNT * sizeof(iov[0]));
+ r = sys_safecopyfrom(m->m_source, grant, 0, (vir_bytes)iov,
+ count * sizeof(iov[0]));
if (r != OK)
panic("%s: iovec fail for %d (%d)", name, m->m_source, r);
p = STAILQ_FIRST(&recv_list);
STAILQ_REMOVE_HEAD(&recv_list, next);
- virtio_net_fetch_iovec(iovec, m);
+ virtio_net_fetch_iovec(iovec, m, m->m_net_netdrv_dl_readv_s.grant,
+ m->m_net_netdrv_dl_readv_s.count);
- for (i = 0; i < m->DL_COUNT && left > 0; i++) {
+ for (i = 0; i < m->m_net_netdrv_dl_readv_s.count && left > 0; i++) {
ivsz = iovec[i].iov_size;
size = left > ivsz ? ivsz : left;
r = sys_safecopyto(m->m_source, iovec[i].iov_grant, 0,
p = STAILQ_FIRST(&free_list);
STAILQ_REMOVE_HEAD(&free_list, next);
- virtio_net_fetch_iovec(iovec, m);
+ virtio_net_fetch_iovec(iovec, m, m->m_net_netdrv_dl_writev_s.grant,
+ m->m_net_netdrv_dl_writev_s.count);
- r = sys_easy_vsafecopy_from(m->m_source, iovec, m->DL_COUNT,
- (vir_bytes)p->vdata, MAX_PACK_SIZE,
- &bytes);
+ r = sys_easy_vsafecopy_from(m->m_source, iovec,
+ m->m_net_netdrv_dl_writev_s.count, (vir_bytes)p->vdata,
+ MAX_PACK_SIZE, &bytes);
if (r != OK)
panic("%s: copy from %d failed", name, m->m_source);
#define DL_STAT_REPLY (DL_RS_BASE + 1)
#define DL_TASK_REPLY (DL_RS_BASE + 2)
-/* Field names for data link layer messages. */
-#define DL_COUNT m2_i3
-#define DL_GRANT m2_l2
-
/* Bits in 'flags' field of DL replies. */
# define DL_NOFLAGS 0x00
# define DL_PACK_SEND 0x01
} mess_net_netdrv_dl_getstat_s;
_ASSERT_MSG_SIZE(mess_net_netdrv_dl_getstat_s);
+typedef struct {
+ cp_grant_id_t grant;
+ int count;
+
+ uint8_t padding[48];
+} mess_net_netdrv_dl_readv_s;
+_ASSERT_MSG_SIZE(mess_net_netdrv_dl_readv_s);
+
+typedef struct {
+ cp_grant_id_t grant;
+ int count;
+
+ uint8_t padding[48];
+} mess_net_netdrv_dl_writev_s;
+_ASSERT_MSG_SIZE(mess_net_netdrv_dl_writev_s);
+
typedef struct {
int count;
uint32_t flags;
mess_net_netdrv_dl_conf m_net_netdrv_dl_conf;
mess_net_netdrv_dl_getstat_s m_net_netdrv_dl_getstat_s;
+ mess_net_netdrv_dl_readv_s m_net_netdrv_dl_readv_s;
+ mess_net_netdrv_dl_writev_s m_net_netdrv_dl_writev_s;
mess_netdrv_net_dl_conf m_netdrv_net_dl_conf;
mess_netdrv_net_dl_task m_netdrv_net_dl_task;
errno));
}
m.m_type= DL_WRITEV_S;
- m.DL_COUNT= i;
- m.DL_GRANT= eth_port->etp_osdep.etp_wr_vec_grant;
+ m.m_net_netdrv_dl_writev_s.count= i;
+ m.m_net_netdrv_dl_writev_s.grant= eth_port->etp_osdep.etp_wr_vec_grant;
assert(eth_port->etp_osdep.etp_state == OEPS_IDLE);
r= asynsend(eth_port->etp_osdep.etp_task, &m);
}
mess.m_type= DL_READV_S;
- mess.DL_COUNT= i;
- mess.DL_GRANT= eth_port->etp_osdep.etp_rd_vec_grant;
+ mess.m_net_netdrv_dl_readv_s.count= i;
+ mess.m_net_netdrv_dl_readv_s.grant= eth_port->etp_osdep.etp_rd_vec_grant;
assert(eth_port->etp_osdep.etp_state == OEPS_IDLE);
nic->rx_iovec[0].iov_size = nic->rx_pbuf->len;
m.m_type = DL_READV_S;
- m.DL_COUNT = 1;
- m.DL_GRANT = nic->rx_iogrant;
+ m.m_net_netdrv_dl_readv_s.count = 1;
+ m.m_net_netdrv_dl_readv_s.grant = nic->rx_iogrant;
if (asynsend(nic->drv_ep, &m) != OK)
panic("asynsend to the driver failed!");
panic("Failed to set grant");
m.m_type = DL_WRITEV_S;
- m.DL_COUNT = 1;
- m.DL_GRANT = nic->tx_iogrant;
+ m.m_net_netdrv_dl_writev_s.count = 1;
+ m.m_net_netdrv_dl_writev_s.grant = nic->tx_iogrant;
if (asynsend(nic->drv_ep, &m) != OK)
panic("asynsend to the driver failed!");