From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mails.dpdk.org (unknown [217.70.189.124]) by inbox.dpdk.org (Postfix) with ESMTP id 68BB9460AA; Fri, 17 Jan 2025 03:07:43 +0100 (CET) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id EB3054111C; Fri, 17 Jan 2025 03:07:24 +0100 (CET) Received: from lf-1-14.ptr.blmpb.com (lf-1-14.ptr.blmpb.com [103.149.242.14]) by mails.dpdk.org (Postfix) with ESMTP id 5A7C24027A for ; Fri, 17 Jan 2025 03:07:22 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; s=feishu2403070942; d=yunsilicon.com; t=1737079636; h=from:subject: mime-version:from:date:message-id:subject:to:cc:reply-to:content-type: mime-version:in-reply-to:message-id; bh=fbRTTpXG9whTFWxyu/9G757oGhvDYpDAyjKzz4xROQw=; b=G5+LCRu9mTEoaNhE9YMIC+yRDTAkJQyH8htWdU8Oc2iLZc2SQ5nGJyswU1801A1HCQ3YSV o02JOzJ0oSQdjyTXGeyVH/GqRwDYqf/Ut2PysABrUaaYhHZXXQ4UDZQvAnUGWFMkd1aDkq a0imlWGvTUFdap7k6uAZXVc3qz1gAvvBWPLgihT8z5iUC/3VE/qf7wGPuTsGnxs+HPDNgx 2tUO2ZN6VzmtmN7K+J5mLQERMTrKk+yDJdEWsvx2Ur9HshaQEkwbqVh17on9U9iSQPXWku LUPtA5DZzjKiR/lPwNh1KfFhf+DHMlYPhljc/BFyYSw+SMrHtJjl+NeEwMVo6A== Received: from [127.0.0.1] ([218.1.137.133]) by smtp.feishu.cn with ESMTPS; Fri, 17 Jan 2025 10:07:13 +0800 References: <20250107024939.1962467-1-wanry@yunsilicon.com> <20250107024953.1962467-8-wanry@yunsilicon.com> <20250116101907.2588e707@hermes.local> Mime-Version: 1.0 Content-Transfer-Encoding: 7bit In-Reply-To: <20250116101907.2588e707@hermes.local> Subject: Re: [PATCH v5 07/15] net/xsc: add ethdev configure and RSS ops Message-Id: <8e0bfb25-8fc1-4b06-a336-4c054ca607b5@yunsilicon.com> Content-Type: text/plain; charset=UTF-8 X-Lms-Return-Path: Cc: , , , , , , , , From: "WanRenyong" Date: Fri, 17 Jan 2025 10:07:12 +0800 X-Original-From: WanRenyong User-Agent: Mozilla Thunderbird To: "Stephen Hemminger" X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org On 2025/1/17 2:19, Stephen Hemminger wrote: > On Tue, 07 Jan 2025 10:49:55 +0800 > "WanRenyong" wrote: > >> +static int >> +xsc_ethdev_rss_hash_conf_get(struct rte_eth_dev *dev, >> + struct rte_eth_rss_conf *rss_conf) >> +{ >> + struct xsc_ethdev_priv *priv = TO_XSC_ETHDEV_PRIV(dev); >> + >> + if (rss_conf->rss_key != NULL && rss_conf->rss_key_len >= priv->rss_conf.rss_key_len) >> + memcpy(rss_conf->rss_key, priv->rss_conf.rss_key, priv->rss_conf.rss_key_len); >> + >> + rss_conf->rss_key_len = priv->rss_conf.rss_key_len; >> + rss_conf->rss_hf = priv->rss_conf.rss_hf; >> + return 0; >> +} >> + >> +static int >> +xsc_ethdev_rss_hash_update(struct rte_eth_dev *dev, >> + struct rte_eth_rss_conf *rss_conf) >> +{ >> + struct xsc_ethdev_priv *priv = TO_XSC_ETHDEV_PRIV(dev); >> + int ret = 0; >> + >> + ret = xsc_dev_rss_key_modify(priv->xdev, rss_conf->rss_key, rss_conf->rss_key_len); >> + if (ret == 0) { >> + rte_memcpy(priv->rss_conf.rss_key, rss_conf->rss_key, >> + priv->rss_conf.rss_key_len); > This should probably be memcpy (not rte_memcpy) since not critical path. OK, I will fix it next time. -- Thanks, WanRenyong