[dpdk-dev] [PATCH v4 3/6] net/ice: add protocol extraction support for per Rx queue

Wang, Haiyue haiyue.wang at intel.com
Mon Sep 23 17:00:48 CEST 2019


> -----Original Message-----
> From: Ye, Xiaolong
> Sent: Monday, September 23, 2019 22:24
> To: Rong, Leyi <leyi.rong at intel.com>
> Cc: Wang, Haiyue <haiyue.wang at intel.com>; Lu, Wenzhuo <wenzhuo.lu at intel.com>; Zhang, Qi Z
> <qi.z.zhang at intel.com>; dev at dpdk.org
> Subject: Re: [PATCH v4 3/6] net/ice: add protocol extraction support for per Rx queue
> 
> On 09/19, Leyi Rong wrote:
> >From: Haiyue Wang <haiyue.wang at intel.com>
> >
> 
> [snip]
> 
> >+static inline uint8_t
> >+ice_rxdid_to_proto_xtr_type(uint8_t rxdid)
> >+{
> >+	static uint8_t xtr_map[] = {
> >+		[ICE_RXDID_COMMS_AUX_VLAN]      = PROTO_XTR_VLAN,
> >+		[ICE_RXDID_COMMS_AUX_IPV4]      = PROTO_XTR_IPV4,
> >+		[ICE_RXDID_COMMS_AUX_IPV6]      = PROTO_XTR_IPV6,
> >+		[ICE_RXDID_COMMS_AUX_IPV6_FLOW] = PROTO_XTR_IPV6_FLOW,
> >+		[ICE_RXDID_COMMS_AUX_TCP]       = PROTO_XTR_TCP,
> >+	};
> >+
> >+	return rxdid < RTE_DIM(xtr_map) ? xtr_map[rxdid] : PROTO_XTR_NONE;
> >+}
> >+
> >+static inline uint8_t
> >+ice_proto_xtr_type_to_rxdid(uint8_t xtr_tpye)
> 
> s/xtr_tpye/xtr_type/
> 

Got it!

> >+{
> >+	static uint8_t rxdid_map[] = {
Add this line:
		[PROTO_XTR_NONE]      = ICE_RXDID_COMMS_GENERIC,
> >+		[PROTO_XTR_VLAN]      = ICE_RXDID_COMMS_AUX_VLAN,
> >+		[PROTO_XTR_IPV4]      = ICE_RXDID_COMMS_AUX_IPV4,
> >+		[PROTO_XTR_IPV6]      = ICE_RXDID_COMMS_AUX_IPV6,
> >+		[PROTO_XTR_IPV6_FLOW] = ICE_RXDID_COMMS_AUX_IPV6_FLOW,
> >+		[PROTO_XTR_TCP]       = ICE_RXDID_COMMS_AUX_TCP,
> >+	};
> >+	uint8_t rxdid;
> >+
> >+	rxdid = xtr_tpye < RTE_DIM(rxdid_map) ? rxdid_map[xtr_tpye] : 0;
> >+
> >+	return rxdid != 0 ? rxdid : ICE_RXDID_COMMS_GENERIC;
> 
> Maybe just
> 
> 	return xtr_type < RTE_DIM(rxdid_map) ?
> 				rxdid_map[xtr_type] : ICE_RXDID_COMMS_GENERIC;
> 

Then this, will be updated in next version.

> as previous ice_rxdid_to_proto_xtr_type.
> 
> 
> Thanks,
> Xiaolong


More information about the dev mailing list