DPDK patches and discussions
 help / color / mirror / Atom feed
From: Lewis Donzis <lew@perftech.com>
To: "Ananyev, Konstantin" <konstantin.ananyev@intel.com>
Cc: Bruce Richardson <bruce.richardson@intel.com>, dev <dev@dpdk.org>,
	 yongwang <yongwang@vmware.com>
Subject: Re: vmxnet3 no longer functional on DPDK 21.11
Date: Mon, 6 Dec 2021 07:58:39 -0600 (CST)	[thread overview]
Message-ID: <1363635277.2864001.1638799119299.JavaMail.zimbra@donzis.com> (raw)
In-Reply-To: <DM6PR11MB4491AD0722B029C4E8E117959A6D9@DM6PR11MB4491.namprd11.prod.outlook.com>


----- On Dec 6, 2021, at 6:08 AM, Ananyev, Konstantin konstantin.ananyev@intel.com wrote:

> So to clarify, it fails at:
> static int
> vmxnet3_dev_start(struct rte_eth_dev *dev)
> {
>	...
> line 1695:
>	if (rte_intr_enable(dev->intr_handle) < 0) {
>                PMD_INIT_LOG(ERR, "interrupt enable failed");
>                return -EIO;
>        }
> 
> Right?

That's right.  And further, the failure inside of rte_intr_enable() is the test on rte_intr_dev_fd_get():

int
rte_intr_enable(const struct rte_intr_handle *intr_handle)
{
        ...
        if (rte_intr_fd_get(intr_handle) < 0 ||
                        rte_intr_dev_fd_get(intr_handle) < 0) {
                rc = -1;
                goto out;
        }

        switch (rte_intr_type_get(intr_handle)) {
        /* not used at this moment */
        case RTE_INTR_HANDLE_ALARM:
                rc = -1;
                break;
        /* not used at this moment */
        case RTE_INTR_HANDLE_DEV_EVENT:
                rc = -1;
                break;
        /* unknown handle type */
        default:
                RTE_LOG(ERR, EAL, "Unknown handle type of fd %d\n",
                        rte_intr_fd_get(intr_handle));
                rc = -1;
                break;
        }

out:
        rte_eal_trace_intr_enable(intr_handle, rc);
        return rc;
}


Two things about this code that confuse me:

1. rte_intr_dev_fd_get(intr_handle) just returns the value of intr_handle->dev_fd, which is never set to anything other than -1 in any code I can find.

2. Even if it made it past that "if" statement, I don't see how the switch that follows ever *doesn't* return an error, i.e., every single case results in an error!  Even if it got past rte_intr_dev_fd_get(), the interrupt type is neither of the first two cases, so it would presumably execute the default case.


> The strange thing here is that 7a0935239b9e
> doesn't change dev_start or rte_intr code in any way.

I agree, and also don't see any way the diffs between those two commits could cause this.


> Anyway, if git blames that commit, let's try to figure out what is going on.
> Unfortunately, I don't have freebsd with vmxnet3, so will need to rely on your
> help here.

Sure no problem.  If it helps, we could arrange for remote access to a FreeBSD VM, but I suspect this is going to be something simple, so let's see if we can get it figured out.


> As the first thing can you try to run testpmd build with last good commit
> (c87d435a4d79)
> and then testpmd build with bad commit applied and collect for both cases:
> - contents of 'struct rte_eth_dev' and ' rte_eth_dev->intr_handle' for
>  your vmxnet3 port
> - debug log output (--log-level=eal,debug --log-level=pmd,debug)

Ok, we'll check it out.

Thanks,
lew

  reply	other threads:[~2021-12-06 13:58 UTC|newest]

Thread overview: 23+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-11-29 20:45 Lewis Donzis
2021-11-30  8:53 ` Ferruh Yigit
2021-11-30 13:42 ` Bruce Richardson
2021-12-06  1:52   ` Lewis Donzis
2021-12-06  9:16     ` Bruce Richardson
2021-12-06 12:08       ` Ananyev, Konstantin
2021-12-06 13:58         ` Lewis Donzis [this message]
2022-06-03 13:19         ` Lewis Donzis
2022-06-03 15:25           ` Ferruh Yigit
2024-01-06 14:50           ` Lewis Donzis
2024-01-09 10:21             ` Bruce Richardson
2024-01-09 13:46               ` Lewis Donzis
2024-01-09 14:28                 ` Bruce Richardson
2024-01-09 15:21                   ` Lewis Donzis
2024-01-09 15:35                     ` Bruce Richardson
2024-01-09 23:55               ` Stephen Hemminger
2024-01-10 13:36                 ` Lewis Donzis
2024-01-09 14:23             ` [PATCH] net/vmxnet3: fix use of interrupts on FreeBSD Bruce Richardson
2024-01-09 16:00               ` Lewis Donzis
2024-01-11 12:03                 ` Ferruh Yigit
2024-01-24 12:34                   ` Lewis Donzis
2024-01-24 13:58                     ` Ferruh Yigit
2024-01-24 14:04                       ` Lewis Donzis

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=1363635277.2864001.1638799119299.JavaMail.zimbra@donzis.com \
    --to=lew@perftech.com \
    --cc=bruce.richardson@intel.com \
    --cc=dev@dpdk.org \
    --cc=konstantin.ananyev@intel.com \
    --cc=yongwang@vmware.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).