<html xmlns:o="urn:schemas-microsoft-com:office:office" xmlns:w="urn:schemas-microsoft-com:office:word" xmlns:m="http://schemas.microsoft.com/office/2004/12/omml" xmlns="http://www.w3.org/TR/REC-html40">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<meta name="Generator" content="Microsoft Word 15 (filtered medium)">
<style><!--
/* Font Definitions */
@font-face
        {font-family:"Cambria Math";
        panose-1:2 4 5 3 5 4 6 3 2 4;}
@font-face
        {font-family:Calibri;
        panose-1:2 15 5 2 2 2 4 3 2 4;}
@font-face
        {font-family:"Apple Color Emoji";
        panose-1:0 0 0 0 0 0 0 0 0 0;}
@font-face
        {font-family:"Times New Roman \(Body CS\)";
        panose-1:2 11 6 4 2 2 2 2 2 4;}
/* Style Definitions */
p.MsoNormal, li.MsoNormal, div.MsoNormal
        {margin:0in;
        font-size:10.0pt;
        font-family:"Calibri",sans-serif;}
span.EmailStyle19
        {mso-style-type:personal-reply;
        font-family:"Courier New";
        color:windowtext;
        font-weight:normal;
        font-style:normal;}
.MsoChpDefault
        {mso-style-type:export-only;
        font-size:10.0pt;}
@page WordSection1
        {size:8.5in 11.0in;
        margin:1.0in 1.0in 1.0in 1.0in;}
div.WordSection1
        {page:WordSection1;}
