DPDK patches and discussions
 help / color / mirror / Atom feed
From: Pavan Nikhilesh Bhagavatula <pbhagavatula@caviumnetworks.com>
To: Jerin Jacob <jerin.jacob@caviumnetworks.com>
Cc: dev@dpdk.org
Subject: Re: [dpdk-dev] [PATCH v2 1/3] net/octeontx: add support for event Rx adapter
Date: Tue, 24 Oct 2017 12:26:22 +0530	[thread overview]
Message-ID: <20171024065621.GA15356@PBHAGAVATULA-LT> (raw)
In-Reply-To: <20171023180941.GA22149@jerin>

On Mon, Oct 23, 2017 at 11:39:42PM +0530, Jerin Jacob wrote:
> -----Original Message-----
> > Date: Wed, 18 Oct 2017 14:15:40 +0530
> > From: Pavan Nikhilesh <pbhagavatula@caviumnetworks.com>
> > To: jerin.jacob@caviumnetworks.com, santosh.shukla@caviumnetworks.com,
> >  nikhil.rao@intel.com
> > Cc: dev@dpdk.org, Pavan Nikhilesh <pbhagavatula@caviumnetworks.com>
> > Subject: [dpdk-dev] [PATCH v2 1/3] net/octeontx: add support for event Rx
> >  adapter
> > X-Mailer: git-send-email 2.7.4
> >
> > Add functions to modify and delete qos responsible for mapping eth queues
> > to event queues used for configuring event Rx adapter.
> > The mbox functions have been moved from octeontx_pkivf.c to
> > octeontx_pkivf.h to allow event_octeontx to access them.
> >
> > Signed-off-by: Pavan Nikhilesh <pbhagavatula@caviumnetworks.com>
> > ---
> >
> >  v2 changes:
> >  - Improve conditional statement readability (Nikhil).
> >
> >  This series depends on http://dpdk.org/dev/patchwork/patch/30430
> >
> >
> >  static __rte_always_inline uint16_t __hot
> >  __octeontx_xmit_pkts(void *lmtline_va, void *ioreg_va, int64_t *fc_status_va,
> > @@ -195,10 +107,8 @@ octeontx_xmit_pkts(void *tx_queue, struct rte_mbuf **tx_pkts, uint16_t nb_pkts)
> >  uint16_t __hot
> >  octeontx_recv_pkts(void *rx_queue, struct rte_mbuf **rx_pkts, uint16_t nb_pkts)
> >  {
> > -	struct rte_mbuf *mbuf;
> >  	struct octeontx_rxq *rxq;
> >  	struct rte_event ev;
> > -	octtx_wqe_t *wqe;
> >  	size_t count;
> >  	uint16_t valid_event;
> >
> > @@ -210,23 +120,7 @@ octeontx_recv_pkts(void *rx_queue, struct rte_mbuf **rx_pkts, uint16_t nb_pkts)
> >  							1, 0);
> >  		if (!valid_event)
> >  			break;
> > -
> > -		wqe = (octtx_wqe_t *)(uintptr_t)ev.u64;
> > -		rte_prefetch_non_temporal(wqe);
> > -
> > -		/* Get mbuf from wqe */
> > -		mbuf = (struct rte_mbuf *)((uintptr_t)wqe -
> > -						OCTTX_PACKET_WQE_SKIP);
> > -		mbuf->packet_type =
> > -		ptype_table[wqe->s.w2.lcty][wqe->s.w2.lety][wqe->s.w2.lfty];
> > -		mbuf->data_off = RTE_PTR_DIFF(wqe->s.w3.addr, mbuf->buf_addr);
> > -		mbuf->pkt_len = wqe->s.w1.len;
> > -		mbuf->data_len = mbuf->pkt_len;
> > -		mbuf->nb_segs = 1;
> > -		mbuf->ol_flags = 0;
> > -		mbuf->port = rxq->port_id;
>
> IMO, You don't need to move the mbuf conversion inline function to 2/3,
> Instead if we do in 1/3.It will functionality correct at 1/3.
>
> > -		rte_mbuf_refcnt_set(mbuf, 1);
> > -		rx_pkts[count++] = mbuf;
> > +		rx_pkts[count++] = (struct rte_mbuf *)ev.u64;
>
> This will create build error on 32bit. You can avoid the typecast by
> changing to ev.mbuf.
> /export/dpdk-next-eventdev/drivers/net/octeontx/octeontx_rxtx.c: In
> function ‘octeontx_recv_pkts’:
> /export/dpdk-next-eventdev/drivers/net/octeontx/octeontx_rxtx.c:123:22:
> error: cast to pointer from integer of different size
> [-Werror=int-to-pointer-cast]
>    rx_pkts[count++] = (struct rte_mbuf *)ev.u64;
>                       ^
> cc1: all warnings being treated as errors

Agreed, will move mbuf conversion to 1/3 and fix 32 bit compilation issues and
send a v3.

Thanks,
Pavan

  reply	other threads:[~2017-10-24  6:56 UTC|newest]

Thread overview: 22+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-10-17  8:53 [dpdk-dev] [PATCH " Pavan Nikhilesh
2017-10-17  8:53 ` [dpdk-dev] [PATCH 2/3] event/octeontx: " Pavan Nikhilesh
2017-10-17 11:11   ` Rao, Nikhil
2017-10-18  8:12     ` Pavan Nikhilesh Bhagavatula
2017-10-24 14:27     ` Jerin Jacob
2017-10-17  8:53 ` [dpdk-dev] [PATCH 3/3] doc: add event octeontx Rx adapter limitation Pavan Nikhilesh
2017-10-18  8:48   ` Mcnamara, John
2017-10-18  9:06     ` Pavan Nikhilesh Bhagavatula
2017-10-17  9:29 ` [dpdk-dev] [PATCH 1/3] net/octeontx: add support for event Rx adapter Bhagavatula, Pavan
2017-10-18  8:45 ` [dpdk-dev] [PATCH v2 " Pavan Nikhilesh
2017-10-18  8:45   ` [dpdk-dev] [PATCH v2 2/3] event/octeontx: " Pavan Nikhilesh
2017-10-18  8:45   ` [dpdk-dev] [PATCH v2 3/3] doc: add event octeontx Rx adapter limitation Pavan Nikhilesh
2017-10-18  8:52     ` Mcnamara, John
2017-10-23 18:09   ` [dpdk-dev] [PATCH v2 1/3] net/octeontx: add support for event Rx adapter Jerin Jacob
2017-10-24  6:56     ` Pavan Nikhilesh Bhagavatula [this message]
2017-10-24  8:10   ` [dpdk-dev] [PATCH v3 " Pavan Nikhilesh
2017-10-24  8:10     ` [dpdk-dev] [PATCH v3 2/3] event/octeontx: " Pavan Nikhilesh
2017-10-24  8:10     ` [dpdk-dev] [PATCH v3 3/3] doc: add event octeontx Rx adapter limitation Pavan Nikhilesh
2017-10-24 13:00   ` [dpdk-dev] [PATCH v4 1/3] net/octeontx: add support for event Rx adapter Pavan Nikhilesh
2017-10-24 13:00     ` [dpdk-dev] [PATCH v4 2/3] event/octeontx: " Pavan Nikhilesh
2017-10-24 13:00     ` [dpdk-dev] [PATCH v4 3/3] doc: add event octeontx Rx adapter limitation Pavan Nikhilesh
2017-10-24 14:21     ` [dpdk-dev] [PATCH v4 1/3] net/octeontx: add support for event Rx adapter Jerin Jacob

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=20171024065621.GA15356@PBHAGAVATULA-LT \
    --to=pbhagavatula@caviumnetworks.com \
    --cc=dev@dpdk.org \
    --cc=jerin.jacob@caviumnetworks.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).