Hi Click team,
first of all, thanks for the great software.
While developing a custom Element, I've noticed that while most source elements set the originated packets' mac header address with something along the lines of p->set_mac_header(p->data());, FromDPDKDevice doesn't.
Is there a rationale behind this that I don't see (performance, memory, etc), or is it merely an oversight?
For example, in elements/userlevel/fromdevice.cc:
FromDevice::emit_packet(WritablePacket *p, int extra_len, const Timestamp &ts)
{
[...]
p->set_packet_type_anno(Packet::MULTICAST);
[...]
// set annotations
p->set_timestamp_anno(ts);
p->set_mac_header(p->data());
while in elements/userlevel/fromdpdkdevice.cc, it's only:
bool FromDPDKDevice::run_task(Task * t)
[...]
p->set_packet_type_anno(Packet::HOST);
It would be good to have the mac_header set, since then one could const click_ether *eth = p_in->mac_header(); independently of what kind of source the packet came through (FromDevice(), FromDPDKDevice(), PCAP...)
I'm happy to submit a patch if the community says that it would be OK to set it.
Keep up the good work!
Hi Click team,
first of all, thanks for the great software.
While developing a custom Element, I've noticed that while most source elements set the originated packets' mac header address with something along the lines of
p->set_mac_header(p->data());,FromDPDKDevicedoesn't.Is there a rationale behind this that I don't see (performance, memory, etc), or is it merely an oversight?
For example, in
elements/userlevel/fromdevice.cc:while in
elements/userlevel/fromdpdkdevice.cc, it's only:It would be good to have the mac_header set, since then one could
const click_ether *eth = p_in->mac_header();independently of what kind of source the packet came through (FromDevice(), FromDPDKDevice(), PCAP...)I'm happy to submit a patch if the community says that it would be OK to set it.
Keep up the good work!