--></style>
</head>
<body lang="EN-US" link="#0563C1" vlink="#954F72" style="word-wrap:break-word">
<div class="WordSection1">
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Courier New"">Hi Andrew,<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Courier New"">Please refer struct rte_eth_dev. Following assignment already preserve the order in struct rte_eth_dev<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt"><o:p> </o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt">> diff --git a/drivers/net/vmxnet3/vmxnet3_ethdev.c b/drivers/net/vmxnet3/vmxnet3_ethdev.c<br>
> index eb65499cf2..a76796716b 100644<br>
> --- a/drivers/net/vmxnet3/vmxnet3_ethdev.c<br>
> +++ b/drivers/net/vmxnet3/vmxnet3_ethdev.c<br>
> @@ -294,6 +294,7 @@ eth_vmxnet3_dev_init(struct rte_eth_dev *eth_dev)<br>
>       eth_dev->rx_pkt_burst = &vmxnet3_recv_pkts;<br>
>       eth_dev->tx_pkt_burst = &vmxnet3_xmit_pkts;<br>
>       eth_dev->tx_pkt_prepare = vmxnet3_prep_pkts;<br>
> +     eth_dev->rx_queue_count = vmxnet3_dev_rx_queue_count,<br>
<br>
Please, put it just after rx_pkt_burst to preserve the same order as in<br>
structure.<br>
<br>
</span><span style="font-size:11.0pt;font-family:"Courier New""><o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Courier New""><o:p> </o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Courier New"">/**<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Courier New"">* @internal<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Courier New"">* The generic data structure associated with each Ethernet device.<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Courier New"">*<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Courier New"">* Pointers to burst-oriented packet receive and transmit functions are<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Courier New"">* located at the beginning of the structure, along with the pointer to<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Courier New"">* where all the data elements for the particular device are stored in shared<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Courier New"">* memory. This split allows the function pointer and driver data to be per-<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Courier New"">* process, while the actual configuration data for the device is shared.<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Courier New"">*/<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Courier New"">struct rte_eth_dev {<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Courier New"">    eth_rx_burst_t rx_pkt_burst; /**< Pointer to PMD receive function */<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Courier New"">    eth_tx_burst_t tx_pkt_burst; /**< Pointer to PMD transmit function */<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Courier New""><o:p> </o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Courier New"">    /** Pointer to PMD transmit prepare function */<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Courier New"">    eth_tx_prep_t tx_pkt_prepare;<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Courier New"">    /** Get the number of used Rx descriptors */<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Courier New"">    eth_rx_queue_count_t rx_queue_count;<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Courier New"">    /** Check the status of a Rx descriptor */<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Courier New"">    eth_rx_descriptor_status_t rx_descriptor_status;<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Courier New"">    /** Check the status of a Tx descriptor */<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Courier New"">    eth_tx_descriptor_status_t tx_descriptor_status;<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Courier New""><o:p> </o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Courier New"">    /**<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Courier New"">     * Device data that is shared between primary and secondary processes<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Courier New"">     */<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Courier New"">    struct rte_eth_dev_data *data;<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Courier New"">    void *process_private; /**< Pointer to per-process device data */<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Courier New"">    const struct eth_dev_ops *dev_ops; /**< Functions exported by PMD */<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Courier New"">    struct rte_device *device; /**< Backing device */<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Courier New"">   struct rte_intr_handle *intr_handle; /**< Device interrupt handle */<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Courier New""><o:p> </o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Courier New"">    /** User application callbacks for NIC interrupts */<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Courier New"">    struct rte_eth_dev_cb_list link_intr_cbs;<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Courier New"">    /**<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Courier New"">     * User-supplied functions called from rx_burst to post-process<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Courier New"">     * received packets before passing them to the user<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Courier New"">     */<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Courier New"">    struct rte_eth_rxtx_callback *post_rx_burst_cbs[RTE_MAX_QUEUES_PER_PORT];<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Courier New"">    /**<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Courier New"">     * User-supplied functions called from tx_burst to pre-process<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Courier New"">     * received packets before passing them to the driver for transmission<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Courier New"">     */<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Courier New"">    struct rte_eth_rxtx_callback *pre_tx_burst_cbs[RTE_MAX_QUEUES_PER_PORT];<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Courier New""><o:p> </o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Courier New"">    enum rte_eth_dev_state state; /**< Flag indicating the port state */<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Courier New"">    void *security_ctx; /**< Context for security ops */<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Courier New"">} __rte_cache_aligned;<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Courier New""><o:p> </o:p></span></p>
<div>
<div>
<div>
<p class="MsoNormal"><span style="font-size:12.0pt;font-family:"Courier New"">Thanks,<o:p></o:p></span></p>
</div>
</div>
</div>
<p class="MsoNormal"><span style="font-size:12.0pt;font-family:"Courier New"">Pankaj</span><span style="font-size:11.0pt;font-family:"Courier New""><o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Courier New""><o:p> </o:p></span></p>
<div style="border:none;border-top:solid #B5C4DF 1.0pt;padding:3.0pt 0in 0in 0in">
<p class="MsoNormal" style="margin-bottom:12.0pt"><b><span style="font-size:12.0pt;color:black">From:
</span></b><span style="font-size:12.0pt;color:black">Andrew Rybchenko <andrew.rybchenko@oktetlabs.ru><br>
<b>Date: </b>Wednesday, May 4, 2022 at 7:27 AM<br>
<b>To: </b>Pankaj Gupta <pagupta@vmware.com>, Jochen Behrens <jbehrens@vmware.com>, Yong Wang <yongwang@vmware.com><br>
<b>Cc: </b>dev@dpdk.org <dev@dpdk.org><br>
<b>Subject: </b>Re: [PATCH 3/8] vmxnet3: add rx queue usage count utility<o:p></o:p></span></p>
</div>
<div>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Apple Color Emoji"">⚠</span><span style="font-size:11.0pt"> External Email<br>
<br>
rx -> Rx<br>
<br>
in summary in accordance with spelling in DPDK<br>
<br>
On 5/3/22 07:22, Pankaj Gupta wrote:<br>
> Count the number of entries in the rx queue for debugging.<br>
<br>
rx -> Rx<br>
<br>
As I understand debugging is not the only purpose of the API.<br>
<br>
><br>
> Tested, using testpmd, for different hardware version on ESXi 7.0 Update 2<br>
><br>
> Signed-off-by: Pankaj Gupta <pagupta@vmware.com><br>
> ---<br>
>   drivers/net/vmxnet3/vmxnet3_ethdev.c |  1 +<br>
>   drivers/net/vmxnet3/vmxnet3_ethdev.h |  3 +++<br>
>   drivers/net/vmxnet3/vmxnet3_rxtx.c   | 30 ++++++++++++++++++++++++++++<br>
>   3 files changed, 34 insertions(+)<br>
><br>
> diff --git a/drivers/net/vmxnet3/vmxnet3_ethdev.c b/drivers/net/vmxnet3/vmxnet3_ethdev.c<br>
> index eb65499cf2..a76796716b 100644<br>
> --- a/drivers/net/vmxnet3/vmxnet3_ethdev.c<br>
> +++ b/drivers/net/vmxnet3/vmxnet3_ethdev.c<br>
> @@ -294,6 +294,7 @@ eth_vmxnet3_dev_init(struct rte_eth_dev *eth_dev)<br>
>       eth_dev->rx_pkt_burst = &vmxnet3_recv_pkts;<br>
>       eth_dev->tx_pkt_burst = &vmxnet3_xmit_pkts;<br>
>       eth_dev->tx_pkt_prepare = vmxnet3_prep_pkts;<br>
> +     eth_dev->rx_queue_count = vmxnet3_dev_rx_queue_count,<br>
<br>
Please, put it just after rx_pkt_burst to preserve the same order as in<br>
structure.<br>
<br>
>       pci_dev = RTE_ETH_DEV_TO_PCI(eth_dev);<br>
><br>
>       /* extra mbuf field is required to guess MSS */<br>
<br>
[snip]<br>
<br>
________________________________<br>
<br>
</span><span style="font-size:11.0pt;font-family:"Apple Color Emoji"">⚠</span><span style="font-size:11.0pt"> External Email: This email originated from outside of the organization. Do not click links or open attachments unless you recognize the sender.<o:p></o:p></span></p>
</div>
</div>
</body>
</html>