* [dpdk-dev] rte_flow: Different devices have different field indianess? @ 2020-03-27 14:29 Tom Barbette 2020-03-27 14:44 ` Andrew Rybchenko 0 siblings, 1 reply; 5+ messages in thread From: Tom Barbette @ 2020-03-27 14:29 UTC (permalink / raw) To: dev; +Cc: orika, beilei.xing, qi.z.zhang Hi all, It seems rte_flow_item_eth takes its ethertype in host byte order with i40e, but in network byte order with mlx5. Wouldn't it be nice to unify that? Else is there a way to know in which byte order the spec should be given? I guess that expands to all fields, but I only compared the ethertype field. Thanks, Tom ^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [dpdk-dev] rte_flow: Different devices have different field indianess? 2020-03-27 14:29 [dpdk-dev] rte_flow: Different devices have different field indianess? Tom Barbette @ 2020-03-27 14:44 ` Andrew Rybchenko 2020-03-27 14:51 ` Tom Barbette 2020-03-28 20:49 ` Thomas Monjalon 0 siblings, 2 replies; 5+ messages in thread From: Andrew Rybchenko @ 2020-03-27 14:44 UTC (permalink / raw) To: Tom Barbette, dev; +Cc: orika, beilei.xing, qi.z.zhang On 3/27/20 5:29 PM, Tom Barbette wrote: > Hi all, > > It seems rte_flow_item_eth takes its ethertype in host byte order with > i40e, but in network byte order with mlx5. If so, it is definitely bug in i40e, since struct rte_flow_item_eth defines type as rte_be16_t type. > Wouldn't it be nice to unify that? Else is there a way to know in which > byte order the spec should be given? I guess that expands to all fields, > but I only compared the ethertype field. > > Thanks, > > Tom ^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [dpdk-dev] rte_flow: Different devices have different field indianess? 2020-03-27 14:44 ` Andrew Rybchenko @ 2020-03-27 14:51 ` Tom Barbette 2020-03-30 0:48 ` Xing, Beilei 2020-03-28 20:49 ` Thomas Monjalon 1 sibling, 1 reply; 5+ messages in thread From: Tom Barbette @ 2020-03-27 14:51 UTC (permalink / raw) To: Andrew Rybchenko, dev; +Cc: orika, beilei.xing, qi.z.zhang Le 27/03/2020 à 15:44, Andrew Rybchenko a écrit : > On 3/27/20 5:29 PM, Tom Barbette wrote: >> Hi all, >> >> It seems rte_flow_item_eth takes its ethertype in host byte order with >> i40e, but in network byte order with mlx5. > > If so, it is definitely bug in i40e, since struct rte_flow_item_eth > defines type as rte_be16_t type. Indeed, with testpmd I would expect the first one to be the one that works: testpmd> flow create 0 ingress pattern eth type is 0x0800 / end actions mark id 5 / end port_flow_complain(): Caught PMD error type 13 (specific pattern item): cause: 0x227fd75540, Unsupported ether_type.: Invalid argument testpmd> flow create 0 ingress pattern eth type is 0x0008 / end actions mark id 5 / end Flow rule #0 created > >> Wouldn't it be nice to unify that? Else is there a way to know in which >> byte order the spec should be given? I guess that expands to all fields, >> but I only compared the ethertype field. >> >> Thanks, >> >> Tom > ^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [dpdk-dev] rte_flow: Different devices have different field indianess? 2020-03-27 14:51 ` Tom Barbette @ 2020-03-30 0:48 ` Xing, Beilei 0 siblings, 0 replies; 5+ messages in thread From: Xing, Beilei @ 2020-03-30 0:48 UTC (permalink / raw) To: Tom Barbette, Andrew Rybchenko, dev; +Cc: orika, Zhang, Qi Z > -----Original Message----- > From: Tom Barbette <barbette@kth.se> > Sent: Friday, March 27, 2020 10:51 PM > To: Andrew Rybchenko <arybchenko@solarflare.com>; dev@dpdk.org > Cc: orika@mellanox.com; Xing, Beilei <beilei.xing@intel.com>; Zhang, Qi Z > <qi.z.zhang@intel.com> > Subject: Re: [dpdk-dev] rte_flow: Different devices have different field > indianess? > > Le 27/03/2020 à 15:44, Andrew Rybchenko a écrit : > > On 3/27/20 5:29 PM, Tom Barbette wrote: > >> Hi all, > >> > >> It seems rte_flow_item_eth takes its ethertype in host byte order > >> with i40e, but in network byte order with mlx5. > > > > If so, it is definitely bug in i40e, since struct rte_flow_item_eth > > defines type as rte_be16_t type. > > Indeed, with testpmd I would expect the first one to be the one that works: > > testpmd> flow create 0 ingress pattern eth type is 0x0800 / end actions > mark id 5 / end > port_flow_complain(): Caught PMD error type 13 (specific pattern item): > cause: 0x227fd75540, Unsupported ether_type.: Invalid argument > testpmd> flow create 0 ingress pattern eth type is 0x0008 / end actions > mark id 5 / end > Flow rule #0 created > It's not a bug, but HW limitation. Only FDIR supports mark action, but i40e FDIR doesn't support filter with eth type 0x0800. Please refer to the following ether_type = rte_be_to_cpu_16(eth_spec->type); if (next_type == RTE_FLOW_ITEM_TYPE_VLAN || ether_type == RTE_ETHER_TYPE_IPV4 || ether_type == RTE_ETHER_TYPE_IPV6 || ether_type == RTE_ETHER_TYPE_ARP || ether_type == outer_tpid) { rte_flow_error_set(error, EINVAL, RTE_FLOW_ERROR_TYPE_ITEM, item, "Unsupported ether_type."); return -rte_errno; } Beilei > > > > >> Wouldn't it be nice to unify that? Else is there a way to know in > >> which byte order the spec should be given? I guess that expands to > >> all fields, but I only compared the ethertype field. > >> > >> Thanks, > >> > >> Tom > > ^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [dpdk-dev] rte_flow: Different devices have different field indianess? 2020-03-27 14:44 ` Andrew Rybchenko 2020-03-27 14:51 ` Tom Barbette @ 2020-03-28 20:49 ` Thomas Monjalon 1 sibling, 0 replies; 5+ messages in thread From: Thomas Monjalon @ 2020-03-28 20:49 UTC (permalink / raw) To: Tom Barbette, beilei.xing, qi.z.zhang, Andrew Rybchenko; +Cc: dev, orika 27/03/2020 15:44, Andrew Rybchenko: > On 3/27/20 5:29 PM, Tom Barbette wrote: > > Hi all, > > > > It seems rte_flow_item_eth takes its ethertype in host byte order with > > i40e, but in network byte order with mlx5. > > If so, it is definitely bug in i40e, since struct rte_flow_item_eth > defines type as rte_be16_t type. Someone to open a bugzilla for this i40e bug please? ^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2020-03-30 0:48 UTC | newest] Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed) -- links below jump to the message on this page -- 2020-03-27 14:29 [dpdk-dev] rte_flow: Different devices have different field indianess? Tom Barbette 2020-03-27 14:44 ` Andrew Rybchenko 2020-03-27 14:51 ` Tom Barbette 2020-03-30 0:48 ` Xing, Beilei 2020-03-28 20:49 ` Thomas Monjalon
This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox; as well as URLs for NNTP newsgroup(s).