DPDK patches and discussions
 help / color / mirror / Atom feed
From: "Ouyang, Changchun" <changchun.ouyang@intel.com>
To: Thomas Monjalon <thomas.monjalon@6wind.com>
Cc: "dev@dpdk.org" <dev@dpdk.org>
Subject: Re: [dpdk-dev] [PATCH v2 1/3] ether: Add API to support setting TX rate for queue and VF
Date: Thu, 5 Jun 2014 03:30:06 +0000	[thread overview]
Message-ID: <F52918179C57134FAEC9EA62FA2F9625117C8899@shsmsx102.ccr.corp.intel.com> (raw)
In-Reply-To: <2115230.WNnKFPWGt0@xps13>

Hi Thomas,

As we can see below, There are already 4 existing functions for vf in the header file:
rte_ethdev.h:int rte_eth_dev_set_vf_rxmode(uint8_t port, uint16_t vf, uint16_t rx_mode,
rte_ethdev.h:rte_eth_dev_set_vf_tx(uint8_t port,uint16_t vf, uint8_t on);
rte_ethdev.h:rte_eth_dev_set_vf_rx(uint8_t port,uint16_t vf, uint8_t on);
rte_ethdev.h:rte_eth_dev_set_vf_vlan_filter(uint8_t port, uint16_t vlan_id,

So do we have plan to move them or remove them as they are all for VF specifically?
 
If no, why we can accept those functions, but not accept the rte_eth_set_vf_rate_limit? :-)

I have 2 new api in this patch, the rte_eth_set_queue_rate_limit is more generic, whose
Argument only have port and queue. 
but PRC customer has the requirement of API function to limit the vf tx rate,
so personally I think rte_eth_set_vf_rate_limit is necessary for them.

Thanks and regards,
Changchun

-----Original Message-----
From: Thomas Monjalon [mailto:thomas.monjalon@6wind.com] 
Sent: Wednesday, May 28, 2014 6:48 AM
To: Ouyang, Changchun
Cc: dev@dpdk.org
Subject: Re: [dpdk-dev] [PATCH v2 1/3] ether: Add API to support setting TX rate for queue and VF

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

  reply	other threads:[~2014-06-05  3:29 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-05-26  7:45 [dpdk-dev] [PATCH v2 0/3] Support " Ouyang Changchun
2014-05-26  7:45 ` [dpdk-dev] [PATCH v2 1/3] ether: Add API to support " Ouyang Changchun
2014-05-27 22:47   ` Thomas Monjalon
2014-06-05  3:30     ` Ouyang, Changchun [this message]
2014-06-10 23:02       ` Thomas Monjalon
2014-05-26  7:45 ` [dpdk-dev] [PATCH v2 2/3] ixgbe: Implement the functionality of setting TX rate for queue or VF in IXGBE PMD Ouyang Changchun
2014-05-26  7:45 ` [dpdk-dev] [PATCH v2 3/3] testpmd: Add commands to test the functionality of setting TX rate for queue or VF Ouyang Changchun
2014-05-26 22:52 ` [dpdk-dev] [PATCH v2 0/3] Support setting TX rate for queue and VF Neil Horman
2014-06-05  3:11   ` Ouyang, Changchun
2014-06-05 11:01     ` Neil Horman
     [not found] ` <F52918179C57134FAEC9EA62FA2F9625117C89F0@shsmsx102.ccr.corp.intel.com>
2014-06-05  5:32   ` Liu, Jijiang
2014-06-05 12:41 ` Cao, Waterman
2014-06-06  6:52 ` Xie, Huawei
2014-06-11 14:05   ` Thomas Monjalon

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=F52918179C57134FAEC9EA62FA2F9625117C8899@shsmsx102.ccr.corp.intel.com \
    --to=changchun.ouyang@intel.com \
    --cc=dev@dpdk.org \
    --cc=thomas.monjalon@6wind.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).