From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-wi0-f178.google.com (mail-wi0-f178.google.com [209.85.212.178]) by dpdk.org (Postfix) with ESMTP id 19E4A5932 for ; Wed, 28 May 2014 00:47:44 +0200 (CEST) Received: by mail-wi0-f178.google.com with SMTP id cc10so2651744wib.5 for ; Tue, 27 May 2014 15:47:56 -0700 (PDT) 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:organization :user-agent:in-reply-to:references:mime-version :content-transfer-encoding:content-type; bh=mJXLYDDDh1oKvX8JdZ8i9Vtyyt4RASzYoE18b+sExNU=; b=gRMW9O1b1LWM9S6x0FQB0WIYbvqtvgeHtjwJppHXSupujwVdLjWaMn5C1U9Ni/sWUI 9nOLuNCIvMrtwTpcxyI0ESarpjdHAc85ZBByJU7QlO57Sy4E8sYGlRUzojWAognMvpET G/n7Hmep9mi/dkFFMtNcDvlQCYZyAXsLumxwfl+AietK7eIaXfHbLtEzM3/siBOQdbl0 M738gr8Hv+InBZfAdj5bcwk5lPCi3XAxnvzH6Vam0rgW9gRXKccyozYr/rCdkP2806kF ZIt2b0qssTi6hwj2PlKMLjSHEx5xOd6HTFFj2MoC17Cy83m0AA8yYq3Q5boCRvbujDrR XBeA== X-Gm-Message-State: ALoCoQliQ2e/PrkJ9rPB7V0PyIT4AQJHg4Vte3911KYE7FtAX2AbmVJuRGF4BhViSoz9sOf4OcPD X-Received: by 10.180.198.226 with SMTP id jf2mr31164703wic.35.1401230876089; Tue, 27 May 2014 15:47:56 -0700 (PDT) Received: from xps13.localnet (ip-96.net-80-236-123.rev.numericable.fr. [80.236.123.96]) by mx.google.com with ESMTPSA id wo9sm38313180wjb.48.2014.05.27.15.47.54 for (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Tue, 27 May 2014 15:47:55 -0700 (PDT) From: Thomas Monjalon To: Ouyang Changchun Date: Wed, 28 May 2014 00:47:52 +0200 Message-ID: <2115230.WNnKFPWGt0@xps13> Organization: 6WIND User-Agent: KMail/4.13 (Linux/3.14.4-1-ARCH; KDE/4.13.0; x86_64; ; ) In-Reply-To: <1401090331-18455-2-git-send-email-changchun.ouyang@intel.com> References: <1401090331-18455-1-git-send-email-changchun.ouyang@intel.com> <1401090331-18455-2-git-send-email-changchun.ouyang@intel.com> MIME-Version: 1.0 Content-Transfer-Encoding: 7Bit Content-Type: text/plain; charset="us-ascii" Cc: dev@dpdk.org Subject: Re: [dpdk-dev] [PATCH v2 1/3] ether: Add API to support setting TX rate for queue and VF 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: Tue, 27 May 2014 22:47:45 -0000 Hi Changchun, 2014-05-26 15:45, Ouyang Changchun: > /** > + * Set the rate limitation for a queue on an Ethernet device. > + * > + * @param port_id > + * The port identifier of the Ethernet device. > + * @param queue_idx > + * The queue id. > + * @param tx_rate > + * The tx rate allocated from the total link speed for this queue. > + * @return > + * - (0) if successful. > + * - (-ENOTSUP) if hardware doesn't support this feature. > + * - (-ENODEV) if *port_id* invalid. > + * - (-EINVAL) if bad parameter. > + */ > +int rte_eth_set_queue_rate_limit(uint8_t port_id, uint16_t queue_idx, > + uint16_t tx_rate); > + > +/** > + * Set the rate limitation for a vf on an Ethernet device. > + * > + * @param port_id > + * The port identifier of the Ethernet device. > + * @param vf > + * VF id. > + * @param tx_rate > + * The tx rate allocated from the total link speed for this VF id. > + * @param q_msk > + * The queue mask which need to set the rate. > + * @return > + * - (0) if successful. > + * - (-ENOTSUP) if hardware doesn't support this feature. > + * - (-ENODEV) if *port_id* invalid. > + * - (-EINVAL) if bad parameter. > + */ > +int rte_eth_set_vf_rate_limit(uint8_t port_id, uint16_t vf, > + uint16_t tx_rate, uint64_t q_msk); You are defining an API function specifically for VF. It's not generic and shouldn't appear in the API. We now have to be careful about the API and try to build a robust generic API which could become stable. Is it possible to imagine another API where only port and queue parameters are required? Thanks -- Thomas