[PATCH net-next v2 4/7] net: octeontx2: Add metadata support for xdp mode

Lorenzo Bianconi lorenzo at kernel.org
Tue Mar 25 06:28:41 PDT 2025


> On Tue, 18 Mar 2025 12:46:08 +0100 Lorenzo Bianconi wrote:
> > @@ -1514,13 +1518,14 @@ static bool otx2_xdp_rcv_pkt_handler(struct otx2_nic *pfvf,
> >  
> >  	hard_start = (unsigned char *)phys_to_virt(pa);
> >  	xdp_prepare_buff(&xdp, hard_start, OTX2_HEAD_ROOM,
> > -			 cqe->sg.seg_size, false);
> > +			 cqe->sg.seg_size, true);
> >  
> >  	act = bpf_prog_run_xdp(prog, &xdp);
> >  
> >  handle_xdp_verdict:
> >  	switch (act) {
> >  	case XDP_PASS:
> > +		*metasize = xdp.data - xdp.data_meta;
> >  		break;
> >  	case XDP_TX:
> >  		qidx += pfvf->hw.tx_queues;
> 
> This one handles ABORT and invalid return codes as PASS not DROP.
> That should probably be fixed separately?

Yes, right. I will post a fix for it.

Regards,
Lorenzo
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 228 bytes
Desc: not available
URL: <http://lists.infradead.org/pipermail/linux-arm-kernel/attachments/20250325/6f0c0bf4/attachment.sig>


More information about the linux-arm-kernel mailing list