My interface is a virtual interface which represent a radio connected to
the host using ethernet NIC. I designed my own L2 protocol on top of
802.3, which must be used, since the radio and the host are connected by
ethernet.
Now, my radio_hard_header will only add my L2 header, and my
radio_hard_start_xmit will do (simplified):
1) ajust the headroom space
hh_len = LL_RESERVED_SPACE(bdev);
if (unlikely(skb_headroom(skb) < hh_len && bdev->hard_header)) {
struct sk_buff *skb2;
skb2 = skb_realloc_headroom(skb, LL_RESERVED_SPACE(dev));
if (skb2 == NULL) {
stats->tx_dropped++;
dev_kfree_skb(skb);
return 0;
}
if (skb->sk)
skb_set_owner_w(skb2, skb->sk);
dev_kfree_skb(skb);
skb = skb2;
}
2) call eth0->hard_header
3) skb->dev = eth0
return dev_queue_xmit()
The problem is when system try to retransmit the packet, I add another
ethernet header mistakenly.
I have two question:
1) I do not modify the skb passed to hard_start_xmit if
skb_realloc_headroom is executed. only in this case the retransmission
runs well. Is my understanding right?
2) Should I do this way or add the ethernet header in my
radio_hard_header? If I choose the later, the problem will be how should
I handle it when eth_hard_header return a negative number, when ARP is
needed.
Thx
-
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at http://vger.kernel.org/majordomo-info.html