I am writing a linux phy driver that handles packet timestamping. The bottom half does the process of calculating timestamps and sending this info to the kernel networking stack and then to user space. The bottom half needs some information from the skb(packet) which the caller of the tasklet has. I am having difficulty passing this skb to the takslet. tasklet handler function doesnot take any input other than unsigned long. I am stuck here. Below is a code snippet for you understanding -
static void tx_ts_task(unsigned long val)
{
struct phyts *phyts = container_of(&val, struct phyts, int_flags);
//skb_copy(skb); ///want to access skb in this tasklet but I am unable to do this.
.
.
}
int tx_timestamp(struct phyts *phyts, struct sk_buff *skb, int len)
{
.
.
tasklet_schedule(&tx_ts_tasklet);
}
Appreciate your inputs. Thanks