Commit 764aae8e authored by Vikram Narayanan's avatar Vikram Narayanan
Browse files

lcd/nullnet: Fix offsets that need to be passed


Signed-off-by: Vikram Narayanan's avatarVikram Narayanan <vikram186@gmail.com>
parent 3e2e2974
......@@ -826,7 +826,7 @@ int ndo_start_xmit_callee(struct fipc_message *request, struct thc_channel *chan
unsigned long skb_ord, skb_off;
unsigned long skbd_ord, skbd_off;
gva_t skb_gva, skbd_gva;
unsigned int head_off;
unsigned int data_off;
request_cookie = thc_get_request_cookie(request);
ret = glue_cap_lookup_net_device_type(c_cspace, __cptr(fipc_get_reg1(request)), &net_dev_container);
......@@ -860,7 +860,7 @@ int ndo_start_xmit_callee(struct fipc_message *request, struct thc_channel *chan
skb_off = lcd_r1();
skbd_ord = lcd_r2();
skbd_off = lcd_r3();
head_off = lcd_r4();
data_off = lcd_r4();
sync_ret = lcd_map_virt(skb_cptr, skb_ord, &skb_gva);
if (sync_ret) {
......@@ -875,8 +875,8 @@ int ndo_start_xmit_callee(struct fipc_message *request, struct thc_channel *chan
}
skb = (void*)(gva_val(skb_gva) + skb_off);
skb->data = (void*)(gva_val(skbd_gva) + skbd_off);
skb->head = skb->data - head_off;
skb->head = (void*)(gva_val(skbd_gva) + skbd_off);
skb->data = skb->head + data_off;
ret = net_dev_container->net_device.netdev_ops->ndo_start_xmit(skb, &net_dev_container->net_device);
......
......@@ -416,9 +416,9 @@ int ndo_start_xmit_user(struct sk_buff *skb, struct net_device *dev, struct tram
net_dev_container = container_of(dev, struct net_device_container, net_device);
ret = sync_setup_memory(skb, skb->truesize, &skb_ord, &skb_cptr, &skb_off);
ret = sync_setup_memory(skb, sizeof(struct sk_buff), &skb_ord, &skb_cptr, &skb_off);
ret = sync_setup_memory(skb->data, skb_headlen(skb), &skbd_ord, &skbd_cptr, &skbd_off);
ret = sync_setup_memory(skb->head, skb_end_offset(skb) + sizeof(struct skb_shared_info), &skbd_ord, &skbd_cptr, &skbd_off);
ret = async_msg_blocking_send_start(hidden_args->async_chnl, &request);
if (ret) {
......@@ -451,7 +451,7 @@ int ndo_start_xmit_user(struct sk_buff *skb, struct net_device *dev, struct tram
skb->data, skb->len, false);
}
LIBLCD_MSG("r4 tail_off 0x%X | r5 end off 0x%X | r6 head off 0x%X", skb->tail - (unsigned long)skb->data, skb->end - (unsigned long)skb->data, skb->data - skb->head);
LIBLCD_MSG("r4 data_off 0x%X | %d", skb->data - skb->head);
ret = lcd_sync_send(sync_end);
lcd_set_cr0(CAP_CPTR_NULL);
lcd_set_cr1(CAP_CPTR_NULL);
......
Supports Markdown
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