From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-wm0-f51.google.com (mail-wm0-f51.google.com [74.125.82.51]) by dpdk.org (Postfix) with ESMTP id BF0A1AE00 for ; Wed, 22 Jun 2016 19:01:47 +0200 (CEST) Received: by mail-wm0-f51.google.com with SMTP id a66so14882747wme.0 for ; Wed, 22 Jun 2016 10:01:47 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=6wind-com.20150623.gappssmtp.com; s=20150623; h=from:to:cc:subject:date:message-id:user-agent:in-reply-to :references:mime-version:content-transfer-encoding; bh=FF9lf0Sf1JmfjosD2mcSYf1MITTrfx0giOnny45CxBI=; b=fts4xC3iz/eYPFdHhGlJupzsCqVvm2RNYFc0ZXcMPCbZy0FGmDo3GWdWGxegdVDzXL s/QZaRb2+lOcdAjjfh759jczOS81P79GNBq5AvfznDmr2XNXFRlXpfMWytI8TAkvl2CB huMzF+N3L+P9JhtPs1mY6ut6+yaAb82UDSZXplZpbFvSpjJ8XkCL2KTak53XnxZZhRVK zivO+eKo//LUoBtsN/hOh8Hcj88c9MDosK75v1Pk1ZakecsQSjcmA2ZwekYQLZS9ATig YVYMDTzHfsYMTTdPXixica2YBurROOApwjwKWAOnAOCathKKmd6k/eT3DLbqyEI4wyv8 PSxg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:from:to:cc:subject:date:message-id:user-agent :in-reply-to:references:mime-version:content-transfer-encoding; bh=FF9lf0Sf1JmfjosD2mcSYf1MITTrfx0giOnny45CxBI=; b=nAB54oLtrgL6avoYS+hlzviDzpF1GZ4wa1Ocdt7XpMzinHSm1fQV9JanjHeoJsclrG h6nwa7/3oh79Pw4DVZGy4vrcvJ1FHwvcQDHLeAVwis0lsIOfbC3uB57wV0ZfTOeHftRm 1NI3ZqhGYPx5Tc8x0ld3dFZ5exKgliJoomsAOIiu0OaTpjsYqNuPOttC3n1pSFx3HRql E1s9IsyK9mVpkpokoqroqOYbKRY3PN3ptJGYIuf2oPe0UFDdBSV1jauHaVXVDkRaWIdk XT8/RwXeJ30eWjbQUk3VGOTOxg6ge97Oxlodk420jk3lsP8RI9flOg/RsbINp3FFxfW/ UWbw== X-Gm-Message-State: ALyK8tKGkwRdcSVU0DbBuokuTNROr6MkVi46ajVPnMq55WMGiGKsw9hqs0sbuY0VUvp59wu8 X-Received: by 10.28.153.138 with SMTP id b132mr9717797wme.94.1466614907484; Wed, 22 Jun 2016 10:01:47 -0700 (PDT) Received: from xps13.localnet (184.203.134.77.rev.sfr.net. [77.134.203.184]) by smtp.gmail.com with ESMTPSA id r6sm1497687wme.14.2016.06.22.10.01.36 (version=TLSv1/SSLv3 cipher=OTHER); Wed, 22 Jun 2016 10:01:40 -0700 (PDT) From: Thomas Monjalon To: Wenzhuo Lu Cc: dev@dpdk.org Date: Wed, 22 Jun 2016 19:01:34 +0200 Message-ID: <1871393.ccgjmFpxqt@xps13> User-Agent: KMail/4.14.10 (Linux/4.5.4-1-ARCH; KDE/4.14.11; x86_64; ; ) In-Reply-To: <1462484040-1702-1-git-send-email-wenzhuo.lu@intel.com> References: <1460363050-27962-1-git-send-email-wenzhuo.lu@intel.com> <1462484040-1702-1-git-send-email-wenzhuo.lu@intel.com> MIME-Version: 1.0 Content-Transfer-Encoding: 7Bit Content-Type: text/plain; charset="us-ascii" Subject: Re: [dpdk-dev] [PATCH v3] ethdev: fix DCB config issue on ixgbe X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: patches and discussions about DPDK List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 22 Jun 2016 17:01:47 -0000 2016-05-06 05:33, Wenzhuo Lu: > An issue is found that DCB cannot be configured on ixgbe > NICs. It's said the TX queue number is not right. > On ixgbe the max TX queue number is not fixed, it depends > on the multi-queue mode. The API rte_eth_dev_configure > should be used to configure this mode. But the input of > this API includes TX queue number. The problem is before > the mode is configured, we cannot decide the TX queue > number. > > This patch adds an API to configure RX & TX multi-queue mode > separately. After the mode is configured, the max RX & TX > queue number is decided. Then we can set the appropriate > RX & TX queue number. [...] > +/** > + * Set RX & TX multi_queue mode. > + * > + * @param port_id > + * The port identifier of the Ethernet device. > + * @param rx_mq_mode > + * RX multi_queue mode. > + * @param tx_mq_mode > + * TX multi_queue mode. > + * > + * @return > + * - (0) if successful. > + * - (-ENODEV) if port identifier is invalid. > + */ > +int > +rte_eth_dev_mq_mode_set(uint8_t port_id, > + enum rte_eth_rx_mq_mode rx_mq_mode, > + enum rte_eth_tx_mq_mode tx_mq_mode); I've really tried to think about it and I think it is more or less a hack. First, it is not explained in the doc when we should use rte_eth_dev_mq_mode_set() instead of a simple call to rte_eth_dev_configure(). Second, I don't understand why having a function which configures the "multiqueue modes" without configuring properly RSS/VMDq/DCB. Last, it is said that rte_eth_dev_configure() "must be invoked first before any other function in the Ethernet API". My opinion is that the primary goal of rte_eth_dev_configure() was "Embedding all configuration information in a single data structure" but it is currently configuring only speed and some flow steering (only RSS, VMDq, DCB and flow director). This bug and the state of the ethdev API clearly shows that we must have one function per feature (or group of features) and drop rte_eth_dev_configure(). You can argue it is a just a personal feeling and this comment comes late, but I promise it is not easy to give a negative opinion because of design perspective. I strongly feel we must stop workarounding the ethdev API issues and start really fixing it. Hope you understand and agree to work on a new API.