<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:Wingdings;
        panose-1:5 0 0 0 0 0 0 0 0 0;}
@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:"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:"Calibri",sans-serif;
        color:windowtext;}
.MsoChpDefault
        {mso-style-type:export-only;
        font-size:10.0pt;
        mso-ligatures:none;}
@page WordSection1
        {size:8.5in 11.0in;
        margin:1.0in 1.0in 1.0in 1.0in;}
div.WordSection1
        {page:WordSection1;}
/* List Definitions */
@list l0
        {mso-list-id:1574655503;
        mso-list-type:hybrid;
        mso-list-template-ids:-2136313170 -1881081750 67698691 67698693 67698689 67698691 67698693 67698689 67698691 67698693;}
@list l0:level1
        {mso-level-number-format:bullet;
        mso-level-text:;
        mso-level-tab-stop:none;
        mso-level-number-position:left;
        text-indent:-.25in;
        font-family:Wingdings;
        mso-fareast-font-family:"Times New Roman";
        mso-bidi-font-family:Calibri;}
@list l0:level2
        {mso-level-number-format:bullet;
        mso-level-text:o;
        mso-level-tab-stop:none;
        mso-level-number-position:left;
        text-indent:-.25in;
        font-family:"Courier New";}
@list l0:level3
        {mso-level-number-format:bullet;
        mso-level-text:;
        mso-level-tab-stop:none;
        mso-level-number-position:left;
        text-indent:-.25in;
        font-family:Wingdings;}
@list l0:level4
        {mso-level-number-format:bullet;
        mso-level-text:;
        mso-level-tab-stop:none;
        mso-level-number-position:left;
        text-indent:-.25in;
        font-family:Symbol;}
@list l0:level5
        {mso-level-number-format:bullet;
        mso-level-text:o;
        mso-level-tab-stop:none;
        mso-level-number-position:left;
        text-indent:-.25in;
        font-family:"Courier New";}
@list l0:level6
        {mso-level-number-format:bullet;
        mso-level-text:;
        mso-level-tab-stop:none;
        mso-level-number-position:left;
        text-indent:-.25in;
        font-family:Wingdings;}
@list l0:level7
        {mso-level-number-format:bullet;
        mso-level-text:;
        mso-level-tab-stop:none;
        mso-level-number-position:left;
        text-indent:-.25in;
        font-family:Symbol;}
@list l0:level8
        {mso-level-number-format:bullet;
        mso-level-text:o;
        mso-level-tab-stop:none;
        mso-level-number-position:left;
        text-indent:-.25in;
        font-family:"Courier New";}
@list l0:level9
        {mso-level-number-format:bullet;
        mso-level-text:;
        mso-level-tab-stop:none;
        mso-level-number-position:left;
        text-indent:-.25in;
        font-family:Wingdings;}
ol
        {margin-bottom:0in;}
ul
        {margin-bottom:0in;}
--></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">> also 'enicpmd_dev_configure()' looks like can be updated.<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt">Where would it be updated? With the patch, the check will be done at the bottom of the function in call to enic_init_rss_nic_cfg -> enic_set_niccfg<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:16.0pt"><o:p> </o:p></span></p>
<p class="MsoNormal"><span style="font-size:16.0pt"><o:p> </o:p></span></p>
<div id="mail-editor-reference-message-container">
<div>
<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">Ferruh Yigit <ferruh.yigit@amd.com><br>
<b>Date: </b>Wednesday, October 11, 2023 at 10:32 AM<br>
<b>To: </b>Jie Hai <haijie1@huawei.com>, dev@dpdk.org <dev@dpdk.org>, John Daley (johndale) <johndale@cisco.com>, Hyong Youb Kim (hyonkim) <hyonkim@cisco.com><br>
<b>Cc: </b>lihuisong@huawei.com <lihuisong@huawei.com>, fengchengwen@huawei.com <fengchengwen@huawei.com>, liudongdong3@huawei.com <liudongdong3@huawei.com><br>
<b>Subject: </b>Re: [PATCH v5 14/40] net/enic: check RSS hash algorithms<o:p></o:p></span></p>
</div>
<div>
<p class="MsoNormal" style="margin-bottom:12.0pt"><span style="font-size:11.0pt">On 10/11/2023 10:27 AM, Jie Hai wrote:<br>
> A new field 'algorithm' has been added to rss_conf, check it<br>
> in case of ignoring unsupported values.<br>
> <br>
> Signed-off-by: Jie Hai <haijie1@huawei.com><br>
> ---<br>
>  drivers/net/enic/enic_ethdev.c | 1 +<br>
>  drivers/net/enic/enic_main.c   | 3 +++<br>
>  2 files changed, 4 insertions(+)<br>
> <br>
> diff --git a/drivers/net/enic/enic_ethdev.c b/drivers/net/enic/enic_ethdev.c<br>
> index cdf091559196..164f423a85c8 100644<br>
> --- a/drivers/net/enic/enic_ethdev.c<br>
> +++ b/drivers/net/enic/enic_ethdev.c<br>
> @@ -834,6 +834,7 @@ static int enicpmd_dev_rss_hash_conf_get(struct rte_eth_dev *dev,<br>
>        ENICPMD_FUNC_TRACE();<br>
>        if (rss_conf == NULL)<br>
>                return -EINVAL;<br>
> +<br>
><br>
<br>
unintended change.<br>
<br>
also 'enicpmd_dev_configure()' looks like can be updated.<br>
<br>
<br>
>        if (rss_conf->rss_key != NULL &&<br>
>            rss_conf->rss_key_len < ENIC_RSS_HASH_KEY_SIZE) {<br>
>                dev_err(enic, "rss_hash_conf_get: wrong rss_key_len. given=%u"<br>
> diff --git a/drivers/net/enic/enic_main.c b/drivers/net/enic/enic_main.c<br>
> index 19a99a82c501..2eafe7637b3a 100644<br>
> --- a/drivers/net/enic/enic_main.c<br>
> +++ b/drivers/net/enic/enic_main.c<br>
> @@ -1428,6 +1428,9 @@ int enic_set_rss_conf(struct enic *enic, struct rte_eth_rss_conf *rss_conf)<br>
>                }<br>
>        }<br>
>  <br>
> +     if (rss_enable && rss_conf->algorithm != RTE_ETH_HASH_FUNCTION_DEFAULT)<br>
> +             return -EINVAL;<br>
> +<br>
>        ret = enic_set_niccfg(enic, ENIC_RSS_DEFAULT_CPU, rss_hash_type,<br>
>                              ENIC_RSS_HASH_BITS, ENIC_RSS_BASE_CPU,<br>
>                              rss_enable);<o:p></o:p></span></p>
</div>
</div>
</div>
</div>
</body>
</html>