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 72B4CA0093; 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 06B6E4113F; 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 E33F64113E for ; Thu, 10 Mar 2022 16:12:17 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1646925137; 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=gEIBke3CJ6VdO9FkaIOenGH1h27DdQNt7feFHtONQJgSBRFZOGGeQujsI96rYlpzkUdVRX 9JACd5RsnIYQaL6JFhg2lgLgCFiNYd2L4YkRlGu8Sl92I55UTiFjsezQZIzeoLtQiito6k f382sMefpphSzyO9ZzD2KRG+yDWdVfM= 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-411-RmYXCgNFNk-xqnEp8eewGw-1; Thu, 10 Mar 2022 10:12:14 -0500 X-MC-Unique: RmYXCgNFNk-xqnEp8eewGw-1 Received: by mail-lf1-f71.google.com with SMTP id y23-20020a0565123f1700b00448221b91e5so1879697lfa.13 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=TEW8OYDNbCYmqnwnL18Nvn9p9Nw1aB3hHTFZlZa6/3pal71GLVtyzMGq/M0pTBIRTl tDtMKk8iY2701ySLi/211R+KzkwHZ1bNAUmHWbDPE6eptBsgf2L0k0SSlYn+G7VS1tDF h6kFVSJldOAgCVWb2JkkD1NhQ9Ct8Rp132+sLsKyT2eG91ReBkSL26ktxbIlMWmDSpwP CpudBR3xuRzbVSJB8xhr2P4+IrRr0gxHImHgt329VI5waNPohRJNF+xVdSam5Z66WjY/ 9wjJEkuL+0bZUKbm2p4mHRq4/XsAugo1NyZxr28ajhmD6VkwUutUABfzsR6/f4h5HYka iPLQ== X-Gm-Message-State: AOAM532VC5slXxDTvSPA1nvaLGcPFbLJ1ObUrJ43UYdOnV0KGWrZmDAQ CdweA0gkXs0LgcCwuqlu3AHva3UUzyIxUNoPv3IulErSFFi67WCEl/5QxwHZqOY0PBdtW1vLJVU Hb1n7nq0T5ngzhVQStW8= X-Received: by 2002:a2e:9886:0:b0:248:2bf:2d14 with SMTP id b6-20020a2e9886000000b0024802bf2d14mr3197263ljj.159.1646925133302; 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: dev@dpdk.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-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