From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mails.dpdk.org (mails.dpdk.org [217.70.189.124]) by inbox.dpdk.org (Postfix) with ESMTP id D83B0A00BE for ; Thu, 10 Mar 2022 16:12:19 +0100 (CET) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id C7AA241144; Thu, 10 Mar 2022 16:12:19 +0100 (CET) Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.129.124]) by mails.dpdk.org (Postfix) with ESMTP id 743434113E for ; Thu, 10 Mar 2022 16:12:18 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1646925138; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=adEuA3zQFYXAqedO2+Al/ONC5DgMZrOSmQYo5CXqt2w=; b=ZOLssazhw9tiof6X2e2CJoBqAoJXS07ioZqoTUsRjhgYhbD5pLtkfMH4jSade+Itip/Ygb /JLylr7ebJ98vGlsMYP5VpbUy1RiJ4HEWGI7OS5SvWBw+Z4IojmcqJTOtOvONv+CN6iLIG 9eIEcQUyI3eBXduIowHv6BXBL16aiCc= Received: from mail-lf1-f71.google.com (mail-lf1-f71.google.com [209.85.167.71]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id us-mta-633-KJujD8BOO1-pVsZ2kft2UQ-1; Thu, 10 Mar 2022 10:12:14 -0500 X-MC-Unique: KJujD8BOO1-pVsZ2kft2UQ-1 Received: by mail-lf1-f71.google.com with SMTP id bp30-20020a056512159e00b004484bd7ffe9so1869608lfb.5 for ; Thu, 10 Mar 2022 07:12:14 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=adEuA3zQFYXAqedO2+Al/ONC5DgMZrOSmQYo5CXqt2w=; b=V9Kro8D0vgTZ0N5nQLOXHbwbv9pYFpSwAX61T0wStkwlZw6R4mxOeuGL2x4GjKVr87 5EBEUJilLvs8+zlS7PdbxTQXUeF6/sR7oeGUam3azqP19YROYgqk0NvpO46DH2VZjB9S e9+5x+Uo3ySv4r4oMiZCy1PeaP4sybaVNEX8e+guBEIqQA0/87D9Hx1kv95WMfCWvrsU duwNUJVl5jouoOq7X02rqF37eo4gFusRH3liKDD65AOO3tvArUcxQhl7Su7zZJCBEGlY fbcFBHY7VjAgYgcmP8c1H+Ct59FRNysQp0VLYqwiy3ntlpDq4szeVks+x9kbn4RkzA8q IoJw== X-Gm-Message-State: AOAM530Ky2ysjvzvao6RwMPFJyh9uYrzX7URRc9Plry5W0N0tp0nxh1v BSvo8IqlClSfZgH4JYukTlwwGj4kFqoZ6yi+KCgQTkUE/5QOrFbNBC+mri/H4Qila0s6308AaEn hQJmkW/40vZ8iZpp9XkyaKb8= X-Received: by 2002:a2e:9886:0:b0:248:2bf:2d14 with SMTP id b6-20020a2e9886000000b0024802bf2d14mr3197258ljj.159.1646925133190; Thu, 10 Mar 2022 07:12:13 -0800 (PST) X-Google-Smtp-Source: ABdhPJx4lO0ziPQVpheoK77GOiuTkPQwux4u2e1vVPnd2lie3kfP9vJ9LMTS9LfbFfGOK0nnFzl0qzrvODpzQY5DUJU= X-Received: by 2002:a2e:9886:0:b0:248:2bf:2d14 with SMTP id b6-20020a2e9886000000b0024802bf2d14mr3197245ljj.159.1646925132961; Thu, 10 Mar 2022 07:12:12 -0800 (PST) MIME-Version: 1.0 References: <20220310131923.1144368-1-michaelba@nvidia.com> In-Reply-To: <20220310131923.1144368-1-michaelba@nvidia.com> From: David Marchand Date: Thu, 10 Mar 2022 16:12:01 +0100 Message-ID: Subject: Re: [PATCH] net/mlx5: fix FD configuration for Rx interrupt To: Michael Baum Cc: dev , Matan Azrad , Raslan Darawsheh , Viacheslav Ovsiienko , dpdk stable Authentication-Results: relay.mimecast.com; auth=pass smtp.auth=CUSA124A263 smtp.mailfrom=dmarchan@redhat.com X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Type: text/plain; charset="UTF-8" X-BeenThere: stable@dpdk.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: patches for DPDK stable branches List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: stable-bounces@dpdk.org On Thu, Mar 10, 2022 at 2:19 PM Michael Baum wrote: > > The mlx5_rx_intr_vec_enable() function allocates queue vector and fill > FD list for Rx interrupts. > > The driver wrongly configured the FD with a non-blocking flag which > prevent waiting on this FD. > > This patch removes O_NONBLOCK flag adding. - Maybe I deserve a Reported-by: credit on this issue. I sent a proposal to make use of Rx interrupts in OVS https://patchwork.ozlabs.org/project/openvswitch/patch/20220304161132.22065-1-david.marchand@redhat.com/. And that's when I noticed that mlx5 rx fds were waking OVS too often and reported it to mlx5 maintainers. - Testing this patch by starting dpdk-l3fwd-power example (and no traffic sent at all): # strace -r -f ./dpdk-dir/v21.11/examples/dpdk-l3fwd-power --lcores 0@3,1@5 -a 0000:82:00.0 --in-memory -- -p 0x1 -P --config '(0,0,1)' ... [pid 534983] 0.000348 epoll_wait(26, [], 1, 10) = 0 [pid 534983] 0.010082 read(24, For some reason, there is an event available for fd 18 right away (which is the issue in the first place). When reading this fd, read() blocks until an actual packet is received. Then, I send exactly one packet: [pid 534983] 0.010082 read(24, "@\217:\370\21\0\0\0", 136) = 8 [pid 534983] 9.228478 epoll_wait(26, [], 1, 10) = 0 [pid 534983] 0.010082 read(24, That makes mlx5 rx interrupts unusable for an application that does more than just polling one rxq. -- David Marchand