From 92f8bbd00ae5770057a9b664d7bd42eacf267a9e Mon Sep 17 00:00:00 2001 From: Ivan Khoronzhuk Date: Fri, 12 Feb 2016 18:51:20 +0200 Subject: linux-ks2: use software parser For now there is no way to figure out packet was traversing classification chain, which allows find out level offsets with h/w, so some packets needs to be updated with software parser. It one of the topics for todo. Signed-off-by: Ivan Khoronzhuk --- platform/linux-keystone2/include/odp_packet_io_internal.h | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) (limited to 'platform') diff --git a/platform/linux-keystone2/include/odp_packet_io_internal.h b/platform/linux-keystone2/include/odp_packet_io_internal.h index f628c585..b2e1f5a7 100644 --- a/platform/linux-keystone2/include/odp_packet_io_internal.h +++ b/platform/linux-keystone2/include/odp_packet_io_internal.h @@ -17,6 +17,9 @@ #include #include +#include + +#define SW_PARSING 1 uint16_t _odp_pktio_port_id(odp_pktio_t pktio); @@ -26,9 +29,9 @@ static inline void pktin_update_event(odp_event_t ev, queue_entry_t *qentry) struct odp_pkthdr *hdr = _odp_pkt_hdr(pkt); hdr->input = qentry->pktin; ODP_DBG("Received packet ---------\n"); -//#ifdef SW_PARSING - //_odp_packet_parse(pkt); -//#else +#ifdef SW_PARSING + _odp_packet_parse(pkt); +#else pasahoLongInfo_t *pasa_info = nwal_mGetProtoInfo(Pktlib_getPacketFromDesc(_odp_ev_to_cppi_desc(ev))); @@ -36,7 +39,7 @@ static inline void pktin_update_event(odp_event_t ev, queue_entry_t *qentry) hdr->l2_offset = 0; hdr->l3_offset = PASAHO_LINFO_READ_L3_OFFSET(pasa_info); hdr->l4_offset = PASAHO_LINFO_READ_L4_OFFSET(pasa_info); -//#endif +#endif if (ODP_DEBUG_PRINT == 1) odp_packet_print(pkt); } -- cgit v1.2.3