From patchwork Tue Feb 28 09:44:43 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Yen Chun-Chao X-Patchwork-Id: 13154620 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 9238DC64EC7 for ; Tue, 28 Feb 2023 09:45:29 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231430AbjB1Jp1 (ORCPT ); Tue, 28 Feb 2023 04:45:27 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:36590 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231400AbjB1JpU (ORCPT ); Tue, 28 Feb 2023 04:45:20 -0500 Received: from AUS01-SY4-obe.outbound.protection.outlook.com (mail-sy4aus01olkn2144.outbound.protection.outlook.com [40.92.62.144]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 2A40E3598 for ; Tue, 28 Feb 2023 01:44:53 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=krfu8VsrYXfoDkc320lTKhT+wthfLBBip991JQZz2ynrks8ISZB071YO5/3pvLOR1HHuShCCR8FUf5t6g1GyvjlDv9IZcpoRmNeEntp/NHqcb3u4J14YbkuYl1WQgJpwSPQNG5GenUkAsWVo3Ccxbv6aQ7HAR8l8hqrCRJZDBeXPsIz0o/6I5x4GDaVIoT29YCvmJjK1QZto2mcAWmNU9JXNuy/aDu7GhVGqdByAGgwKojb0i3061f/CLOFFFtQS4Mb3IMVxGiTr3P+5YRzDJNHu3dWP9zadlO1HlC0aVkhznNfAcI1MAzEGn5BpqtkyVxQkKkrjpgtQlH6QggbchA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=G7BRO0nVAvn3uWvbKuCLPmpCnAmVBHCp4smsdy26U80=; b=YB2Ct3FVO6Yz8+GqkymJT4DEimZOm4TXI+T3c4k6xWNiBV/JuUgLYiqoqu1PU/PvhWI25IGGYYjtkHTYzCq2z2sZXMYSQpm6j645pnJzZGmEqA/Zc1fMML2kT1KTCd7oxplhkGPXn4UJ+frxZCOfVtBBO69BDnx8W3GsxTmzYSk9RMJ6vIhulm1OwXPUPQbFndZt1HSGdFtC8LctY9OZXcTmnlD0n5wWdEJYOx2qaD+QXjLQCYXrZ4314V4EDcstHowdmXaSatasCj3SlpYTMPnieJURqNc1u858vfB1st1lfJsyX48jSuCGCYEc0d3ko7YZGYVkOVEhwZwYHbTMlg== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=none; dmarc=none; dkim=none; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=hotmail.com; s=selector1; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=G7BRO0nVAvn3uWvbKuCLPmpCnAmVBHCp4smsdy26U80=; b=ZEEbeoHVo5t2Y/5ZbctsjDPZ+dx1O8bUl3LMI+YVqXvoifHF5Nycl85UeovRATPuXys3OePL5GiVieLRwDI2433nag6Z0IJ1DYjoTRh79y0SQIZMhFFa53msVycsFnhcvVnkzeWKSMD3bjLctBpzk3sQh3QFA+U0TmMAD8CjzIO/qpT/qKHQEgGQq/qJY34aFFfgPPNs/MJZPleL7VpAAMbp1zT81F+C2i/ZU3QEw3MeGix+J+kWT8fdCTtNrsBPWA0ouebJWNii9eZFO/vlo3U+mboN1flGR+tTu7vGjE6NxAZf/YqtQ9YE2OI+FCWuFhfKAa8TsT0T7bbCwD0l1Q== Received: from ME3P282MB2827.AUSP282.PROD.OUTLOOK.COM (2603:10c6:220:13c::13) by ME3P282MB0884.AUSP282.PROD.OUTLOOK.COM (2603:10c6:220:86::8) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6134.30; Tue, 28 Feb 2023 09:44:44 +0000 Received: from ME3P282MB2827.AUSP282.PROD.OUTLOOK.COM ([fe80::50ae:cb9:fc65:57f4]) by ME3P282MB2827.AUSP282.PROD.OUTLOOK.COM ([fe80::50ae:cb9:fc65:57f4%5]) with mapi id 15.20.6134.029; Tue, 28 Feb 2023 09:44:43 +0000 From: Yen ChunChao To: "davem@davemloft.net" CC: "pabeni@redhat.com" , "linux-usb@vger.kernel.org" Subject: [PATCH 1/3 RFC] net: usb: ax88179_178a: Enable FLAG_MULTI_PACKET to improve tx stability Thread-Topic: [PATCH 1/3 RFC] net: usb: ax88179_178a: Enable FLAG_MULTI_PACKET to improve tx stability Thread-Index: AQHZS1YYZO9r/AsJ1kCdaKk5CvPGF67kFoTF Date: Tue, 28 Feb 2023 09:44:43 +0000 Message-ID: References: In-Reply-To: Accept-Language: zh-TW, en-US Content-Language: zh-TW X-MS-Has-Attach: X-MS-TNEF-Correlator: msip_labels: x-ms-exchange-messagesentrepresentingtype: 1 x-tmn: [ckyQfNv0gsCn9cgB7j5+IYFNm3VVIHa+] x-ms-publictraffictype: Email x-ms-traffictypediagnostic: ME3P282MB2827:EE_|ME3P282MB0884:EE_ x-ms-office365-filtering-correlation-id: ccc25437-e969-4dc6-3805-08db19706bbf x-microsoft-antispam: BCL:0; x-microsoft-antispam-message-info: Y9Lg+x+vbkHhjk75m1dlvGY/Nk9tKyrd6+3LpKxr+z+hl79CvhEZiy0gR3Ujb+22BLf9nWO+Xo/5hKInowul0pYFDKJUQyoK6PYlipEvfvDFCdIRaxn7VkDXeYDvect+CtBrAv5O5hEN7mbcWFdF0nbPK7Equ2IdNL8be8MJYcOIsihBkJ9HpiNbx/72+WIU5LXOfQ026mS6YDzD0qanmy1AMFdUfGJEpMV2dHKQEPDoCHRax8eMRAoMTqY6IZOGxer7OFDeC4kFryCIOHMD4FCS0azgm3KTPJiWmoazBDcL5JW/A+qd/6ButQ7AWoOrNG0RBTCoX9AYDcZ6Hy9k7uvPtudOdX7iRhq8f1nWNs6kMKukDVqmrPuGnmZtNZtwDftyfNOgA5CPon4xPKwrBbh50rD+T8kqjMLK1X5MivBqAM/ne5az5SO8xkZIjnM5XQfviaKApCw72cfTo531lT14wTTf/HMciVmB0HL01FPDjCRBeBD+JQn6d5cBN0ncBMeVxY84RZKhOs5Ej2c7uF7h8F3yN6elSGYgD5/WkDLw06dBdR6ouRO+hgSJj/gbY6DxjokBFXKu04V0kR9kjQ== x-ms-exchange-antispam-messagedata-chunkcount: 1 x-ms-exchange-antispam-messagedata-0: =?iso-8859-1?q?DII/GhJ6GrrTWQ9yG2FLqnZ?= =?iso-8859-1?q?WceqSJ4SREgGcZB+VzCztLoSfsPlcjZXjbA4FJZ388/Ly0A3Jsrk+YKr/krT?= =?iso-8859-1?q?BhhJ1hcwGx8Ta8pFBBQ1SDGV0zu0Bvu77Q8ssxnmZM2MaTImsydjhbkdvEyT?= =?iso-8859-1?q?eGqXGobW9FjJpu3kp4ja7UeZhk5l1x9C+gnJosuPI/EZv89doypRG5WE9/kU?= =?iso-8859-1?q?zBrUE4GCs480cTDSFnYUNIP9cYHr6Vn+iGLfTNsBusolOuNq1fUKiCFxIuPH?= =?iso-8859-1?q?vvVKmwEWnBFaDH/zsGEkABRwSTJRig7vl/gb4WFvKGMUgH4goMwzBBsaX24d?= =?iso-8859-1?q?Q7k0nI3sFS+osA0e0BYh5onxADCh5/Pgk8wQUCKullemgfJGPYe+rM1qySmg?= =?iso-8859-1?q?GMKTKiEqDRgDZVqU49PsgGA/q1VdDqjgsWQWQnt/B5SlWcGoTXSpxT8pTVOv?= =?iso-8859-1?q?Lo6qngOEt7effWut1QFIZ+1YitFuBJ9vak+5C2ux6OkehxzT1ADfZZ9V1ujd?= =?iso-8859-1?q?ggCUJ41k9ORQ5iTwgB4tgaLIVehaBKjU4tx0fE09TTpEkR/9M9rSUdbdScoD?= =?iso-8859-1?q?vjngP+D6LznVNKmYsHCrpv9+4h8kWpH8JAP/jzwxwOxOKRZt5Dixn3AU5wnf?= =?iso-8859-1?q?sJusrB1xirUbWl3owbPLIoq1szPIpyKAUtkbYdiO/1Z/ooUVUcFVL3kugu1E?= =?iso-8859-1?q?dyfQODvM3JJ5uT5uHzZXhNi/Hzs8w4TtfcoGwBZK1b/EEPXAuM6MQbyNLz4n?= =?iso-8859-1?q?2OzOb40cN5Iqvrg7CRl3JJ4hNfaPpE51WwGSO4tIyHsXkR3MVpmw659m+xwu?= =?iso-8859-1?q?3/MbbI+1r+R/ABa0gU2HNuINUiSV5bfTwBIIhUnDZ+cY/ZcAQ5wbH+ss1sQ9?= =?iso-8859-1?q?Z/SyzdIJl/F0lS1abb+75W4NIn6k9kVSHyFqATT7+9a1QnfdYEtNG+odqwIV?= =?iso-8859-1?q?2wMpm/YmndCHUYWnKGqgU4uFCX8+Ew/fxmFyvbLGbhuzNtUqTvjXPQIFrzvo?= =?iso-8859-1?q?wYa+UG9MpPVTDuUEF+S0/ZpImaWQMuXi3fMkwoOR7m1caHe3ERvHLCwon6dZ?= =?iso-8859-1?q?OlLlX9yLdzObtgxnBQ+/9GLMhrz0taNAKz0hT7Kmqgnh6tyCkB6ecD9xMIV6?= =?iso-8859-1?q?2PK3w7aVWWtS7wLbJzo201Puxdm9BK3CqxI0NOHOTJodsIsuS435clLAKbpQ?= =?iso-8859-1?q?cjSjTKraydNuCNCSi2YjfcV/3gudicaZhIR1FdOxpzcHV+RVkh3z28Vnp1iP?= =?iso-8859-1?q?c5HQOw/YrWpCA0nPzGYGXasHl7S9260aKzIR7VbHJj5ZxYln8vBPI1iLxcv0?= =?iso-8859-1?q?VojcTadPpxSImB+cnOA=3D=3D?= MIME-Version: 1.0 X-OriginatorOrg: sct-15-20-4755-11-msonline-outlook-746f3.templateTenant X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-AuthSource: ME3P282MB2827.AUSP282.PROD.OUTLOOK.COM X-MS-Exchange-CrossTenant-RMS-PersistedConsumerOrg: 00000000-0000-0000-0000-000000000000 X-MS-Exchange-CrossTenant-Network-Message-Id: ccc25437-e969-4dc6-3805-08db19706bbf X-MS-Exchange-CrossTenant-originalarrivaltime: 28 Feb 2023 09:44:43.7625 (UTC) X-MS-Exchange-CrossTenant-fromentityheader: Hosted X-MS-Exchange-CrossTenant-id: 84df9e7f-e9f6-40af-b435-aaaaaaaaaaaa X-MS-Exchange-CrossTenant-rms-persistedconsumerorg: 00000000-0000-0000-0000-000000000000 X-MS-Exchange-Transport-CrossTenantHeadersStamped: ME3P282MB0884 Precedence: bulk List-ID: X-Mailing-List: linux-usb@vger.kernel.org Problem Description: The current way of handling the boundary case in tx, i.e. adding one-byte padding when the size of an outbound packet is a multiple of the maximum frame size used for USB bulk transfer, does not work with the hardware. This can be shown by running a loading test via iperf with this hardware as the sender; one can then tune the iperf parameters on the sender side (e.g. "-M 510" in my testing environment) so that sent packets frequently hit the boundary condition, and observe a significant drop in the transmission rate. In the worst case (often after a long run), the hardware can stop functioning (can not send or receive packets anymore, albeit the corresponding network interface is still reported present by ifconfig). It is also believed that this problem is highly relevant to this bug [1]. Solution: Enable FLAG_MULTI_PACKET and modify both ax88179_rx_fixup() and ax88179_tx_fixup() accordingly. Rationale: When FLAG_MULTI_PACKET is enabled (and FLAG_SEND_ZLP is off, which is the case for this driver), usbnet will skip padding, and trust that each sk_buff returned from the mini-driver's tx_fixup function has been taken care of to cater for the requirement of its target hardware. That mechanism allows this mini-driver to send, even when the boundary condition is detected, "untampered" packets (no padding, no extra flags, as if in the normal case) that the hardware accepts, and therefore resolves this problem. Note that rather than being viewed as a workaround, enabling FLAG_MULTI_PACKET is intended to better match the overall behaviour of the hardware, as it also echos well the rx procedure conducting multiple-packet extraction from a single sk_buff in ax88179_rx_fixup(). Verification: Only tested with this device: 0b95:1790 ASIX Electronics Corp. AX88179 Gigabit Ethernet References: [1] https://bugzilla.kernel.org/show_bug.cgi?id=212731 Signed-off-by: Chun-Chao Yen --- This is the same patch as https://rb.gy/199s5m sent in Oct. 2022. I just would like to know the current state of this patch. Has it been rejected or still under review? Thanks  drivers/net/usb/ax88179_178a.c | 62 ++++++++++++++--------------------  1 file changed, 26 insertions(+), 36 deletions(-) diff --git a/drivers/net/usb/ax88179_178a.c b/drivers/net/usb/ax88179_178a.c index aff39bf3161d..b50748b3776c 100644 --- a/drivers/net/usb/ax88179_178a.c +++ b/drivers/net/usb/ax88179_178a.c @@ -1426,58 +1426,48 @@ static int ax88179_rx_fixup(struct usbnet *dev, struct sk_buff *skb)                  if ((*pkt_hdr & (AX_RXHDR_CRC_ERR | AX_RXHDR_DROP_ERR)) ||                      pkt_len < 2 + ETH_HLEN) {                          dev->net->stats.rx_errors++; -                       skb_pull(skb, pkt_len_plus_padd); -                       continue; -               } - -               /* last packet */ -               if (pkt_len_plus_padd == skb->len) { -                       skb_trim(skb, pkt_len); - -                       /* Skip IP alignment pseudo header */ -                       skb_pull(skb, 2); - -                       skb->truesize = SKB_TRUESIZE(pkt_len_plus_padd); -                       ax88179_rx_checksum(skb, pkt_hdr); -                       return 1; +                       goto advance_data_ptr;                  }                    ax_skb = skb_clone(skb, GFP_ATOMIC); -               if (!ax_skb) -                       return 0; +               if (!ax_skb) { +                       /* Report a packet droped, and continue parsing the rest +                        */ +                       dev->net->stats.rx_dropped++; +                       goto advance_data_ptr; +               }                  skb_trim(ax_skb, pkt_len);                    /* Skip IP alignment pseudo header */                  skb_pull(ax_skb, 2);   -               skb->truesize = pkt_len_plus_padd + -                               SKB_DATA_ALIGN(sizeof(struct sk_buff)); +               ax_skb->truesize = SKB_TRUESIZE(pkt_len);                  ax88179_rx_checksum(ax_skb, pkt_hdr);                  usbnet_skb_return(dev, ax_skb);   +advance_data_ptr:                  skb_pull(skb, pkt_len_plus_padd);          }   -       return 0; +       return 1;  }    static struct sk_buff *  ax88179_tx_fixup(struct usbnet *dev, struct sk_buff *skb, gfp_t flags)  {          u32 tx_hdr1, tx_hdr2; -       int frame_size = dev->maxpacket;          int headroom;          void *ptr;            tx_hdr1 = skb->len;          tx_hdr2 = skb_shinfo(skb)->gso_size; /* Set TSO mss */ -       if (((skb->len + 8) % frame_size) == 0) -               tx_hdr2 |= 0x80008000;  /* Enable padding */            headroom = skb_headroom(skb) - 8;   -       if ((dev->net->features & NETIF_F_SG) && skb_linearize(skb)) +       if ((dev->net->features & NETIF_F_SG) && skb_linearize(skb)) { +               dev_kfree_skb_any(skb);                  return NULL; +       }            if ((skb_header_cloned(skb) || headroom < 0) &&              pskb_expand_head(skb, headroom < 0 ? 8 : 0, 0, GFP_ATOMIC)) { @@ -1680,7 +1670,7 @@ static const struct driver_info ax88179_info = {          .link_reset = ax88179_link_reset,          .reset = ax88179_reset,          .stop = ax88179_stop, -       .flags = FLAG_ETHER | FLAG_FRAMING_AX, +       .flags = FLAG_ETHER | FLAG_FRAMING_AX | FLAG_MULTI_PACKET,          .rx_fixup = ax88179_rx_fixup,          .tx_fixup = ax88179_tx_fixup,  }; @@ -1693,7 +1683,7 @@ static const struct driver_info ax88178a_info = {          .link_reset = ax88179_link_reset,          .reset = ax88179_reset,          .stop = ax88179_stop, -       .flags = FLAG_ETHER | FLAG_FRAMING_AX, +       .flags = FLAG_ETHER | FLAG_FRAMING_AX | FLAG_MULTI_PACKET,          .rx_fixup = ax88179_rx_fixup,          .tx_fixup = ax88179_tx_fixup,  }; @@ -1706,7 +1696,7 @@ static const struct driver_info cypress_GX3_info = {          .link_reset = ax88179_link_reset,          .reset = ax88179_reset,          .stop = ax88179_stop, -       .flags = FLAG_ETHER | FLAG_FRAMING_AX, +       .flags = FLAG_ETHER | FLAG_FRAMING_AX | FLAG_MULTI_PACKET,          .rx_fixup = ax88179_rx_fixup,          .tx_fixup = ax88179_tx_fixup,  }; @@ -1719,7 +1709,7 @@ static const struct driver_info dlink_dub1312_info = {          .link_reset = ax88179_link_reset,          .reset = ax88179_reset,          .stop = ax88179_stop, -       .flags = FLAG_ETHER | FLAG_FRAMING_AX, +       .flags = FLAG_ETHER | FLAG_FRAMING_AX | FLAG_MULTI_PACKET,          .rx_fixup = ax88179_rx_fixup,          .tx_fixup = ax88179_tx_fixup,  }; @@ -1732,7 +1722,7 @@ static const struct driver_info sitecom_info = {          .link_reset = ax88179_link_reset,          .reset = ax88179_reset,          .stop = ax88179_stop, -       .flags = FLAG_ETHER | FLAG_FRAMING_AX, +       .flags = FLAG_ETHER | FLAG_FRAMING_AX | FLAG_MULTI_PACKET,          .rx_fixup = ax88179_rx_fixup,          .tx_fixup = ax88179_tx_fixup,  }; @@ -1745,7 +1735,7 @@ static const struct driver_info samsung_info = {          .link_reset = ax88179_link_reset,          .reset = ax88179_reset,          .stop = ax88179_stop, -       .flags = FLAG_ETHER | FLAG_FRAMING_AX, +       .flags = FLAG_ETHER | FLAG_FRAMING_AX | FLAG_MULTI_PACKET,          .rx_fixup = ax88179_rx_fixup,          .tx_fixup = ax88179_tx_fixup,  }; @@ -1758,7 +1748,7 @@ static const struct driver_info lenovo_info = {          .link_reset = ax88179_link_reset,          .reset = ax88179_reset,          .stop = ax88179_stop, -       .flags = FLAG_ETHER | FLAG_FRAMING_AX, +       .flags = FLAG_ETHER | FLAG_FRAMING_AX | FLAG_MULTI_PACKET,          .rx_fixup = ax88179_rx_fixup,          .tx_fixup = ax88179_tx_fixup,  }; @@ -1771,7 +1761,7 @@ static const struct driver_info belkin_info = {          .link_reset = ax88179_link_reset,          .reset  = ax88179_reset,          .stop   = ax88179_stop, -       .flags  = FLAG_ETHER | FLAG_FRAMING_AX, +       .flags  = FLAG_ETHER | FLAG_FRAMING_AX | FLAG_MULTI_PACKET,          .rx_fixup = ax88179_rx_fixup,          .tx_fixup = ax88179_tx_fixup,  }; @@ -1784,7 +1774,7 @@ static const struct driver_info toshiba_info = {          .link_reset = ax88179_link_reset,          .reset  = ax88179_reset,          .stop = ax88179_stop, -       .flags  = FLAG_ETHER | FLAG_FRAMING_AX, +       .flags  = FLAG_ETHER | FLAG_FRAMING_AX | FLAG_MULTI_PACKET,          .rx_fixup = ax88179_rx_fixup,          .tx_fixup = ax88179_tx_fixup,  }; @@ -1797,7 +1787,7 @@ static const struct driver_info mct_info = {          .link_reset = ax88179_link_reset,          .reset  = ax88179_reset,          .stop   = ax88179_stop, -       .flags  = FLAG_ETHER | FLAG_FRAMING_AX, +       .flags  = FLAG_ETHER | FLAG_FRAMING_AX | FLAG_MULTI_PACKET,          .rx_fixup = ax88179_rx_fixup,          .tx_fixup = ax88179_tx_fixup,  }; @@ -1810,7 +1800,7 @@ static const struct driver_info at_umc2000_info = {          .link_reset = ax88179_link_reset,          .reset  = ax88179_reset,          .stop   = ax88179_stop, -       .flags  = FLAG_ETHER | FLAG_FRAMING_AX, +       .flags  = FLAG_ETHER | FLAG_FRAMING_AX | FLAG_MULTI_PACKET,          .rx_fixup = ax88179_rx_fixup,          .tx_fixup = ax88179_tx_fixup,  }; @@ -1823,7 +1813,7 @@ static const struct driver_info at_umc200_info = {          .link_reset = ax88179_link_reset,          .reset  = ax88179_reset,          .stop   = ax88179_stop, -       .flags  = FLAG_ETHER | FLAG_FRAMING_AX, +       .flags  = FLAG_ETHER | FLAG_FRAMING_AX | FLAG_MULTI_PACKET,          .rx_fixup = ax88179_rx_fixup,          .tx_fixup = ax88179_tx_fixup,  }; @@ -1836,7 +1826,7 @@ static const struct driver_info at_umc2000sp_info = {          .link_reset = ax88179_link_reset,          .reset  = ax88179_reset,          .stop   = ax88179_stop, -       .flags  = FLAG_ETHER | FLAG_FRAMING_AX, +       .flags  = FLAG_ETHER | FLAG_FRAMING_AX | FLAG_MULTI_PACKET,          .rx_fixup = ax88179_rx_fixup,          .tx_fixup = ax88179_tx_fixup,  }; From patchwork Tue Feb 28 09:44:52 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Yen Chun-Chao X-Patchwork-Id: 13154621 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 7F36CC64ED6 for ; Tue, 28 Feb 2023 09:45:48 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231244AbjB1Jpq (ORCPT ); Tue, 28 Feb 2023 04:45:46 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:37146 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231225AbjB1Jpp (ORCPT ); Tue, 28 Feb 2023 04:45:45 -0500 Received: from AUS01-SY4-obe.outbound.protection.outlook.com (mail-sy4aus01olkn2144.outbound.protection.outlook.com [40.92.62.144]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 28C6D2E0EC for ; Tue, 28 Feb 2023 01:45:20 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=jz0DC4JwFUnYKWSyn2sgo3qJycdM3g9qgK60ZPRIzpHVf3k5SeFbxUaZWIqSuiRyzl1lhNB66jer9Y4HNFc5lqsE6FoJ8cH5JYvssh5fqkfY1zPNvpmzc4veICbsuTUX1QdYNj+K9adFzyFp8aqe3qOwIw1czSZdwQDetqx4VYYLQAmmafkTJCzU3ATptA7w6xTzVZZenEiZdSFds5nuo8l7iJze+YMaZ/J6e+RvzyPruHQv6nP/AQ0OCdQzRInwuhTlm3oLtI8wCrkhYhWe3pdHN2RzOz+YDc9bZZP6o2y77eYSMF1ttYsRphITBirCo9kCTkS0LvkEAiKRQxShxw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=vUeMcUDi3HeH9B8x3lZjXb2MttUodq7rT2sTfNw6a4s=; b=gOZ+upcVbkO+eMFh1lSmw03aI4M6Msjv6Ini05CEpvOAqodOhjA6Ipv2lWNhJ3HjvFJZmIhUykXGWSIewBAkFsZWbMc1ijQLFjDlFAePASLu4zzKQQVduB15DW+zA84+MpvowKt1YiT+I1OEOa39nxc7WmVnaJfzvNY+fKq+lMU2Va8G1MWu0WMdJfUc1Rndt1SZZSOtvXrCq36CoN9s6pZiRqLCk5bh7XgqULczjUU3UdIUa3zpZz1F/gw4p+IFvcsR0YtjQGLcLwsxuuOQ9i9fp8hemn0/TCPDKOcR4d7ZS+Xk7wzOOTJMOB4s/n8b/lhbp7Vv+f6KD8cYSr6WCA== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=none; dmarc=none; dkim=none; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=hotmail.com; s=selector1; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=vUeMcUDi3HeH9B8x3lZjXb2MttUodq7rT2sTfNw6a4s=; b=OPMCMzyNdC1bPhcKdISSiU/6QTm8JdKTaxMiR+4XmHmD13DNVAr9Jk/XaI2S0TDXiSxe+i+5mcntJurzvTodI+ZUqsW8lULLdoPuXrbNmsiWnGwr0BOevalH92BpB/IwhRfmDMj+wXNSnXLcfoqd1TEn1LrE+HAuMXU2q0pech0mJSfMfpUJiPQjI0le/bzoSxB+elbrUkcRLukkyG5Cs4wB+j+ikoV0nW4LpMaTmKhKQyb4yWhsLP+NdiTZGNbttlciPWwNofb6vwExMQxWnpluMUK9Xgxk04+n0wTgX8P4k8MBHEJzZ4S/RIbyh3w6xjlWBN4ZzMJFk/tg0W9nqw== Received: from ME3P282MB2827.AUSP282.PROD.OUTLOOK.COM (2603:10c6:220:13c::13) by ME3P282MB0884.AUSP282.PROD.OUTLOOK.COM (2603:10c6:220:86::8) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6134.30; Tue, 28 Feb 2023 09:44:52 +0000 Received: from ME3P282MB2827.AUSP282.PROD.OUTLOOK.COM ([fe80::50ae:cb9:fc65:57f4]) by ME3P282MB2827.AUSP282.PROD.OUTLOOK.COM ([fe80::50ae:cb9:fc65:57f4%5]) with mapi id 15.20.6134.029; Tue, 28 Feb 2023 09:44:52 +0000 From: Yen ChunChao To: "davem@davemloft.net" CC: "pabeni@redhat.com" , "linux-usb@vger.kernel.org" Subject: [PATCH 2/3 RFC] net: usb: ax88179_178a: Enable AX_RX_CTL_IPE only when NET_IP_ALIGN != 0 Thread-Topic: [PATCH 2/3 RFC] net: usb: ax88179_178a: Enable AX_RX_CTL_IPE only when NET_IP_ALIGN != 0 Thread-Index: AQHZS1lO02yRow6F0ES3ZlBD2LvbCA== Date: Tue, 28 Feb 2023 09:44:52 +0000 Message-ID: References: <20221007142038.2814378-1-nothingstopsme@hotmail.com> In-Reply-To: Accept-Language: zh-TW, en-US Content-Language: zh-TW X-MS-Has-Attach: X-MS-TNEF-Correlator: msip_labels: x-ms-exchange-messagesentrepresentingtype: 1 x-tmn: [sbTylhdqrwOqq3p9u8F6El1gcMUD5LPj] x-ms-publictraffictype: Email x-ms-traffictypediagnostic: ME3P282MB2827:EE_|ME3P282MB0884:EE_ x-ms-office365-filtering-correlation-id: 4aedc242-9e1d-4d4b-b7ef-08db197070b3 x-microsoft-antispam: BCL:0; x-microsoft-antispam-message-info: BUoxWYaIEWD1izyRXH1qmiCJl3vrrZoOcUhlBOFQ6wc4ZuC7vGzW4WZ+gxDMwhE2/cVhVcih4lRqGp53YBmYzKqckbJT2aosiQZ8mrUhzIvuJRaAJkW7HkegRyRPLfuNJGnUSi7sg0W2kS8/P1CexQIa3tN6vTKDcBdXXclPnqChmHeCUHhsPyCkuMghi7tF4YoZ3ymI0Az+bws/dYFGdLyW1OHXVXS8NYUoJqXyPXxBH45H0YqrzGbVqMqLmoqkn0o74HEpMngjMC5678JYF+6rrL5Wj9SoqzPSJ2wKbVzJWOSfaVj0KaknUhgZcEfPZZgUPIQq6azzyzbdsdg7D4K9soJGGSobLQXgrOe2f2XdncxqbqmY3njMgxBoxUeW3ik6npiKxCncgpwZ16MRWXpODHy3st5XHLe9WRzBz8Goafx7L42FwoLu8aGRj9nlFcAq/pZxo8mxMVKdGHj6ga8EDG8VJNrqrRAC3yLSL8UoK69DKnUThnnyMWUxtkIHxWdFZRZbi5DSbZ2dhq463534ybjzFB4BrZcL48DiApz/bzBAtcMTVS4No0QNjCeoZTQbYLkZpduMg84jA0zVwg== x-ms-exchange-antispam-messagedata-chunkcount: 1 x-ms-exchange-antispam-messagedata-0: =?iso-8859-1?q?8AlOEVoofYvuHjtQodoWGQJ?= =?iso-8859-1?q?4dT/Wac3jVMrFXQJc0B6sli3jzhafVtPEoEncw06G5H+AnJQ4UJySSNeV0U6?= =?iso-8859-1?q?Gh+4ubXkepP9vdwwmrqmV6ZRq1Thc+GUvUe5kJSZQvI7MbL4FvKd0S4FuxRj?= =?iso-8859-1?q?X+tXBQilQmfVb9gXbyzZAz1Ni23um3IiqdzEPMmjtVThyDnq6qdH2AB2ST1x?= =?iso-8859-1?q?jbX6qj2zT76vJmSmmuXvKXH60zMIlmXpTAIOkch6KSczJkFY9qyQ+kXw0RaW?= =?iso-8859-1?q?OKGBZ02Bn0vUUY2z36G0oHGQzmDzda1QajTFxWYDqGRGd9VYnIcstgxjKS3l?= =?iso-8859-1?q?KRI1R3hgcdjTOMRrjeETTSc6mtFwV6V3ScqAIICutFzRj28ZQp/EbnLWZq3/?= =?iso-8859-1?q?CbabAMR7dReaQcVs02ydG1QMGrhllT2x7FGVpBp/Oym/LTe7OT2DS5CfOmBz?= =?iso-8859-1?q?FnAuanfNfQF/+TS2nPRcLo4iBHGfRl0QXif2pdsxmU0EgVIcTzhzdJNi0eAv?= =?iso-8859-1?q?tmFUJwoONYhUnpiBogRWnQfzOf4cVXoS/mJQ3U0mmQnSn93wFhFcXEwAjFGU?= =?iso-8859-1?q?KjW9pfitn71ymojK3V8144HGOpVX/NqFYi8uapkC8z4/2nSh/y+qdhxa/mKl?= =?iso-8859-1?q?Y8gOJIrqqg5CSDRXA6wp+owlap5032dEkqo2RMQNjIl1xiJIiRfTKhZy5O/H?= =?iso-8859-1?q?xGq8NCnf3Wd9Z3gP4yzLtAQu7ypijKqtU92E7s7lMsU2BuYdm5KGpsSCuoo+?= =?iso-8859-1?q?kX29Ah4zBnUOXbLJmfeVg27s1nJa7invBdt7uuCDBZ3FvvV8B07PXN0tLte1?= =?iso-8859-1?q?S7YFVYvFRIVJEzyO+QdhiBBJPwWj7VhxQg6ifRERL4Rh9YnkFWnoLIVUWpie?= =?iso-8859-1?q?HJEhgGZaBAt5OmLt+pg3b+02K8zcSG0IBdCzQizlJ+miMiHcgBFzyyTGw96/?= =?iso-8859-1?q?yAgO20d/Op3H6KrCRrUnloGRNFrNJCQCS2p4XqsuzOSksbRAnrwpuFxBJKzy?= =?iso-8859-1?q?mi3Ym42BBbsimfAXGrgiXd0FUyQJMe2dpgI65Q74abts7cavhn6xCb6mPsvR?= =?iso-8859-1?q?w9bw01dl/XflRTUEAG+9nj/yv6JU5idMpyOd43/LOhNkn61FBA8v+YPICwAT?= =?iso-8859-1?q?SSR0uebKDM3rCbm60K6oAl6NZe944HjQAcv+ySap4fxXPlVU3/eVcYZ65FUO?= =?iso-8859-1?q?Ely3N1SOMxU+qPIjn/etwjD64WxZuC+xgTMf0Tqx0F9IwLjiDvNDGsQJKEuS?= =?iso-8859-1?q?AqKapHFmzwTlkyEVNx1q8SgBZZBYg4Ch8BwBLtWWNqqi37gDZ9wXuATeBF34?= =?iso-8859-1?q?6muZSJJs4nT+TNp314w=3D=3D?= MIME-Version: 1.0 X-OriginatorOrg: sct-15-20-4755-11-msonline-outlook-746f3.templateTenant X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-AuthSource: ME3P282MB2827.AUSP282.PROD.OUTLOOK.COM X-MS-Exchange-CrossTenant-RMS-PersistedConsumerOrg: 00000000-0000-0000-0000-000000000000 X-MS-Exchange-CrossTenant-Network-Message-Id: 4aedc242-9e1d-4d4b-b7ef-08db197070b3 X-MS-Exchange-CrossTenant-originalarrivaltime: 28 Feb 2023 09:44:52.0758 (UTC) X-MS-Exchange-CrossTenant-fromentityheader: Hosted X-MS-Exchange-CrossTenant-id: 84df9e7f-e9f6-40af-b435-aaaaaaaaaaaa X-MS-Exchange-CrossTenant-rms-persistedconsumerorg: 00000000-0000-0000-0000-000000000000 X-MS-Exchange-Transport-CrossTenantHeadersStamped: ME3P282MB0884 Precedence: bulk List-ID: X-Mailing-List: linux-usb@vger.kernel.org Problem Description: According to the comments in the hardware vendor's outdated source code [1], AX_RX_CTL_IPE signals the hardware to do 32-bit(4-byte) IP header alignment; such alignment is equivalent to the concept of NET_IP_ALIGN = 2 (an extra 2-byte "pesudo header" at the beginning of each etherner frame), as described in skbuff.h. In the current implementation, however, AX_RX_CTL_IPE is always enabled regardless of the value of NET_IP_ALIGN; this can introduce waste in many aspects, such as 1. hardware internal resource 2. USB bandwidth 3. host memory 4. cpu cycles (for updating frame start pointers and frame size variables) when alignment is completely unnecessary, i.e. NET_IP_ALIGN = 0. Solution: Enable AX_RX_CTL_IPE and process pesudo headers only when NET_IP_ALIGN != 0. Verification: Only tested on a platform where NET_IP_ALIGN = 0, with this device: 0b95:1790 ASIX Electronics Corp. AX88179 Gigabit Ethernet References: [1] https://www.asix.com.tw/en/support/download/file/120 (AX88179 USB3.0 to 10/100/1000M Gigabit Ethernet Controller, version 1.20.0) Signed-off-by: Chun-Chao Yen --- This is the same patch as https://rb.gy/ieil2d sent in Oct. 2022. I just would like to know the current state of this patch. Has it been rejected or still under review? Thanks  drivers/net/usb/ax88179_178a.c | 20 +++++++++++++++-----  1 file changed, 15 insertions(+), 5 deletions(-) diff --git a/drivers/net/usb/ax88179_178a.c b/drivers/net/usb/ax88179_178a.c index b50748b3776c..96ede3a131d4 100644 --- a/drivers/net/usb/ax88179_178a.c +++ b/drivers/net/usb/ax88179_178a.c @@ -858,7 +858,10 @@ static void ax88179_set_multicast(struct net_device *net)          struct ax88179_data *data = dev->driver_priv;          u8 *m_filter = ((u8 *)dev->data);   -       data->rxctl = (AX_RX_CTL_START | AX_RX_CTL_AB | AX_RX_CTL_IPE); +       data->rxctl = (AX_RX_CTL_START | AX_RX_CTL_AB); + +       if (NET_IP_ALIGN) +               data->rxctl |= AX_RX_CTL_IPE;            if (net->flags & IFF_PROMISC) {                  data->rxctl |= AX_RX_CTL_PRO; @@ -1424,7 +1427,7 @@ static int ax88179_rx_fixup(struct usbnet *dev, struct sk_buff *skb)                    /* Check CRC or runt packet */                  if ((*pkt_hdr & (AX_RXHDR_CRC_ERR | AX_RXHDR_DROP_ERR)) || -                   pkt_len < 2 + ETH_HLEN) { +                   pkt_len < (NET_IP_ALIGN ? 2 : 0) + ETH_HLEN) {                          dev->net->stats.rx_errors++;                          goto advance_data_ptr;                  } @@ -1438,8 +1441,13 @@ static int ax88179_rx_fixup(struct usbnet *dev, struct sk_buff *skb)                  }                  skb_trim(ax_skb, pkt_len);   -               /* Skip IP alignment pseudo header */ -               skb_pull(ax_skb, 2); +               if (NET_IP_ALIGN) { +                       /* Skip the pseudo header, 2 bytes at the start of each +                        * ethernet frame, resulting from hardware 4-byte +                        * IP header alignment (triggered by AX_RX_CTL_IPE) +                        */ +                       skb_pull(ax_skb, 2); +               }                    ax_skb->truesize = SKB_TRUESIZE(pkt_len);                  ax88179_rx_checksum(ax_skb, pkt_hdr); @@ -1609,8 +1617,10 @@ static int ax88179_reset(struct usbnet *dev)          ax88179_write_cmd(dev, AX_ACCESS_MAC, AX_TXCOE_CTL, 1, 1, tmp);            /* Configure RX control register => start operation */ -       *tmp16 = AX_RX_CTL_DROPCRCERR | AX_RX_CTL_IPE | AX_RX_CTL_START | +       *tmp16 = AX_RX_CTL_DROPCRCERR | AX_RX_CTL_START |                   AX_RX_CTL_AP | AX_RX_CTL_AMALL | AX_RX_CTL_AB; +       if (NET_IP_ALIGN) +               *tmp16 |= AX_RX_CTL_IPE;          ax88179_write_cmd(dev, AX_ACCESS_MAC, AX_RX_CTL, 2, 2, tmp16);            *tmp = AX_MONITOR_MODE_PMETYPE | AX_MONITOR_MODE_PMEPOL | From patchwork Tue Feb 28 09:44:58 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Yen Chun-Chao X-Patchwork-Id: 13154622 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id D40B2C64EC7 for ; Tue, 28 Feb 2023 09:46:08 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230220AbjB1JqI (ORCPT ); Tue, 28 Feb 2023 04:46:08 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:37686 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231344AbjB1JqG (ORCPT ); Tue, 28 Feb 2023 04:46:06 -0500 Received: from AUS01-SY4-obe.outbound.protection.outlook.com (mail-sy4aus01olkn2144.outbound.protection.outlook.com [40.92.62.144]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 6BB1910A8C for ; Tue, 28 Feb 2023 01:45:45 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=Mvkv/lWqXBQt882EHXsNGHxNxjhQXnHh9h6FQOtkFnyuhEptn5LUTM9MsHzWQ0vP4S0fG+sGLumymdupZEpK0LAwBSsrh66CsuLrsGM9bUZzu6AAy4CoAItcBm3ahegu/ZTSgzCnsMlYfK+Vzp9bIgZgeDagF7s1JZkOyXNPKtKVoAXuzy5ZcS6la6+rWisMqh5M8haN+UlzzNiiXjgWTE8LJ3nvQPrCTjBSSSUkJFKdvplQuNmFH8SyodJ8PlJH7kQA7icNZ2PZ0HvxFbZOrlHgP4lWdKhaXCsGKvoMRafcnw/7WijGPamKujHakub6LpK4OrMEKDwDLG19qq2BKA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=pfBjrWsoAoKgCbx4pzuuIkgVxBwZs5jqyHwED5kOJ4k=; b=UgrELfkhMvvBeej7hVK8N/KMChLxC7+5nHCaFP2JC6TxPC4xOfl+EyAFLlDLdr5OWbFt6J2Kpg8aAjxCsohwOFGL8ce0D9UOu8C0dKpRJsWYdhD9jAbR2RfdukRq3pZcIwNXEsaOqFn6Ab0ArpiqKgpusMuTQWTdg2/wqY8WEBq9jPGtknV+RMGHTJby3yASRxBjxtQTG9j06jFVGQu7FHHkImBzSOZmsN2TwklKPpkeUViqMMr/asyaqji2ddMe/14VrPbJ+mj0WbHXRSzuFo/WBbuGyXMzE9wImtGDJ+rYb2MB5PI+GeNgnIIaijluRCn7ee21omKFANi4grD9oA== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=none; dmarc=none; dkim=none; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=hotmail.com; s=selector1; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=pfBjrWsoAoKgCbx4pzuuIkgVxBwZs5jqyHwED5kOJ4k=; b=ubk3aSBk76GEhNfPJfsDud/ey5q0JtG6MmSS+yOh0byDblKyWszq3UmrPSVtNg1PNB715lWPlagC7CX+g++QmsLhyP1hbRzXNU1TO+c+/7kvIzOnYj3S0sIeJgIlgDsTujn0gx87hd+lSnp8FbLUVOImGGvRCsfjSwG8iSy6yoe9C1y44KXwj03YryZEGm/SEDA9TYs2Dg9kFLattvV6f2Sph9hOkiQKyQhIVdv1Lg+blJe38wqeH7L4h7HWhyxuSCUzepgpKzmL8+D2kf61p0LOmqxv86L5Ts9mVdPAZ6/Xpw/2myxPURKfDLJsIDbjzIycDZBN6Pf1wQAVqHKjeQ== Received: from ME3P282MB2827.AUSP282.PROD.OUTLOOK.COM (2603:10c6:220:13c::13) by ME3P282MB0884.AUSP282.PROD.OUTLOOK.COM (2603:10c6:220:86::8) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6134.30; Tue, 28 Feb 2023 09:44:58 +0000 Received: from ME3P282MB2827.AUSP282.PROD.OUTLOOK.COM ([fe80::50ae:cb9:fc65:57f4]) by ME3P282MB2827.AUSP282.PROD.OUTLOOK.COM ([fe80::50ae:cb9:fc65:57f4%5]) with mapi id 15.20.6134.029; Tue, 28 Feb 2023 09:44:58 +0000 From: Yen ChunChao To: "davem@davemloft.net" CC: "pabeni@redhat.com" , "linux-usb@vger.kernel.org" Subject: [PATCH 3/3 RFC] net: usb: ax88179_178a: Allow live update of devices' mac address Thread-Topic: [PATCH 3/3 RFC] net: usb: ax88179_178a: Allow live update of devices' mac address Thread-Index: AQHZS1lS1m3VJU2uwUClrI4Qi+U7Zw== Date: Tue, 28 Feb 2023 09:44:58 +0000 Message-ID: References: <20221007142038.2814378-1-nothingstopsme@hotmail.com> In-Reply-To: Accept-Language: zh-TW, en-US Content-Language: zh-TW X-MS-Has-Attach: X-MS-TNEF-Correlator: msip_labels: x-ms-exchange-messagesentrepresentingtype: 1 x-tmn: [O1hF3daOmKQUDQXDJL1pJe/WcAYo4gbu] x-ms-publictraffictype: Email x-ms-traffictypediagnostic: ME3P282MB2827:EE_|ME3P282MB0884:EE_ x-ms-office365-filtering-correlation-id: b017dede-ebc3-4cc5-9721-08db19707493 x-microsoft-antispam: BCL:0; x-microsoft-antispam-message-info: JBx/TYnIdkdS1pMJ17p5AaM5mwa94l07TW/OqfwCCTwi6oGJhrRPAyrlcTPdv8M3hriGYNhqtOV1OqkS7K8nXk9cGCUy0ZU/h+m5loCX6LjWbSsEeZA7/aLUahM9Iz83TX2P6wmkZZolGefZ/JSK85aA5WUJdm71DuaSh+Dbl0m/KpE4gXHvJ6CgdbMt7yLQBVj+4iDfdb7zxuTDg+qRM94nMqsEvfAtVLt0mY5QdT6FlEx/ycA+VocRoSx2CeOJD8Rr7zj5ZwV8y9FxVXqlO7+tfZGzh/DUde6bDK9N4aPH5jVsdM161CsgFeS3gdnUhA6lqU4pziHVaXkSdSDKLavtMcY9qfC3IK5n3Iv8GJF8pbhghXxj3fNLLjV5msHMzqSBDcEX1oNxKXTZDw2cqDTT9CKqeZbw00lSwmlmUf7/T45kD04GpccWon67Gig89zIQFOgDkKljE9BBbxhJBpWZfCFyfXboRexXz8o0mMw9jYDX4ABad19Y+usmvmf1vznUSC0wVmurE4Ybj10jZfvYI41aCgQDd04UavAOzJkOGjSqnUGY7UHEK5YNrVdYkIHpL6/Hcj9DgJ0NzoneNA== x-ms-exchange-antispam-messagedata-chunkcount: 1 x-ms-exchange-antispam-messagedata-0: =?iso-8859-1?q?BYSIuahmcHsM3bYgNax09+H?= =?iso-8859-1?q?VZi3dM0wJfcEBlMyDA4owhGXej+Od4eJQWdYSJjSOEUQbu+dr1N6rBGnA7tb?= =?iso-8859-1?q?8Bgrtf6NJywrpfkAQxpzGW9/FYw2RTLiZgdCCTRg9XzAJ7rC/1qFZOmXZkvM?= =?iso-8859-1?q?UU1EfF5auhYn6mKg5xen5evQcF/GhpZidyqHfMocsobS5WtD9R25S8801orJ?= =?iso-8859-1?q?TPmhpVXRefKQ++ZPC1bggucZ7Cilbly6MRPbVQqN8aLxEexa+kfSnkGt/B4D?= =?iso-8859-1?q?7HzuXay5GCbXmpdtCve04f9cDiL2JXyPLuc+i/VMFz5Y3/zdLuc0q4K1b82u?= =?iso-8859-1?q?h8cskYwtMEvXTvlX2VFYJ4WXpiKfsdQAhi8GAU7ShpNM3iVhyMB+DYk+zNjf?= =?iso-8859-1?q?Dy5UfS+x0hmsohOAnwGmSfR+5jwfhk7aPn4N07KH/aRIPBXZAORYaxpGioLH?= =?iso-8859-1?q?7zFPEXF0hjxsTqi5+u9Z0d/NRiiqCubGVWWcwOXllDy/VyKrIpwcu1no1nMw?= =?iso-8859-1?q?Yvq+r8Te4PQzqDZORg1iTOrNypzfNx/tpe/8Sv+kjhVVpaeI0OuW/BmUWEdO?= =?iso-8859-1?q?zK/1bquFnfaraPCAbOfBGJ8CZrV80G+60g1IqPUZ4ALdQFZVXhBTR4WSdM7f?= =?iso-8859-1?q?f15RdEoT5EgzuDOj3GlSOUL1vU9BM3olq4RIScxQLiK3Z9cu6oJ0BND5Ssib?= =?iso-8859-1?q?+L+aPj4VRXXZGfi2tR0jrJRzMnnUDJcrXa/xFprSqVK6M2nhRRZnl/Yomtss?= =?iso-8859-1?q?MdEFfzvvwSKftgcOVLbTqsS9wQDN/zgu03+wi5ZPMIjSuv8BP874cQC3xioy?= =?iso-8859-1?q?55ojeSrPYrI48H1dpX3ckKW9vM7oO8JXu6/jEmurBFA6qOBiJebHl9KHxDzq?= =?iso-8859-1?q?8jk7xYWjMrVc086wtRBWrnHDSQQhSEronzLrbbQiS7gjfSRmdkT6txnzoHKR?= =?iso-8859-1?q?kK2f/kuDdrvlHtWTsRsya52vWU54EcXeNhp8is9jxxfumBp3+5abe9W3Se6s?= =?iso-8859-1?q?0BlspX/GEhaUI9Bs/3vmvG6ym7NmP39Du8cIIK23p2J0gl188YWrVVIkZ8vI?= =?iso-8859-1?q?4mnWBV0NYjTXeDv4J9C3BR1txLzOWOHw5hnFkoqaEGfjIX+lNF22X52A8Pvr?= =?iso-8859-1?q?laqTZgo8/1CilRQkiSwq4KuUz4WPKhqRCcaYTA7llDxEByAS9RDRLT1UN96D?= =?iso-8859-1?q?f5ntndv+qmCmE5Dif4+UZXEGJS7Ec8VqF3fSgDcoVTLaItlU7YjunHysY7yb?= =?iso-8859-1?q?RCkORzHklCFZrbbpn8mQpJXaxb7kfjhwhmKDucyhk1iJBaFVPx/U9g4Bt8Sr?= =?iso-8859-1?q?rlBrad9zze20pQNrQtg=3D=3D?= MIME-Version: 1.0 X-OriginatorOrg: sct-15-20-4755-11-msonline-outlook-746f3.templateTenant X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-AuthSource: ME3P282MB2827.AUSP282.PROD.OUTLOOK.COM X-MS-Exchange-CrossTenant-RMS-PersistedConsumerOrg: 00000000-0000-0000-0000-000000000000 X-MS-Exchange-CrossTenant-Network-Message-Id: b017dede-ebc3-4cc5-9721-08db19707493 X-MS-Exchange-CrossTenant-originalarrivaltime: 28 Feb 2023 09:44:58.5281 (UTC) X-MS-Exchange-CrossTenant-fromentityheader: Hosted X-MS-Exchange-CrossTenant-id: 84df9e7f-e9f6-40af-b435-aaaaaaaaaaaa X-MS-Exchange-CrossTenant-rms-persistedconsumerorg: 00000000-0000-0000-0000-000000000000 X-MS-Exchange-Transport-CrossTenantHeadersStamped: ME3P282MB0884 Precedence: bulk List-ID: X-Mailing-List: linux-usb@vger.kernel.org Problem Description: Live update of devices' mac address is currently blocked by this driver, as it requires the evaluation of netif_running() given the corresponding device being false. While appearing a harmless check, it can be disruptive in some networking configurations, such as "Link Aggregation" operated in active-backup mode with fail_over_mac=follow, where the mac address of a device will be updated dynamically even when it is already up and running. Solution: Remove the check of netif_running() in ax88179_set_mac_addr(), so that the update procedure can proceed irrespective of the boolean status returned by netif_running(). Verification: Only tested with this device: 0b95:1790 ASIX Electronics Corp. AX88179 Gigabit Ethernet Signed-off-by: Chun-Chao Yen --- This is the same patch as https://rb.gy/nxendp sent in Oct. 2022. I just would like to know the current state of this patch. Has it been rejected or still under review? Thanks  drivers/net/usb/ax88179_178a.c | 2 --  1 file changed, 2 deletions(-) diff --git a/drivers/net/usb/ax88179_178a.c b/drivers/net/usb/ax88179_178a.c index 96ede3a131d4..84016e0567d4 100644 --- a/drivers/net/usb/ax88179_178a.c +++ b/drivers/net/usb/ax88179_178a.c @@ -958,8 +958,6 @@ static int ax88179_set_mac_addr(struct net_device *net, void *p)          struct sockaddr *addr = p;          int ret;   -       if (netif_running(net)) -               return -EBUSY;          if (!is_valid_ether_addr(addr->sa_data))                  return -EADDRNOTAVAIL;