DPDK patches and discussions
 help / color / mirror / Atom feed
From: "Shetty, Praveen" <praveen.shetty@intel.com>
To: "Richardson, Bruce" <bruce.richardson@intel.com>
Cc: "Singh, Aman Deep" <aman.deep.singh@intel.com>,
	"dev@dpdk.org" <dev@dpdk.org>,
	"Shukla, Dhananjay" <dhananjay.shukla@intel.com>,
	"Patel, Atul" <atul.patel@intel.com>
Subject: RE: [PATCH v3 2/4] net/idpf: add splitq jumbo packet handling
Date: Mon, 29 Sep 2025 18:55:57 +0000	[thread overview]
Message-ID: <DM3PPF291EF9BF15EC74E5247ACF7E337519D1BA@DM3PPF291EF9BF1.namprd11.prod.outlook.com> (raw)
In-Reply-To: <aNp8T1rYYJHLFoQw@bricha3-mobl1.ger.corp.intel.com>


On Tue, Sep 23, 2025 at 02:54:53PM +0200, Shetty, Praveen wrote:
> From: Praveen Shetty <praveen.shetty@intel.com>
> 
> This patch will add the jumbo packets handling in the 
> idpf_dp_splitq_recv_pkts function.
> 
> Signed-off-by: Praveen Shetty <praveen.shetty@intel.com>
> Signed-off-by: Dhananjay Shukla <dhananjay.shukla@intel.com>
> Signed-off-by: atulpatel261194 <Atul.Patel@intel.com>
> ---

One small comment inline below.

/Bruce

