DPDK patches and discussions
 help / color / mirror / Atom feed
From: Jerin Jacob <jerinjacobk@gmail.com>
To: Sathesh Edara <sedara@marvell.com>
Cc: sburla@marvell.com, jerinj@marvell.com,
	 Radha Mohan Chintakuntla <radhac@marvell.com>,
	Veerasenareddy Burru <vburru@marvell.com>,
	dev@dpdk.org
Subject: Re: [PATCH v1 2/2] net/octeon_ep: support port kind
Date: Thu, 2 Mar 2023 22:35:44 +0530	[thread overview]
Message-ID: <CALBAE1MbGMKFsgk-=9Tm4j5ApezB58pP5trHA8FXGMecaZA6jw@mail.gmail.com> (raw)
In-Reply-To: <20230221143627.219917-3-sedara@marvell.com>

On Tue, Feb 21, 2023 at 8:07 PM Sathesh Edara <sedara@marvell.com> wrote:
>
> Added port kind functionality.
>
> Signed-off-by: Sathesh Edara <sedara@marvell.com>

Series applied to dpdk-next-net-mrvl/for-next-net. Thanks


> ---
>  drivers/net/octeon_ep/otx_ep_common.h |  1 +
>  drivers/net/octeon_ep/otx_ep_ethdev.c |  2 +-
>  drivers/net/octeon_ep/otx_ep_rxtx.c   | 16 ++++++++--------
>  3 files changed, 10 insertions(+), 9 deletions(-)
>
> diff --git a/drivers/net/octeon_ep/otx_ep_common.h b/drivers/net/octeon_ep/otx_ep_common.h
> index 7eb50af75a..e4c92270d4 100644
> --- a/drivers/net/octeon_ep/otx_ep_common.h
> +++ b/drivers/net/octeon_ep/otx_ep_common.h
> @@ -32,6 +32,7 @@
>  #define OTX_EP_PCI_RING_ALIGN   65536
>  #define SDP_PKIND 40
>  #define SDP_OTX2_PKIND 57
> +#define SDP_OTX2_PKIND_FS0 0
>
>  #define      ORDERED_TAG 0
>  #define      ATOMIC_TAG  1
> diff --git a/drivers/net/octeon_ep/otx_ep_ethdev.c b/drivers/net/octeon_ep/otx_ep_ethdev.c
> index 0930efedce..f43db1e398 100644
> --- a/drivers/net/octeon_ep/otx_ep_ethdev.c
> +++ b/drivers/net/octeon_ep/otx_ep_ethdev.c
> @@ -495,7 +495,7 @@ otx_ep_eth_dev_init(struct rte_eth_dev *eth_dev)
>
>         otx_epdev_init(otx_epvf);
>         if (pdev->id.device_id == PCI_DEVID_CN9K_EP_NET_VF)
> -               otx_epvf->pkind = SDP_OTX2_PKIND;
> +               otx_epvf->pkind = SDP_OTX2_PKIND_FS0;
>         else
>                 otx_epvf->pkind = SDP_PKIND;
>         otx_ep_info("using pkind %d\n", otx_epvf->pkind);
> diff --git a/drivers/net/octeon_ep/otx_ep_rxtx.c b/drivers/net/octeon_ep/otx_ep_rxtx.c
> index 59df6ad857..6912ca2401 100644
> --- a/drivers/net/octeon_ep/otx_ep_rxtx.c
> +++ b/drivers/net/octeon_ep/otx_ep_rxtx.c
> @@ -17,7 +17,8 @@
>  #include "otx_ep_rxtx.h"
>
>  /* SDP_LENGTH_S specifies packet length and is of 8-byte size */
> -#define INFO_SIZE 8
> +#define OTX_EP_INFO_SIZE 8
> +#define OTX_EP_FSZ_FS0 0
>  #define DROQ_REFILL_THRESHOLD 16
>
>  static void
> @@ -678,7 +679,7 @@ otx2_ep_xmit_pkts(void *tx_queue, struct rte_mbuf **pkts, uint16_t nb_pkts)
>         iqcmd2.irh.u64 = 0;
>
>         /* ih invars */
> -       iqcmd2.ih.s.fsz = OTX2_EP_FSZ;
> +       iqcmd2.ih.s.fsz = OTX_EP_FSZ_FS0;
>         iqcmd2.ih.s.pkind = otx_ep->pkind; /* The SDK decided PKIND value */
>         /* irh invars */
>         iqcmd2.irh.s.opcode = OTX_EP_NW_PKT_OP;
> @@ -875,12 +876,11 @@ otx_ep_droq_read_packet(struct otx_ep_device *otx_ep,
>
>         info->length = rte_bswap64(info->length);
>         /* Deduce the actual data size */
> -       total_pkt_len = info->length + INFO_SIZE;
> +       total_pkt_len = info->length + OTX_EP_INFO_SIZE;
>         if (total_pkt_len <= droq->buffer_size) {
> -               info->length -=  OTX_EP_RH_SIZE;
>                 droq_pkt  = droq->recv_buf_list[droq->read_idx];
>                 if (likely(droq_pkt != NULL)) {
> -                       droq_pkt->data_off += OTX_EP_DROQ_INFO_SIZE;
> +                       droq_pkt->data_off += OTX_EP_INFO_SIZE;
>                         /* otx_ep_dbg("OQ: pkt_len[%ld], buffer_size %d\n",
>                          * (long)info->length, droq->buffer_size);
>                          */
> @@ -917,11 +917,11 @@ otx_ep_droq_read_packet(struct otx_ep_device *otx_ep,
>                                 droq_pkt->port = otx_ep->port_id;
>                                 if (!pkt_len) {
>                                         droq_pkt->data_off +=
> -                                               OTX_EP_DROQ_INFO_SIZE;
> +                                               OTX_EP_INFO_SIZE;
>                                         droq_pkt->pkt_len =
> -                                               cpy_len - OTX_EP_DROQ_INFO_SIZE;
> +                                               cpy_len - OTX_EP_INFO_SIZE;
>                                         droq_pkt->data_len =
> -                                               cpy_len - OTX_EP_DROQ_INFO_SIZE;
> +                                               cpy_len - OTX_EP_INFO_SIZE;
>                                 } else {
>                                         droq_pkt->pkt_len = cpy_len;
>                                         droq_pkt->data_len = cpy_len;
> --
> 2.31.1
>

      reply	other threads:[~2023-03-02 17:06 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-02-21 14:36 [PATCH v1 0/2] net/octeon_ep: support device close and " Sathesh Edara
2023-02-21 14:36 ` [PATCH v1 1/2] net/octeon_ep: support device close Sathesh Edara
2023-02-21 14:36 ` [PATCH v1 2/2] net/octeon_ep: support port kind Sathesh Edara
2023-03-02 17:05   ` Jerin Jacob [this message]

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='CALBAE1MbGMKFsgk-=9Tm4j5ApezB58pP5trHA8FXGMecaZA6jw@mail.gmail.com' \
    --to=jerinjacobk@gmail.com \
    --cc=dev@dpdk.org \
    --cc=jerinj@marvell.com \
    --cc=radhac@marvell.com \
    --cc=sburla@marvell.com \
    --cc=sedara@marvell.com \
    --cc=vburru@marvell.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).