From patchwork Fri Oct 5 10:25:12 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Igor Russkikh X-Patchwork-Id: 10627855 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 9635E112B for ; Fri, 5 Oct 2018 10:25:51 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 88FE828FD5 for ; Fri, 5 Oct 2018 10:25:51 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 7B9DB28FEF; Fri, 5 Oct 2018 10:25:51 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-7.9 required=2.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,MAILING_LIST_MULTI,RCVD_IN_DNSWL_HI autolearn=ham version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 106A628FD5 for ; Fri, 5 Oct 2018 10:25:51 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728447AbeJERXi (ORCPT ); Fri, 5 Oct 2018 13:23:38 -0400 Received: from mail-bl2nam02on0081.outbound.protection.outlook.com ([104.47.38.81]:6901 "EHLO NAM02-BL2-obe.outbound.protection.outlook.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1728325AbeJERXh (ORCPT ); Fri, 5 Oct 2018 13:23:37 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=AQUANTIA1COM.onmicrosoft.com; s=selector1-aquantia-com; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=I8SPLHBOvUQm9cbDrkv3whiKK3DYqFCxwK6nwPpIsmQ=; b=PxbeGxGbMLxxoXCUF93aTbd4bRSB3gzWWtysqo8hNqXY4WSTjNkKL6mJ0FgeLUHFZ+O5jv7K/va15c8XuKy5XpEtLsRYBDQ/vaLfeRjF1b16dZUHiTGL7UxaFqsIkokyPO6GseW5lQmbRV3lXc0aU7XuXPiW8yTK9y77WLRgPJo= Received: from BY1PR0701MB1660.namprd07.prod.outlook.com (10.162.110.22) by BY1PR0701MB1641.namprd07.prod.outlook.com (10.162.110.158) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.1207.21; Fri, 5 Oct 2018 10:25:13 +0000 Received: from BY1PR0701MB1660.namprd07.prod.outlook.com ([fe80::346d:e756:e70e:17]) by BY1PR0701MB1660.namprd07.prod.outlook.com ([fe80::346d:e756:e70e:17%2]) with mapi id 15.20.1207.021; Fri, 5 Oct 2018 10:25:13 +0000 From: Igor Russkikh To: "David S . Miller" CC: "linux-usb@vger.kernel.org" , "netdev@vger.kernel.org" , Igor Russkikh , Dmitry Bezrukov Subject: [PATCH net-next 13/19] net: usb: aqc111: Add support for TSO Thread-Topic: [PATCH net-next 13/19] net: usb: aqc111: Add support for TSO Thread-Index: AQHUXJWzaiE/oCNcZEKjzWKgt795DQ== Date: Fri, 5 Oct 2018 10:25:12 +0000 Message-ID: References: In-Reply-To: Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-clientproxiedby: AM5PR0602CA0024.eurprd06.prod.outlook.com (2603:10a6:203:a3::34) To BY1PR0701MB1660.namprd07.prod.outlook.com (2a01:111:e400:522a::22) authentication-results: spf=none (sender IP is ) smtp.mailfrom=Igor.Russkikh@aquantia.com; x-ms-exchange-messagesentrepresentingtype: 1 x-originating-ip: [95.79.108.179] x-ms-publictraffictype: Email x-microsoft-exchange-diagnostics: 1;BY1PR0701MB1641;6:HcOvDy/qeyZFTOz/UUhK95JuXCh7bpmm2nWL6/ZOaJM6ENPc8d5V+gOJ2QzPA0bQpwrk9IpgFvAqPJJHuwXkA+vx6Fr1EGbUb8THyW3Z3bHOlUy2OWI/Qjm8z6mALNCkNytPQ3TT2EsVP6WyrEfZWZx0UflO8UoWXfRjQ57HmVNiS+y/7BLMhBx7Bub70CZGWGvc0sbCwJZAmZhuJPZhJ9LPrlMxqzZd0LOfIitxRj9wRmzNvAqpeT5eYslnwhpDavj26/c51HRDrEU3VJ7AQHJHL6stOU31sOLZZwEznRvMKXRewr6Z38KuX64Lh8NSht5kf0wpioZGVkMHEY15/WqIFildHa1nO0vEVcl+2iq+dbtPX+UYdqIY2bF7dp9bVSLcxDCglvwl/WFn5ejvyFN6/a6PiMDD3YkL2Jm7gKapVOITreyqgJwYh/pOzKCPdcE/zE2QeL+eRHx7fEOkDg==;5:THysooovmKrxDj80vZY/11KLtOZuBCKPphFwzg2ukHG5XfAZwc2XwHA55zD6itmvEuMFWtLNbmWErYvVPvnUwR/P/vF+aYRRGKDJHwGhXnTIzRdtbBmSTXgMJvUDA4rvrOAzkulsPg97B7ak8kdUN2czQA5Dzt/H+g8yrZjLXDE=;7:ojIVTm29Ns9Of3fvdNosV3ghD7OZrfaVXHkWRKvq7hsrlexwNl2hwE3Gs5ydY8JyRVv+BJII/XMTtvZLfl/2OSBa/+fHg/XjPtrhh3U2XgEDGKTsk62nPy0nVkI166XluFhHwiyhENzAb+voHnHy02vdA5Mt79xND+/69RE/1jjEFhqd8iND2ZVR+bXKf4ATJvshX1NYa8L7un1hIjnXLTyfLeo3udODHOrAA1NQvx7fWmt3BcK3xufty4gvRRMx x-ms-office365-filtering-correlation-id: 8d99d399-ba28-4f9c-0e6f-08d62aacd58e x-microsoft-antispam: BCL:0;PCL:0;RULEID:(7020095)(4652040)(8989299)(4534185)(4627221)(201703031133081)(201702281549075)(8990200)(5600074)(711020)(2017052603328)(7153060)(7193020);SRVR:BY1PR0701MB1641; x-ms-traffictypediagnostic: BY1PR0701MB1641: x-microsoft-antispam-prvs: x-exchange-antispam-report-test: UriScan:; x-ms-exchange-senderadcheck: 1 x-exchange-antispam-report-cfa-test: BCL:0;PCL:0;RULEID:(6040522)(2401047)(8121501046)(5005006)(3231355)(944501410)(52105095)(3002001)(10201501046)(93006095)(93001095)(149066)(150057)(6041310)(20161123564045)(20161123562045)(20161123558120)(20161123560045)(201703131423095)(201702281528075)(20161123555045)(201703061421075)(201703061406153)(201708071742011)(7699051);SRVR:BY1PR0701MB1641;BCL:0;PCL:0;RULEID:;SRVR:BY1PR0701MB1641; x-forefront-prvs: 0816F1D86E x-forefront-antispam-report: SFV:NSPM;SFS:(10009020)(376002)(366004)(346002)(136003)(39850400004)(396003)(199004)(189003)(81166006)(81156014)(6436002)(86362001)(8676002)(118296001)(316002)(14454004)(6512007)(8936002)(66066001)(256004)(386003)(2900100001)(11346002)(2906002)(6506007)(6486002)(52116002)(36756003)(107886003)(3846002)(486006)(53936002)(71190400001)(476003)(99286004)(105586002)(97736004)(26005)(44832011)(2616005)(68736007)(54906003)(186003)(5660300001)(5250100002)(71200400001)(446003)(76176011)(7736002)(4326008)(102836004)(106356001)(305945005)(478600001)(6116002)(6916009)(72206003)(25786009);DIR:OUT;SFP:1101;SCL:1;SRVR:BY1PR0701MB1641;H:BY1PR0701MB1660.namprd07.prod.outlook.com;FPR:;SPF:None;LANG:en;PTR:InfoNoRecords;A:1;MX:1; received-spf: None (protection.outlook.com: aquantia.com does not designate permitted sender hosts) x-microsoft-antispam-message-info: uppxt3K6e/lfurTA3kMsuM+Khr3o8Ch1aSNQzogd6NRkdtcMip9xxvgTVsuJ65IqKP+oS+e8/ZA+1pL5p9IGivn8iz3UcbeaWlvjE94Wso68pnO3q9ESeiuAjcbY2lARU2s3ePw0guKgaC7Uvf6kFdAjWqqFR41FnED2Xo5nz7oSXoy+FRwNzDs7E86JD66bcz+O3BUXEcE4bvtHzvCmpse5cJovzia6zMGeCF4UXQBaB8gmdar4fjpW/e46kaTIHAQVN3p8QMq6GnfmrMgVtF/I2NaooKZ8UZ1oDRPnjHbQS2Bkii/VaEAB+wnNlD1Q1XTD7odxkyEhZezDoBFp8SWjIcCp/SHTFYMt4AgGpRs= spamdiagnosticoutput: 1:99 spamdiagnosticmetadata: NSPM MIME-Version: 1.0 X-OriginatorOrg: aquantia.com X-MS-Exchange-CrossTenant-Network-Message-Id: 8d99d399-ba28-4f9c-0e6f-08d62aacd58e X-MS-Exchange-CrossTenant-originalarrivaltime: 05 Oct 2018 10:25:12.9633 (UTC) X-MS-Exchange-CrossTenant-fromentityheader: Hosted X-MS-Exchange-CrossTenant-id: 83e2e134-991c-4ede-8ced-34d47e38e6b1 X-MS-Exchange-Transport-CrossTenantHeadersStamped: BY1PR0701MB1641 Sender: linux-usb-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-usb@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP From: Dmitry Bezrukov Signed-off-by: Dmitry Bezrukov Signed-off-by: Igor Russkikh --- drivers/net/usb/aqc111.c | 3 +++ drivers/net/usb/aqc111.h | 6 ++++-- 2 files changed, 7 insertions(+), 2 deletions(-) diff --git a/drivers/net/usb/aqc111.c b/drivers/net/usb/aqc111.c index 6efd9a9ad44e..f61fa7446b72 100644 --- a/drivers/net/usb/aqc111.c +++ b/drivers/net/usb/aqc111.c @@ -964,6 +964,9 @@ static struct sk_buff *aqc111_tx_fixup(struct usbnet *dev, struct sk_buff *skb, /*Length of actual data*/ tx_hdr.length = (skb->len & 0x1FFFFF); + /* TSO MSS */ + tx_hdr.max_seg_size = skb_shinfo(skb)->gso_size; + headroom = (skb->len + AQ_TX_HEADER_SIZE) % 8; if (headroom != 0) padding_size = 8 - headroom; diff --git a/drivers/net/usb/aqc111.h b/drivers/net/usb/aqc111.h index 0be2e4cbb00a..9cf357777df9 100644 --- a/drivers/net/usb/aqc111.h +++ b/drivers/net/usb/aqc111.h @@ -64,10 +64,12 @@ /* Feature. ********************************************/ #define AQ_SUPPORT_FEATURE (NETIF_F_SG | NETIF_F_IP_CSUM |\ - NETIF_F_IPV6_CSUM | NETIF_F_RXCSUM) + NETIF_F_IPV6_CSUM | NETIF_F_RXCSUM |\ + NETIF_F_TSO) #define AQ_SUPPORT_HW_FEATURE (NETIF_F_SG | NETIF_F_IP_CSUM |\ - NETIF_F_IPV6_CSUM | NETIF_F_RXCSUM) + NETIF_F_IPV6_CSUM | NETIF_F_RXCSUM |\ + NETIF_F_TSO) /* SFR Reg. ********************************************/