Re: [PATCH bpf-next v3 10/21] ice: Implement VLAN tag hint

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Wed, Jul 19, 2023 at 08:37:23PM +0200, Larysa Zaremba wrote:

...

> diff --git a/drivers/net/ethernet/intel/ice/ice_txrx_lib.c b/drivers/net/ethernet/intel/ice/ice_txrx_lib.c
> index b11cfaedb81c..4ad6db83674e 100644
> --- a/drivers/net/ethernet/intel/ice/ice_txrx_lib.c
> +++ b/drivers/net/ethernet/intel/ice/ice_txrx_lib.c
> @@ -639,7 +639,33 @@ static int ice_xdp_rx_hash(const struct xdp_md *ctx, u32 *hash,
>  	return 0;
>  }
>  
> +/**
> + * ice_xdp_rx_vlan_tag - VLAN tag XDP hint handler
> + * @ctx: XDP buff pointer
> + * @vlan_tci: destination address for VLAN tag
> + * @vlan_proto: destination address for VLAN protocol
> + *
> + * Copy VLAN tag (if was stripped) and corresponding protocol
> + * to the destination address.
> + */
> +static int ice_xdp_rx_vlan_tag(const struct xdp_md *ctx, u16 *vlan_tci,
> +			       __be16 *vlan_proto)
> +{
> +	const struct ice_xdp_buff *xdp_ext = (void *)ctx;
> +
> +	*vlan_proto = xdp_ext->pkt_ctx.vlan_proto;
> +	if (!*vlan_proto)
> +		return -ENODATA;
> +
> +	*vlan_tci = ice_get_vlan_tci(xdp_ext->pkt_ctx.eop_desc);
> +	if (!*vlan_tag)

Hi Larysa,

Should this be vlan_tci rather than vlan_tag?

> +		return -ENODATA;
> +
> +	return 0;
> +}
> +

...




[Index of Archives]     [Linux Samsung SoC]     [Linux Rockchip SoC]     [Linux Actions SoC]     [Linux for Synopsys ARC Processors]     [Linux NFS]     [Linux NILFS]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]


  Powered by Linux