From: Chaoyong He <chaoyong.he@corigine.com>
To: Stephen Hemminger <stephen@networkplumber.org>
Cc: "dev@dpdk.org" <dev@dpdk.org>,
oss-drivers <oss-drivers@corigine.com>,
Long Wu <Long.Wu@nephogine.com>,
Nole Zhang <peng.zhang@corigine.com>
Subject: RE: [PATCH 2/2] net/bonding: add command to set dedicated queue size
Date: Fri, 11 Oct 2024 03:00:53 +0000 [thread overview]
Message-ID: <SJ0PR13MB55453FC0E12FA6B71CCF0DE29E792@SJ0PR13MB5545.namprd13.prod.outlook.com> (raw)
In-Reply-To: <20241010111307.559d432e@hermes.local>
> On Mon, 24 Jun 2024 10:03:55 +0800
> Chaoyong He <chaoyong.he@corigine.com> wrote:
>
> > diff --git a/drivers/net/bonding/rte_eth_bond_8023ad.c
> b/drivers/net/bonding/rte_eth_bond_8023ad.c
> > index 06c21ebe6d..c19645aa4f 100644
> > --- a/drivers/net/bonding/rte_eth_bond_8023ad.c
> > +++ b/drivers/net/bonding/rte_eth_bond_8023ad.c
> > @@ -1254,6 +1254,8 @@ bond_mode_8023ad_conf_assign(struct
> mode8023ad_private *mode4,
> > mode4->dedicated_queues.enabled = 0;
> > mode4->dedicated_queues.rx_qid = UINT16_MAX;
> > mode4->dedicated_queues.tx_qid = UINT16_MAX;
> > + mode4->dedicated_queues.rx_queue_size =
> SLOW_RX_QUEUE_HW_DEFAULT_SIZE;
> > + mode4->dedicated_queues.tx_queue_size =
> SLOW_TX_QUEUE_HW_DEFAULT_SIZE;
> > }
> >
> > void
> > @@ -1753,3 +1755,40 @@
> rte_eth_bond_8023ad_dedicated_queues_disable(uint16_t port)
> >
> > return retval;
> > }
> > +
> > +int
> > +rte_eth_bond_8023ad_dedicated_queue_size_set(uint16_t port,
> > + uint16_t queue_size,
> > + char *queue_type)
>
> Should be const char * for queue type
>
> > +{
> > + struct rte_eth_dev *dev;
> > + struct bond_dev_private *internals;
> > +
> > + if (valid_bonding_port_id(port) != 0) {
> > + RTE_BOND_LOG(ERR, "The bonding port id is invalid");
> > + return -EINVAL;
> > + }
> > +
> > + dev = &rte_eth_devices[port];
> > +
> > + /* Device must be stopped to set up slow queue */
> > + if (dev->data->dev_started != 0) {
> > + RTE_BOND_LOG(ERR, "Please stop the bonding port");
> > + return -EINVAL;
> > + }
> > +
> > + internals = dev->data->dev_private;
> > + if (internals->mode4.dedicated_queues.enabled == 0) {
> > + RTE_BOND_LOG(ERR, "Please enable dedicated queue");
> > + return -EINVAL;
> > + }
> > +
> > + if (strcmp(queue_type, "rxq") == 0)
> > + internals->mode4.dedicated_queues.rx_queue_size =
> queue_size;
> > + else if (strcmp(queue_type, "txq") == 0)
> > + internals->mode4.dedicated_queues.tx_queue_size =
> queue_size;
> > + else
> > + return -EINVAL;
>
> Add error message like:
> RTE_BOND_LOG(ERR, "Unknown queue type %s",
> queue_type);
Okay, will add in next version patch.
>
> > +
> > + return 0;
> > +}
next prev parent reply other threads:[~2024-10-11 3:01 UTC|newest]
Thread overview: 15+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-06-24 2:03 [PATCH 0/2] add function " Chaoyong He
2024-06-24 2:03 ` [PATCH 1/2] net/bonding: standard the log message Chaoyong He
2024-10-10 18:10 ` Stephen Hemminger
2024-10-11 3:02 ` Chaoyong He
2024-06-24 2:03 ` [PATCH 2/2] net/bonding: add command to set dedicated queue size Chaoyong He
2024-10-10 18:13 ` Stephen Hemminger
2024-10-11 3:00 ` Chaoyong He [this message]
2024-10-11 3:24 ` [PATCH v2 0/2] add function " Chaoyong He
2024-10-11 3:24 ` [PATCH v2 1/2] net/bonding: standard the log message Chaoyong He
2024-10-11 5:10 ` Stephen Hemminger
2024-10-29 1:51 ` lihuisong (C)
2024-10-11 3:24 ` [PATCH v2 2/2] net/bonding: add command to set dedicated queue size Chaoyong He
2024-10-17 16:05 ` Thomas Monjalon
2024-10-29 1:49 ` lihuisong (C)
-- strict thread matches above, loose matches on Subject: below --
2024-06-05 5:55 [PATCH 0/2] add function " Chaoyong He
2024-06-05 5:55 ` [PATCH 2/2] net/bonding: add command " Chaoyong He
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=SJ0PR13MB55453FC0E12FA6B71CCF0DE29E792@SJ0PR13MB5545.namprd13.prod.outlook.com \
--to=chaoyong.he@corigine.com \
--cc=Long.Wu@nephogine.com \
--cc=dev@dpdk.org \
--cc=oss-drivers@corigine.com \
--cc=peng.zhang@corigine.com \
--cc=stephen@networkplumber.org \
/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).