<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:"Times New Roman \(Body CS\)";
        panose-1:2 11 6 4 2 2 2 2 2 4;}
@font-face
        {font-family:Menlo;
        panose-1:2 11 6 9 3 8 4 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;}
--></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:16.0pt">Reviewed-by: John Daley <johndale@cisco.com><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">Thanks,<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:16.0pt">John<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">Weiguo Li <liwg06@foxmail.com><br>
<b>Date: </b>Wednesday, November 1, 2023 at 12:28 AM<br>
<b>To: </b>John Daley (johndale) <johndale@cisco.com><br>
<b>Cc: </b>dev@dpdk.org <dev@dpdk.org>, stable@dpdk.org <stable@dpdk.org>, Weiguo Li <liweiguo@xencore.cn><br>
<b>Subject: </b>[PATCH] net/enic: avoid extra unlock when setting MTU in enic<o:p></o:p></span></p>
</div>
<div>
<p class="MsoNormal" style="margin-bottom:12.0pt"><span style="font-size:11.0pt">The 'set_mtu_done' goto statement is being executed in a context<br>
where the 'mtu_lock' has not been previously locked.<br>
<br>
To avoid the extra unlocking operation, replace the goto statement<br>
with a return statement.<br>
<br>
Fixes: c3e09182bcd6 ("net/enic: support scatter Rx in MTU update")<br>
Cc: stable@dpdk.org<br>
<br>
Signed-off-by: Weiguo Li <liweiguo@xencore.cn><br>
---<br>
 .mailmap                     | 2 +-<br>
 drivers/net/enic/enic_main.c | 2 +-<br>
 2 files changed, 2 insertions(+), 2 deletions(-)<br>
<br>
diff --git a/.mailmap b/.mailmap<br>
index 3f5bab26a8..b4f0ae26b8 100644<br>
--- a/.mailmap<br>
+++ b/.mailmap<br>
@@ -1500,7 +1500,7 @@ Waterman Cao <waterman.cao@intel.com><br>
 Weichun Chen <weichunx.chen@intel.com><br>
 Wei Dai <wei.dai@intel.com><br>
 Weifeng Li <liweifeng96@126.com><br>
-Weiguo Li <liwg06@foxmail.com><br>
+Weiguo Li <liwg06@foxmail.com> <liweiguo@xencore.cn><br>
 Wei Huang <wei.huang@intel.com><br>
 Wei Hu <weh@microsoft.com><br>
 Wei Hu (Xavier) <xavier.huwei@huawei.com><br>
diff --git a/drivers/net/enic/enic_main.c b/drivers/net/enic/enic_main.c<br>
index 19a99a82c5..a6aaa760ca 100644<br>
--- a/drivers/net/enic/enic_main.c<br>
+++ b/drivers/net/enic/enic_main.c<br>
@@ -1639,7 +1639,7 @@ int enic_set_mtu(struct enic *enic, uint16_t new_mtu)<br>
          * packet length.<br>
          */<br>
         if (!eth_dev->data->dev_started)<br>
-               goto set_mtu_done;<br>
+               return rc;<br>
 <br>
         /*<br>
          * The device has started, re-do RQs on the fly. In the process, we<br>
-- <br>
2.34.1<o:p></o:p></span></p>
</div>
</div>
</div>
</div>
</body>
</html>