@@ -762,8 +762,7 @@ parse_flow_match(struct flow_patterns *patterns,
}
/* Eth */
- if (!eth_addr_is_zero(match->wc.masks.dl_src) ||
- !eth_addr_is_zero(match->wc.masks.dl_dst)) {
+ if (match->flow.packet_type == htonl(PT_ETH)) {
struct rte_flow_item_eth *spec, *mask;
spec = xzalloc(sizeof *spec);
@@ -845,26 +844,24 @@ parse_flow_match(struct flow_patterns *patterns,
consumed_masks->nw_src = 0;
consumed_masks->nw_dst = 0;
- /* Save proto for L4 protocol setup. */
+ /* Save proto for L4 protocol setup.Not consider mask
proto = spec->hdr.next_proto_id &
mask->hdr.next_proto_id;
+ */
+ proto = spec->hdr.next_proto_id ;
next_proto_mask = &mask->hdr.next_proto_id;
+ } else {
+ /* if eth_type is not IP ,just transit eth rte_flow */
+ add_flow_pattern(patterns, RTE_FLOW_ITEM_TYPE_END, NULL, NULL);
+ return 0;
}
if (proto != IPPROTO_ICMP && proto != IPPROTO_UDP &&
- proto != IPPROTO_SCTP && proto != IPPROTO_TCP &&
- (match->wc.masks.tp_src ||
- match->wc.masks.tp_dst ||
- match->wc.masks.tcp_flags)) {
+ proto != IPPROTO_SCTP && proto != IPPROTO_TCP ){
VLOG_DBG("L4 Protocol (%u) not supported", proto);
return -1;
}
- if ((match->wc.masks.tp_src && match->wc.masks.tp_src != OVS_BE16_MAX) ||
- (match->wc.masks.tp_dst && match->wc.masks.tp_dst != OVS_BE16_MAX)) {
- return -1;
- }
-
if (proto == IPPROTO_TCP) {
struct rte_flow_item_tcp *spec, *mask;
From: Rongyin <rongyin@cmss.chinamobile.com> Code Source From: Self Code Description: delete mask effect in parse_flow_match Jira: #[Optional] 市场项目编号(名称):[Optional] --- lib/netdev-offload-dpdk.c | 21 +++++++++------------ 1 file changed, 9 insertions(+), 12 deletions(-)