diff --git a/app/test-pmd/cmdline.c b/app/test-pmd/cmdline.c
index cdde5a1..b08c1b4 100644
--- a/app/test-pmd/cmdline.c
+++ b/app/test-pmd/cmdline.c
@@ -843,6 +843,12 @@ static void cmd_help_long_parsed(void *parsed_result,
 			" queue (queue_id) fd_id (fd_id_value)\n"
 			"    Add/Del a Tunnel flow director filter.\n\n"
 
+			"flow_director_filter (port_id) mode raw (add|del|update)"
+			" flow (flow_id) flexbytes (flexbytes_value) (drop|fwd)"
+			" pf|vf(vf_id) queue (queue_id) fd_id (fd_id_value)"
+			" packet (packet file name)\n"
+			"    Add/Del a raw type flow director filter.\n\n"
+
 			"flush_flow_director (port_id)\n"
 			"    Flush all flow director entries of a device.\n\n"
 
@@ -8904,6 +8910,7 @@ struct cmd_flow_director_result {
 	cmdline_fixed_string_t mode_value;
 	cmdline_fixed_string_t ops;
 	cmdline_fixed_string_t flow;
+	uint16_t flow_id;
 	cmdline_fixed_string_t flow_type;
 	cmdline_fixed_string_t ether;
 	uint16_t ether_type;
@@ -8937,6 +8944,8 @@ struct cmd_flow_director_result {
 	cmdline_fixed_string_t tunnel_type;
 	cmdline_fixed_string_t tunnel_id;
 	uint32_t tunnel_id_value;
+	cmdline_fixed_string_t packet;
+	char filepath[];
 };
 
 static inline int
@@ -9063,6 +9072,8 @@ cmd_flow_director_filter_parsed(void *parsed_result,
 	struct rte_eth_fdir_filter entry;
 	uint8_t flexbytes[RTE_ETH_FDIR_MAX_FLEXLEN];
 	char *end;
+	uint8_t *raw_packet_buff;
+	uint32_t raw_packet_size;
 	unsigned long vf_id;
 	int ret = 0;
 
@@ -9086,11 +9097,14 @@ cmd_flow_director_filter_parsed(void *parsed_result,
 			return;
 		}
 	} else {
-		if (strcmp(res->mode_value, "IP")) {
-			printf("Please set mode to IP.\n");
+		if (!strcmp(res->mode_value, "raw")) {
+			entry.input.flow_type = RTE_ETH_FLOW_RAW;
+		} else if (!strcmp(res->mode_value, "IP")) {
+			entry.input.flow_type = str2flowtype(res->flow_type);
+		} else {
+			printf("Please set mode to IP or raw.\n");
 			return;
 		}
-		entry.input.flow_type = str2flowtype(res->flow_type);
 	}
 
 	ret = parse_flexbytes(res->flexbytes_value,
@@ -9172,6 +9186,15 @@ cmd_flow_director_filter_parsed(void *parsed_result,
 		entry.input.flow.l2_flow.ether_type =
 			rte_cpu_to_be_16(res->ether_type);
 		break;
+	case RTE_ETH_FLOW_RAW:
+		entry.input.flow.raw_flow.flow = res->flow_id;
+		raw_packet_buff = open_ddp_package_file(res->filepath,
+							&raw_packet_size);
+		if (!raw_packet_buff)
+			return;
+		entry.input.flow.raw_flow.packet = raw_packet_buff;
+		entry.input.flow.raw_flow.length = (uint16_t)raw_packet_size;
+		break;
 	default:
 		break;
 	}
@@ -9261,6 +9284,9 @@ cmdline_parse_token_string_t cmd_flow_director_flow_type =
 	TOKEN_STRING_INITIALIZER(struct cmd_flow_director_result,
 		flow_type, "ipv4-other#ipv4-frag#ipv4-tcp#ipv4-udp#ipv4-sctp#"
 		"ipv6-other#ipv6-frag#ipv6-tcp#ipv6-udp#ipv6-sctp#l2_payload");
+cmdline_parse_token_num_t cmd_flow_director_flow_id =
+	TOKEN_NUM_INITIALIZER(struct cmd_flow_director_result,
+			      flow_id, UINT16);
 cmdline_parse_token_string_t cmd_flow_director_ether =
 	TOKEN_STRING_INITIALIZER(struct cmd_flow_director_result,
 				 ether, "ether");
@@ -9352,6 +9378,9 @@ cmdline_parse_token_string_t cmd_flow_director_mode_mac_vlan =
 cmdline_parse_token_string_t cmd_flow_director_mode_tunnel =
 	TOKEN_STRING_INITIALIZER(struct cmd_flow_director_result,
 				 mode_value, "Tunnel");
+cmdline_parse_token_string_t cmd_flow_director_mode_raw =
+	TOKEN_STRING_INITIALIZER(struct cmd_flow_director_result,
+				 mode_value, "raw");
 cmdline_parse_token_string_t cmd_flow_director_mac =
 	TOKEN_STRING_INITIALIZER(struct cmd_flow_director_result,
 				 mac, "mac");
@@ -9370,6 +9399,12 @@ cmdline_parse_token_string_t cmd_flow_director_tunnel_id =
 cmdline_parse_token_num_t cmd_flow_director_tunnel_id_value =
 	TOKEN_NUM_INITIALIZER(struct cmd_flow_director_result,
 			      tunnel_id_value, UINT32);
+cmdline_parse_token_string_t cmd_flow_director_packet =
+	TOKEN_STRING_INITIALIZER(struct cmd_flow_director_result,
+				 packet, "packet");
+cmdline_parse_token_string_t cmd_flow_director_filepath =
+	TOKEN_STRING_INITIALIZER(struct cmd_flow_director_result,
+				 filepath, NULL);
 
 cmdline_parse_inst_t cmd_add_del_ip_flow_director = {
 	.f = cmd_flow_director_filter_parsed,
@@ -9573,6 +9608,33 @@ cmdline_parse_inst_t cmd_add_del_tunnel_flow_director = {
 	},
 };
 
+cmdline_parse_inst_t cmd_add_del_raw_flow_director = {
+	.f = cmd_flow_director_filter_parsed,
+	.data = NULL,
+	.help_str = "flow_director_filter ... : Add or delete a raw flow "
+		"director entry on NIC",
+	.tokens = {
+		(void *)&cmd_flow_director_filter,
+		(void *)&cmd_flow_director_port_id,
+		(void *)&cmd_flow_director_mode,
+		(void *)&cmd_flow_director_mode_raw,
+		(void *)&cmd_flow_director_ops,
+		(void *)&cmd_flow_director_flow,
+		(void *)&cmd_flow_director_flow_id,
+		(void *)&cmd_flow_director_flexbytes,
+		(void *)&cmd_flow_director_flexbytes_value,
+		(void *)&cmd_flow_director_drop,
+		(void *)&cmd_flow_director_pf_vf,
+		(void *)&cmd_flow_director_queue,
+		(void *)&cmd_flow_director_queue_id,
+		(void *)&cmd_flow_director_fd_id,
+		(void *)&cmd_flow_director_fd_id_value,
+		(void *)&cmd_flow_director_packet,
+		(void *)&cmd_flow_director_filepath,
+		NULL,
+	},
+};
+
 struct cmd_flush_flow_director_result {
 	cmdline_fixed_string_t flush_flow_director;
 	uint8_t port_id;
@@ -14755,6 +14817,7 @@ cmdline_parse_ctx_t main_ctx[] = {
 	(cmdline_parse_inst_t *)&cmd_add_del_l2_flow_director,
 	(cmdline_parse_inst_t *)&cmd_add_del_mac_vlan_flow_director,
 	(cmdline_parse_inst_t *)&cmd_add_del_tunnel_flow_director,
+	(cmdline_parse_inst_t *)&cmd_add_del_raw_flow_director,
 	(cmdline_parse_inst_t *)&cmd_flush_flow_director,
 	(cmdline_parse_inst_t *)&cmd_set_flow_director_ip_mask,
 	(cmdline_parse_inst_t *)&cmd_set_flow_director_mac_vlan_mask,
