[dpdk-dev] [PATCH] nfp: add support for new metadata api

Ferruh Yigit ferruh.yigit at intel.com
Wed Jan 4 15:15:26 CET 2017


On 12/20/2016 2:13 PM, Alejandro Lucero wrote:
> NFP is a smart programmable NIC and firmware is deployed for specific
> system needs, like offloading OVS, vRouter, contrack or eBPF into the
> hardware. This often requires to give metadata to the host within
> packets delivered. Last NFP firmware implementations support richer
> metadata api facilitating interaction between firmware and host code.
> 
> Old way of handling metadata needs to be still there for supporting
> old firmware.
> 
> Signed-off-by: Alejandro Lucero <alejandro.lucero at netronome.com>
> ---

<...>

> +
> +	} else if (NFP_DESC_META_LEN(rxd)) {
> +		meta_offset = (uint8_t *)mbuf->buf_addr;
> +		meta_info = rte_be_to_cpu_32(*(uint32_t *)meta_offset);
> +		meta_offset += 4;
> +		/* NFP PMD just supports metadata for hashing */
> +		switch (meta_info & NFP_NET_META_FIELD_MASK) {
> +		case NFP_NET_META_HASH:
> +			meta_info >>= NFP_NET_META_FIELD_SIZE;
> +			hash = rte_be_to_cpu_32(*(uint32_t *)meta_offset);
> +			hash_type = meta_info && NFP_NET_META_FIELD_MASK;

I already applied this patch but above "&&" looks wrong.
Most probably intention is "bitwise AND" (&), do you want me fix this as
"&" or remove the patch completely to replace with new version?

Thanks,
ferruh



More information about the dev mailing list