+static int
+prepare_ptype_parser(uint8_t portid, uint16_t queueid)
+{
+ if (parse_ptype) {
+ printf("Port %d: softly parse packet type info\n", portid);
+ if (rte_eth_add_rx_callback(portid, queueid,
+ l3fwd_lkp.cb_parse_ptype,
+ NULL))
+ return 1;
+
+ printf("Failed to add rx callback: port=%d\n", portid);
+ return 0;
+ }
+
+ if (l3fwd_lkp.check_ptype(portid))
+ return 1;
+
+ printf("port %d cannot parse packet type, please add --%s\n",
+ portid, CMD_LINE_OPT_PARSE_PTYPE);
+ return 0;
+}
+