[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <ZLmB88LX7lb7J+zC@corigine.com>
Date: Thu, 20 Jul 2023 19:50:27 +0100
From: Simon Horman <simon.horman@...igine.com>
To: Larysa Zaremba <larysa.zaremba@...el.com>
Cc: bpf@...r.kernel.org, ast@...nel.org, daniel@...earbox.net,
andrii@...nel.org, martin.lau@...ux.dev, song@...nel.org,
yhs@...com, john.fastabend@...il.com, kpsingh@...nel.org,
sdf@...gle.com, haoluo@...gle.com, jolsa@...nel.org,
David Ahern <dsahern@...il.com>, Jakub Kicinski <kuba@...nel.org>,
Willem de Bruijn <willemb@...gle.com>,
Jesper Dangaard Brouer <brouer@...hat.com>,
Anatoly Burakov <anatoly.burakov@...el.com>,
Alexander Lobakin <alexandr.lobakin@...el.com>,
Magnus Karlsson <magnus.karlsson@...il.com>,
Maryam Tahhan <mtahhan@...hat.com>, xdp-hints@...-project.net,
netdev@...r.kernel.org
Subject: Re: [PATCH bpf-next v3 10/21] ice: Implement VLAN tag hint
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;
> +}
> +
...
Powered by blists - more mailing lists