>  drivers/net/intel/idpf/idpf_common_rxtx.c | 50 
> ++++++++++++++++++-----
>  1 file changed, 40 insertions(+), 10 deletions(-)
> 
> diff --git a/drivers/net/intel/idpf/idpf_common_rxtx.c 
> b/drivers/net/intel/idpf/idpf_common_rxtx.c
> index eb25b091d8..412aff8f5f 100644
> --- a/drivers/net/intel/idpf/idpf_common_rxtx.c
> +++ b/drivers/net/intel/idpf/idpf_common_rxtx.c
> @@ -623,10 +623,12 @@ idpf_dp_splitq_recv_pkts(void *rx_queue, struct rte_mbuf **rx_pkts,
>  	volatile struct virtchnl2_rx_flex_desc_adv_nic_3 *rx_desc_ring;
>  	volatile struct virtchnl2_rx_flex_desc_adv_nic_3 *rx_desc;
>  	uint16_t pktlen_gen_bufq_id;
> -	struct idpf_rx_queue *rxq;
> +	struct idpf_rx_queue *rxq = rx_queue;
>  	const uint32_t *ptype_tbl;
>  	uint8_t status_err0_qw1;
>  	struct idpf_adapter *ad;
> +	struct rte_mbuf *first_seg = rxq->pkt_first_seg;
> +	struct rte_mbuf *last_seg = rxq->pkt_last_seg;
>  	struct rte_mbuf *rxm;
>  	uint16_t rx_id_bufq1;
>  	uint16_t rx_id_bufq2;
> @@ -659,6 +661,7 @@ idpf_dp_splitq_recv_pkts(void *rx_queue, struct 
> rte_mbuf **rx_pkts,
>  
>  		pktlen_gen_bufq_id =
>  			rte_le_to_cpu_16(rx_desc->pktlen_gen_bufq_id);
> +		status_err0_qw1 = rte_le_to_cpu_16(rx_desc->status_err0_qw1);
>  		gen_id = (pktlen_gen_bufq_id &
>  			  VIRTCHNL2_RX_FLEX_DESC_ADV_GEN_M) >>
>  			VIRTCHNL2_RX_FLEX_DESC_ADV_GEN_S;
> @@ -697,16 +700,39 @@ idpf_dp_splitq_recv_pkts(void *rx_queue, struct rte_mbuf **rx_pkts,
>  		rxm->pkt_len = pkt_len;
>  		rxm->data_len = pkt_len;
>  		rxm->data_off = RTE_PKTMBUF_HEADROOM;
> +
> +		/*
> +		 * If this is the first buffer of the received packet, set the
> +		 * pointer to the first mbuf of the packet and initialize its
> +		 * context. Otherwise, update the total length and the number
> +		 * of segments of the current scattered packet, and update the
> +		 * pointer to the last mbuf of the current packet.
> +		 */
> +		if (!first_seg) {
> +			first_seg = rxm;
> +			first_seg->nb_segs = 1;
> +			first_seg->pkt_len = pkt_len;
> +		} else {
> +			first_seg->pkt_len =
> +					(uint16_t)(first_seg->pkt_len +
> +							pkt_len);

Since we allow 100 characters per line, does this line really need to be split into 3? [I realise this is a copy-paste from other drivers, but we can clean it up as new code here]
> thanks, will address this in v4.

> +			first_seg->nb_segs++;
> +			last_seg->next = rxm;
> +		}
> +
> +		if (!(status_err0_qw1 & (1 << VIRTCHNL2_RX_FLEX_DESC_ADV_STATUS0_EOF_S))) {
> +			last_seg = rxm;
> +			continue;
> +		}
> +
>  		rxm->next = NULL;
> -		rxm->nb_segs = 1;
> -		rxm->port = rxq->port_id;
> -		rxm->ol_flags = 0;
> -		rxm->packet_type =
> +		first_seg->port = rxq->port_id;
> +		first_seg->ol_flags = 0;
> +		first_seg->packet_type =
>  			ptype_tbl[(rte_le_to_cpu_16(rx_desc->ptype_err_fflags0) &
>  				   VIRTCHNL2_RX_FLEX_DESC_ADV_PTYPE_M) >>
>  				  VIRTCHNL2_RX_FLEX_DESC_ADV_PTYPE_S];
> -
> -		status_err0_qw1 = rx_desc->status_err0_qw1;
> +		status_err0_qw1 = rte_le_to_cpu_16(rx_desc->status_err0_qw1);
>  		pkt_flags = idpf_splitq_rx_csum_offload(status_err0_qw1);
>  		pkt_flags |= idpf_splitq_rx_rss_offload(rxm, rx_desc);
>  		if (idpf_timestamp_dynflag > 0 &&
> @@ -719,16 +745,20 @@ idpf_dp_splitq_recv_pkts(void *rx_queue, struct rte_mbuf **rx_pkts,
>  			*RTE_MBUF_DYNFIELD(rxm,
>  					   idpf_timestamp_dynfield_offset,
>  					   rte_mbuf_timestamp_t *) = ts_ns;
> -			rxm->ol_flags |= idpf_timestamp_dynflag;
> +			first_seg->ol_flags |= idpf_timestamp_dynflag;
>  		}
>  
> -		rxm->ol_flags |= pkt_flags;
> +		first_seg->ol_flags |= pkt_flags;
>  
> -		rx_pkts[nb_rx++] = rxm;
> +		rx_pkts[nb_rx++] = first_seg;
> +
> +		first_seg = NULL;
>  	}
>  
>  	if (nb_rx > 0) {
>  		rxq->rx_tail = rx_id;
> +		rxq->pkt_first_seg = first_seg;
> +		rxq->pkt_last_seg = last_seg;
>  		if (rx_id_bufq1 != rxq->bufq1->rx_next_avail)
>  			rxq->bufq1->rx_next_avail = rx_id_bufq1;
>  		if (rx_id_bufq2 != rxq->bufq2->rx_next_avail)
> --
> 2.37.3
> 

  parent reply	other threads:[~2025-09-29 18:56 UTC|newest]

Thread overview: 35+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-09-22  9:48 [PATCH 0/4] add vcpf pmd support Shetty, Praveen
2025-09-22  9:48 ` [PATCH 1/4] net/intel: add vCPF PMD support Shetty, Praveen
2025-09-22 14:10   ` [PATCH v2 0/4] add vcpf pmd support Shetty, Praveen
2025-09-22 14:10     ` [PATCH v2 1/4] net/intel: add vCPF PMD support Shetty, Praveen
2025-09-23 12:54       ` [PATCH v3 0/4] add vcpf pmd support Shetty, Praveen
2025-09-23 12:54         ` [PATCH v3 1/4] net/intel: add vCPF PMD support Shetty, Praveen
2025-09-29 12:18           ` Bruce Richardson
2025-09-29 18:55             ` Shetty, Praveen
2025-09-23 12:54         ` [PATCH v3 2/4] net/idpf: add splitq jumbo packet handling Shetty, Praveen
2025-09-29 12:32           ` Bruce Richardson
2025-09-29 14:39             ` Stephen Hemminger
2025-09-29 18:55             ` Shetty, Praveen [this message]
2025-09-23 12:54         ` [PATCH v3 3/4] net/intel: add config queue support to vCPF Shetty, Praveen
2025-09-29 13:40           ` Bruce Richardson
2025-09-29 19:53             ` Shetty, Praveen
2025-09-30  7:50               ` Bruce Richardson
2025-09-30  8:31                 ` Shetty, Praveen
2025-09-23 12:54         ` [PATCH v3 4/4] net/cpfl: add cpchnl get vport info support Shetty, Praveen
2025-09-26  8:11           ` Shetty, Praveen
2025-09-22 14:10     ` [PATCH v2 2/4] net/idpf: add splitq jumbo packet handling Shetty, Praveen
2025-09-22 14:10     ` [PATCH v2 3/4] net/intel: add config queue support to vCPF Shetty, Praveen
2025-09-22 14:10     ` [PATCH v2 4/4] net/cpfl: add cpchnl get vport info support Shetty, Praveen
2025-09-30 13:55   ` [PATCH v4 0/4] add vcpf pmd support Shetty, Praveen
2025-09-30 13:55     ` [PATCH v4 1/4] net/intel: add vCPF PMD support Shetty, Praveen
2025-09-30 13:55     ` [PATCH v4 2/4] net/idpf: add splitq jumbo packet handling Shetty, Praveen
2025-09-30 13:55     ` [PATCH v4 3/4] net/intel: add config queue support to vCPF Shetty, Praveen
2025-09-30 13:55     ` [PATCH v4 4/4] net/cpfl: add cpchnl get vport info support Shetty, Praveen
2025-09-30 18:27   ` [PATCH v5 0/4] add vcpf pmd support Shetty, Praveen
2025-09-30 18:27     ` [PATCH v5 1/4] net/intel: add vCPF PMD support Shetty, Praveen
2025-09-30 18:27     ` [PATCH v5 2/4] net/idpf: add splitq jumbo packet handling Shetty, Praveen
2025-09-30 18:27     ` [PATCH v5 3/4] net/intel: add config queue support to vCPF Shetty, Praveen
2025-09-30 18:27     ` [PATCH v5 4/4] net/cpfl: add cpchnl get vport info support Shetty, Praveen
2025-09-22  9:48 ` [PATCH 2/4] net/idpf: add splitq jumbo packet handling Shetty, Praveen
2025-09-22  9:48 ` [PATCH 3/4] net/intel: add config queue support to vCPF Shetty, Praveen
2025-09-22  9:48 ` [PATCH 4/4] net/cpfl: add cpchnl get vport info support Shetty, Praveen

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=DM3PPF291EF9BF15EC74E5247ACF7E337519D1BA@DM3PPF291EF9BF1.namprd11.prod.outlook.com \
    --to=praveen.shetty@intel.com \
    --cc=aman.deep.singh@intel.com \
    --cc=atul.patel@intel.com \
    --cc=bruce.richardson@intel.com \
    --cc=dev@dpdk.org \
    --cc=dhananjay.shukla@intel.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).