From: Jerin Jacob Kollanukkaran <jerinj@marvell.com>
To: Krzysztof Kanas <kkanas@marvell.com>,
"dev@dpdk.org" <dev@dpdk.org>,
Nithin Kumar Dabilpuram <ndabilpuram@marvell.com>,
Kiran Kumar Kokkilagadda <kirankumark@marvell.com>
Cc: Krzysztof Kanas <kkanas@marvell.com>
Subject: Re: [dpdk-dev] [PATCH] net/octeontx2: fix driver reconfiguration
Date: Mon, 22 Jul 2019 14:39:42 +0000 [thread overview]
Message-ID: <BYAPR18MB242425E94650B7D53A0ED31EC8C40@BYAPR18MB2424.namprd18.prod.outlook.com> (raw)
In-Reply-To: <20190722130558.13063-1-kkanas@marvell.com>
> -----Original Message-----
> From: kkanas@marvell.com <kkanas@marvell.com>
> Sent: Monday, July 22, 2019 6:36 PM
> To: dev@dpdk.org; Jerin Jacob Kollanukkaran <jerinj@marvell.com>; Nithin
> Kumar Dabilpuram <ndabilpuram@marvell.com>; Kiran Kumar Kokkilagadda
> <kirankumark@marvell.com>
> Cc: Krzysztof Kanas <kkanas@marvell.com>
> Subject: [dpdk-dev] [PATCH] net/octeontx2: fix driver reconfiguration
>
> From: Krzysztof Kanas <kkanas@marvell.com>
>
> When configure returns error, e.g. in case not supported offloads (outer ip
> and sctp) driver released Rx,Tx queues. Then in case of correct configuration
> the driver could not start due to queues already released but the driver
> thought it was configured correctly.
>
> Secondly if driver returns error from configuration librte_ethdev will release,
> rx queues and tx queues, without chaining driver configured state.
>
> Fix that by 'releasing' configuration and changing driver state when error is
> returned from otx2_nix_configure.
>
> Fixes: 548b5839a32b ("net/octeontx2: add device configure operation")
>
> Signed-off-by: Krzysztof Kanas <kkanas@marvell.com>
> Reviewed-by: Jerin Jacob Kollanukkaran <jerinj@marvell.com>
> Reviewed-by: Nithin Kumar Dabilpuram <ndabilpuram@marvell.com>
> ---
> drivers/net/octeontx2/otx2_ethdev.c | 65 +++++++++++++++++------------
> 1 file changed, 38 insertions(+), 27 deletions(-)
>
> + if (otx2_dev_is_A0(dev) &&
Please change to otx2_dev_is_Ax(). See below.
> + (txmode->offloads & DEV_TX_OFFLOAD_SCTP_CKSUM) &&
> + ((txmode->offloads & DEV_TX_OFFLOAD_OUTER_IPV4_CKSUM)
> ||
> + (txmode->offloads & DEV_TX_OFFLOAD_OUTER_UDP_CKSUM))) {
> + otx2_err("Outer IP and SCTP checksum unsupported");
> + goto fail_configure;
> }
>
> /* Free the resources allocated from the previous configure */ @@ -
> 1230,20 +1238,11 @@ otx2_nix_configure(struct rte_eth_dev *eth_dev)
> nix_set_nop_rxtx_function(eth_dev);
> rc = nix_store_queue_cfg_and_then_release(eth_dev);
> if (rc)
> - goto fail;
> + goto fail_configure;
> otx2_nix_tm_fini(eth_dev);
> nix_lf_free(dev);
> }
>
> - if (otx2_dev_is_Ax(dev) &&
See above.
> - (txmode->offloads & DEV_TX_OFFLOAD_SCTP_CKSUM) &&
> - ((txmode->offloads & DEV_TX_OFFLOAD_OUTER_IPV4_CKSUM)
> ||
> - (txmode->offloads & DEV_TX_OFFLOAD_OUTER_UDP_CKSUM))) {
> - otx2_err("Outer IP and SCTP checksum unsupported");
> - rc = -EINVAL;
> - goto fail;
> - }
next prev parent reply other threads:[~2019-07-22 14:39 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-07-22 13:05 kkanas
2019-07-22 14:39 ` Jerin Jacob Kollanukkaran [this message]
2019-07-22 14:58 ` [dpdk-dev] [PATCH v2] " kkanas
2019-07-22 16:02 ` Jerin Jacob Kollanukkaran
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=BYAPR18MB242425E94650B7D53A0ED31EC8C40@BYAPR18MB2424.namprd18.prod.outlook.com \
--to=jerinj@marvell.com \
--cc=dev@dpdk.org \
--cc=kirankumark@marvell.com \
--cc=kkanas@marvell.com \
--cc=ndabilpuram@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).