From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-wg0-f50.google.com (mail-wg0-f50.google.com [74.125.82.50]) by dpdk.org (Postfix) with ESMTP id 305F6AE9A for ; Thu, 22 May 2014 15:17:08 +0200 (CEST) Received: by mail-wg0-f50.google.com with SMTP id x12so3346830wgg.33 for ; Thu, 22 May 2014 06:17:17 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:message-id:date:from:user-agent:mime-version:to :subject:references:in-reply-to:content-type :content-transfer-encoding; bh=MVg1upOu9RKQMP+ZscAY0nL0LSQszd9kJhw5KwWIzhI=; b=fEjA2uA/5V0CeXa1hesoH1Bty9nkKkvvi8GRXKHgbwMD0Twvp7xZDtGqb/iAoasXym s3zyym4+fbaHWJPLOqUw5yUNtc00Qcjw7UJ5+67sN1zHnNKK5t07FpGpNGYOJwUSTTdz IDtRMv3NuCUQIPPzuXXGIZJI3eF6uMI/yzfZJAGCgjQzxqO8h4UReSKbGI4lHiFFrJWY p8efOGQQ2Dz6VybMINqvcn8Up1wUnrwf83UK0G+ZuzDxXDoKPE4zJVtdQZQ+BEWJvSAf tqbZrAiFRxuVAOMxyGjYyvPxWCUJCMPNfAefJKwAOIpFRFmLXqMdx8GBT10lCI4gPJ/l lfGw== X-Gm-Message-State: ALoCoQkBNmC03lx5nXcNqf8mJU/SJAkZ0yFyDRVTatw1x5+oLJZKQXeIlLVCJqehZVUULOYjsess X-Received: by 10.180.11.9 with SMTP id m9mr16342585wib.51.1400764637680; Thu, 22 May 2014 06:17:17 -0700 (PDT) Received: from [10.16.0.189] (6wind.net2.nerim.net. [213.41.180.237]) by mx.google.com with ESMTPSA id fa10sm327144wib.18.2014.05.22.06.17.15 for (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Thu, 22 May 2014 06:17:16 -0700 (PDT) Message-ID: <537DF8DA.5000402@6wind.com> Date: Thu, 22 May 2014 15:17:14 +0200 From: Ivan Boule User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:24.0) Gecko/20100101 Icedove/24.5.0 MIME-Version: 1.0 To: Ouyang Changchun , dev@dpdk.org References: <1400739073-32011-1-git-send-email-changchun.ouyang@intel.com> In-Reply-To: <1400739073-32011-1-git-send-email-changchun.ouyang@intel.com> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Subject: Re: [dpdk-dev] [PATCH 0/3] Support administrative link up and link down 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: Thu, 22 May 2014 13:17:08 -0000 On 05/22/2014 08:11 AM, Ouyang Changchun wrote: > This patch series contain the following 3 items: > 1. Add API to support administrative link up and down. > 2. Implement the functionality of administrative link up and down in IXGBE PMD. > 3. Add command in testpmd to test the functionality of administrative link up and down of PMD. > > Ouyang Changchun (3): > Add API for supporting administrative link up and down. > Implement the functionality of administrative link up and down in > IXGBE PMD. > Add command line to test the functionality of administrative link up > and down of PMD in testpmd. > > app/test-pmd/cmdline.c | 78 +++++++++++++++++++++++++++++++++++++ > app/test-pmd/testpmd.c | 14 +++++++ > app/test-pmd/testpmd.h | 2 + > lib/librte_ether/rte_ethdev.c | 38 ++++++++++++++++++ > lib/librte_ether/rte_ethdev.h | 34 ++++++++++++++++ > lib/librte_pmd_ixgbe/ixgbe_ethdev.c | 58 +++++++++++++++++++++++++++ > 6 files changed, 224 insertions(+) > Hi Changchun, The 2 functions "rte_eth_dev_admin_link_up" and "rte_eth_dev_admin_link_down" don't have an equivalent in the Linux kernel, thus I am wondering what is their effective usage from a network application perspective. Could you briefly explain in which use case these functions can be used for? By the way, it's not completely evident to infer the exact semantics of these 2 functions from their name. In particular, I do not see what the term "admin" brings to the understanding of their role. If it is to suggest that these functions are intended to force the link to a different state of its initial [self-detected] state, then the term "force" would be more appropriate. Otherwise, if eventually these functions appear to be mandatory, I suggest to rename them "rte_eth_dev_link_start" and "rte_eth_dev_link_stop" respectively, and to apply the same naming conventions in the 2 other patches. It might also be worth documenting in the comment section of the prototype of these 2 functions whether it makes sense or not to support a notion of link that can be dynamically started or stopped in non-physical PMDs (vmxnet3, virtio, etc). Regards, Ivan -- Ivan Boule 6WIND Development Engineer