From: Stephen Hemminger <stephen@networkplumber.org>
To: Junlong Wang <wang.junlong1@zte.com.cn>
Cc: dev@dpdk.org
Subject: Re: [PATCH v1 3/5] net/zxdh: add support set link speed get autoneg stats
Date: Wed, 31 Dec 2025 11:24:49 -0800 [thread overview]
Message-ID: <20251231112449.1da76d2b@phoenix.local> (raw)
In-Reply-To: <20251220061521.289722-4-wang.junlong1@zte.com.cn>
On Sat, 20 Dec 2025 14:15:19 +0800
Junlong Wang <wang.junlong1@zte.com.cn> wrote:
> +int32_t zxdh_link_speed_set(struct rte_eth_dev *dev)
> +{
> + struct zxdh_hw *hw = dev->data->dev_private;
> + struct zxdh_msg_info msg = {0};
> + uint8_t zxdh_msg_reply_info[ZXDH_ST_SZ_BYTES(msg_reply_info)] = {0};
> + void *reply_body_addr = ZXDH_ADDR_OF(msg_reply_info, zxdh_msg_reply_info, reply_body);
> + uint32_t link_speed = 0;
> + int32_t spm_speed_modes = 0;
> + int32_t ret = 0;
Skip the excess initializations, you are setting spm_speed_mode almost immediately.
> +
> + spm_speed_modes =
> + zxdh_speed_mode_to_spm(dev->data->dev_conf.link_speeds & ~RTE_ETH_LINK_SPEED_FIXED);
> + if (spm_speed_modes == -1 || spm_speed_modes == hw->speed_mode) {
> + PMD_DRV_LOG(DEBUG, "not need update speed");
> + return 0;
> + }
> + if ((spm_speed_modes & hw->support_speed_modes) == 0) {
> + PMD_DRV_LOG(ERR, "not support configure speed :%d ", link_speed);
> + return 0;
> + }
> +
next prev parent reply other threads:[~2025-12-31 19:28 UTC|newest]
Thread overview: 35+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-12-20 6:15 [PATCH v1 0/5] net/zxdh: add support some new features Junlong Wang
2025-12-20 6:15 ` [PATCH v1 1/5] net/zxdh: add support for modifying queue depth Junlong Wang
2025-12-31 19:15 ` Stephen Hemminger
2025-12-20 6:15 ` [PATCH v1 2/5] net/zxdh: optimize alloc queue resources Junlong Wang
2025-12-20 6:15 ` [PATCH v1 3/5] net/zxdh: add support set link speed get autoneg stats Junlong Wang
2025-12-21 16:57 ` Stephen Hemminger
2025-12-31 19:23 ` Stephen Hemminger
2025-12-31 19:24 ` Stephen Hemminger [this message]
2025-12-31 19:27 ` Stephen Hemminger
2025-12-20 6:15 ` [PATCH v1 4/5] net/zxdh: add support primary/secondary process Junlong Wang
2025-12-21 17:00 ` Stephen Hemminger
2025-12-23 10:55 ` Junlong Wang
2025-12-23 17:54 ` Stephen Hemminger
2025-12-20 6:15 ` [PATCH v1 5/5] net/zxdh: add support GENEVE TSO and Rx outer UDP chksum Junlong Wang
2026-01-05 7:16 ` [PATCH v2 0/5] net/zxdh: add support some new features Junlong Wang
2026-01-05 7:16 ` [PATCH v2 1/5] net/zxdh: add support for modifying queue depth Junlong Wang
2026-01-05 7:16 ` [PATCH v2 2/5] net/zxdh: optimize alloc queue resources Junlong Wang
2026-01-05 7:16 ` [PATCH v2 3/5] net/zxdh: add support set link speed get autoneg stats Junlong Wang
2026-01-05 7:16 ` [PATCH v2 4/5] net/zxdh: add support primary/secondary process Junlong Wang
2026-01-05 7:16 ` [PATCH v2 5/5] net/zxdh: add support GENEVE TSO and Rx outer chksum Junlong Wang
2026-01-12 0:32 ` [PATCH v2 0/5] net/zxdh: add support some new features Stephen Hemminger
2026-01-31 6:22 ` [PATCH v3 " Junlong Wang
2026-01-31 6:22 ` [PATCH v3 1/5] net/zxdh: add support for modifying queue depth Junlong Wang
2026-01-31 6:22 ` [PATCH v3 2/5] net/zxdh: optimize alloc queue resources Junlong Wang
2026-01-31 6:22 ` [PATCH v3 3/5] net/zxdh: add link speed set and autoneg get support Junlong Wang
2026-01-31 6:22 ` [PATCH v3 4/5] net/zxdh: add support for primary/secondary process Junlong Wang
2026-01-31 6:22 ` [PATCH v3 5/5] net/zxdh: add support for GENEVE TSO and Rx outer checksum Junlong Wang
2026-03-18 2:21 ` [v3, " Junlong Wang
2026-03-18 10:16 ` Thomas Monjalon
2026-03-18 10:54 ` Thomas Monjalon
2026-03-19 5:53 ` Junlong Wang
2026-03-19 9:27 ` Thomas Monjalon
2026-01-31 18:11 ` [PATCH v3 0/5] net/zxdh: add support some new features Stephen Hemminger
2026-02-02 19:45 ` Stephen Hemminger
2026-02-03 1:43 ` [v3,0/5] " Junlong Wang
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=20251231112449.1da76d2b@phoenix.local \
--to=stephen@networkplumber.org \
--cc=dev@dpdk.org \
--cc=wang.junlong1@zte.com.cn \
/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.