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 B116342BE4 for ; Tue, 30 May 2023 18:24:33 +0200 (CEST) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 3DE00410EE; Tue, 30 May 2023 18:24:33 +0200 (CEST) Received: from mail-pg1-f174.google.com (mail-pg1-f174.google.com [209.85.215.174]) by mails.dpdk.org (Postfix) with ESMTP id E9721410DD for ; Tue, 30 May 2023 18:24:31 +0200 (CEST) Received: by mail-pg1-f174.google.com with SMTP id 41be03b00d2f7-51452556acdso2936293a12.2 for ; Tue, 30 May 2023 09:24:31 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=networkplumber-org.20221208.gappssmtp.com; s=20221208; t=1685463871; x=1688055871; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:subject:cc:to:from:date:from:to:cc:subject:date :message-id:reply-to; bh=z9AZtNQI3WWPaA2JDHdsdDj7nX6+iviZNXNre6MTGfk=; b=lXg3G3sUJKBjC2Pm2aPdj7qzF3Tn2mbpEk74sH0Nc8HhFlyM/ScAYf7a2aedNJ5RKc PnrexpmeA4mo1YzepTvUGp5F8QRqbxZzP+QEi1m93Im7GOVOCucmIfDmtmILXJJllcaO MqK2ec8BADat8ell0wWzLvh59ZonaNWLoktpReMyONlGrO2OXWDIxMouaKlRO+G0CS0x MZzimGxX6kZEIBCb0M6FvFSsueIenJvTeA1kgUvmUK36y0zkKSnbad+A7+eJNqOpRNGO DwMDhJ2CUhMpXm91pMpWThFwszP6WkCUXK9eZmUCnns7f67sF9iJBCwHV5QY5jfKXjFU Npmw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1685463871; x=1688055871; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:subject:cc:to:from:date:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=z9AZtNQI3WWPaA2JDHdsdDj7nX6+iviZNXNre6MTGfk=; b=N1oj229DJXRb3emFDwoMYP/XcHlFa77HRWlelAvsYRKNcum17mKGWe+tRmj07sxsh/ YHY/qQ7HvFekEOe+puarmnYs1thgx9bd3b8ctwEBdRV50hDE2MbBJsOJGPSItvq5OZt6 FeGmagGHS7ThCCXA+TtNhZSeCSH1PB1tbXpFSGtfGZpnz06BceYhNh8C1FePMVqo+qfi BVQQFmPmBtOJa5VP6/AxrEPSwNeuf8B5N8GfDYA6wyuZHa2uUtUqjnmEJJVimEdKDrDR GY/nQ7nu03eENMYleC1SjzNuEo4KEfbF+pyQ7R4K6fTWJDf0oShZ1jk51nojNsz9Trdb 7Tpw== X-Gm-Message-State: AC+VfDzLyCaYriill203RbEVfXWWILRSqYciTUMqojQnWAsBLBvpjsMG GY7+nD0tfp8jVkFHNYJnTt9CLQ== X-Google-Smtp-Source: ACHHUZ4T4EGmVe2YlWPJVbiUlHy2IZjA+F0kuuP90l82RR/xPjuV8qVvdjIeZmFfUkgvbA/cShy5Dg== X-Received: by 2002:a17:902:7043:b0:19d:1834:92b9 with SMTP id h3-20020a170902704300b0019d183492b9mr2704188plt.56.1685463871009; Tue, 30 May 2023 09:24:31 -0700 (PDT) Received: from hermes.local (204-195-120-218.wavecable.com. [204.195.120.218]) by smtp.gmail.com with ESMTPSA id a4-20020a170902b58400b001ac7ab3e97csm10456100pls.260.2023.05.30.09.24.30 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 30 May 2023 09:24:30 -0700 (PDT) Date: Tue, 30 May 2023 09:24:29 -0700 From: Stephen Hemminger To: Fengkai Sun Cc: users@dpdk.org Subject: Re: Scheduling of multiple RX/TX queues on a single port Message-ID: <20230530092429.00e68897@hermes.local> In-Reply-To: References: MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit X-BeenThere: users@dpdk.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: DPDK usage discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: users-bounces@dpdk.org On Mon, 29 May 2023 23:02:45 +0800 Fengkai Sun wrote: > Hi list, > > I'm curious how DPDK programs the NIC to receive/transmit packets when > there are multiple queues on a single port. > > As for RX, the answer might be clear. > The NIC can only receive a packet once at a time, since the cable only > outputs one signal (0 or 1) at a time (correct me if I'm wrong). > Therefore the NIC can receive a packet, check it's information, and finally > put in into the right queue via some policies, e.g. RSS, all sequentially. > > However, it confuses me when it comes to TX. > As there are multiple TX queues on the same port, the NIC must decide which > queue to get packets from when it's idle. > This is where scheduling lies. How does the NIC select the queue? > Round-Robin? Does it have to enforce fairness among the queues? > > I'm wondering where I can find some documentation on this issue. Thank you! Transmit scheduling is up to the hardware (not DPDK). Generally I assume it is round-robin but there maybe cases like priority queues (like DCB) or large packets with segment offload.