Skip to content

Commit

Permalink
RSSHashSwitch
Browse files Browse the repository at this point in the history
Fix build without --enable-ip6
  • Loading branch information
tbarbette committed Jan 14, 2025
1 parent 199ca4e commit 47173af
Showing 1 changed file with 11 additions and 5 deletions.
16 changes: 11 additions & 5 deletions elements/userlevel/rsshashswitch.cc
Original file line number Diff line number Diff line change
Expand Up @@ -26,8 +26,10 @@
#include <clicknet/ether.h>

#include <click/dpdkdevice.hh>
#include <click/ip6address.hh>
#include <click/ip6flowid.hh>
#if HAVE_IP6
# include <click/ip6address.hh>
# include <click/ip6flowid.hh>
#endif
#include <rte_thash.h>

CLICK_DECLS
Expand Down Expand Up @@ -79,7 +81,9 @@ RSSHashSwitch::process(Packet *p)
memcpy(&tuple.v4.dst_addr, &a, 4);
len = 4 + 4 + 2 + 2;

} else if (eth->ether_type == 0xDD86) {
}
#if HAVE_IP6
else if (eth->ether_type == 0xDD86) {
IP6FlowID f(p);
tuple.v6.sport = f.sport();
tuple.v6.dport = f.dport();
Expand All @@ -88,7 +92,9 @@ RSSHashSwitch::process(Packet *p)
a = f.daddr();
memcpy(&tuple.v6.dst_addr, &a, 16);
len = 16 + 16 + 2 + 2;
} else {
}
#endif
else {
return 0;
}

Expand All @@ -115,4 +121,4 @@ RSSHashSwitch::push_batch(int port, PacketBatch *batch)
CLICK_ENDDECLS
EXPORT_ELEMENT(RSSHashSwitch)
ELEMENT_MT_SAFE(RSSHashSwitch)
ELEMENT_REQUIRES(dpdk)
ELEMENT_REQUIRES(dpdk)

0 comments on commit 47173af

Please sign in to comment.