All of lore.kernel.org
 help / color / mirror / Atom feed
From: Stephen Hemminger <stephen@networkplumber.org>
To: Billy McFall <bmcfall@redhat.com>
Cc: thomas.monjalon@6wind.com, wenzhuo.lu@intel.com, dev@dpdk.org
Subject: Re: [PATCH v2 1/3] ethdev: new API to free consumed buffers in Tx ring
Date: Wed, 11 Jan 2017 17:41:17 -0800	[thread overview]
Message-ID: <20170111174117.0b450730@xeon-e3> (raw)
In-Reply-To: <20170111200323.12938-2-bmcfall@redhat.com>

On Wed, 11 Jan 2017 15:03:21 -0500
Billy McFall <bmcfall@redhat.com> wrote:

>  /**
> + * Request the driver to free mbufs currently cached by the driver. The
> + * driver will only free the mbuf if it is no longer in use. It is the
> + * application's responsibity to ensure rte_eth_tx_buffer_flush(..) is
> + * called if needed.
> + *
> + * @param port_id
> + *   The port identifier of the Ethernet device.
> + * @param queue_id
> + *   The index of the transmit queue through which output packets must be
> + *   sent.
> + *   The value must be in the range [0, nb_tx_queue - 1] previously supplied
> + *   to rte_eth_dev_configure().
> + * @param free_cnt
> + *   Maximum number of packets to free. Use 0 to indicate all possible packets
> + *   should be freed. Note that a packet may be using multiple mbufs.
> + * @return
> + *   Failure: < 0
> + *     -ENODEV: Invalid interface
> + *     -ENOTSUP: Driver does not support function
> + *   Success: >= 0
> + *     0-n: Number of packets freed. More packets may still remain in ring that
> + *     are in use.
> + */
> +
> +static inline int
> +rte_eth_tx_done_cleanup(uint8_t port_id, uint16_t queue_id,  uint32_t free_cnt)

Extra white space.

> +{
> +	struct rte_eth_dev *dev = &rte_eth_devices[port_id];
> +
> +	/* Validate Input Data. Bail if not valid or not supported. */
> +	RTE_ETH_VALID_PORTID_OR_ERR_RET(port_id, -ENODEV);
> +	RTE_FUNC_PTR_OR_ERR_RET(*dev->dev_ops->tx_done_cleanup, -ENOTSUP);
> +
> +	/* Call driver to free pending mbufs. */
> +	return (*dev->dev_ops->tx_done_cleanup)(dev->data->tx_queues[queue_id],
> +			free_cnt);
> +}
> +

It doesn't look like this is something that needs to be in critical
path. Therefore it makes no sense to inline it.

  reply	other threads:[~2017-01-12  1:41 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-01-11 20:03 [PATCH v2 0/3] new API to free consumed buffers in Tx ring Billy McFall
2017-01-11 20:03 ` [PATCH v2 1/3] ethdev: " Billy McFall
2017-01-12  1:41   ` Stephen Hemminger [this message]
2017-01-11 20:03 ` [PATCH v2 2/3] net/e1000: e1000 igb support to free consumed buffers Billy McFall
2017-01-11 20:03 ` [PATCH v2 3/3] net/vhost: vHost " Billy McFall
2017-01-12  1:39   ` Stephen Hemminger
2017-01-20 16:00     ` Billy McFall

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=20170111174117.0b450730@xeon-e3 \
    --to=stephen@networkplumber.org \
    --cc=bmcfall@redhat.com \
    --cc=dev@dpdk.org \
    --cc=thomas.monjalon@6wind.com \
    --cc=wenzhuo.lu@intel.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.