Received: by 2002:ac0:a582:0:0:0:0:0 with SMTP id m2-v6csp1481729imm; Wed, 17 Oct 2018 22:00:11 -0700 (PDT) X-Google-Smtp-Source: ACcGV62In5ashkt7jTAxP7UqfhK52iSQmQoPGUQXsFVrMZlOMbrodRSwWRlw3/8Okr3oqnfFhg1K X-Received: by 2002:a63:f960:: with SMTP id q32-v6mr26172272pgk.213.1539838811267; Wed, 17 Oct 2018 22:00:11 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1539838810; cv=none; d=google.com; s=arc-20160816; b=zKjhSdaow6NQM4ReDGyEcUtnUasZZV549Pi8QXrH0fg8DoG9m/U4EM9nr9n93plIxL D+YrbtRyDreITFFJbBI3xJVOWX2KyHeeZltLdJubDSG7aR7QmlAxkIkvr8bKw8lR5gCN UzjYkKikxr4IgNz5OSZND481jws4fgkR5n+bWra38ynddaSwhoN7al1TQ5JVsQKuFLMe DXYVw1q6m8M9T22ouGmHEV46KEko0+cHhKdkOo9/PHSxjAAR1EibC1awp+DyzXwSV596 Kc9KJpTil/VjMFn6+L3vyWwIGjU/hgrdBuHT/gP+KZ7N23xtlUGvXd6iG//J0ShPmHwx /9dg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :references:in-reply-to:from:subject:cc:to:message-id:date; bh=IJlLDNA/7oM/LcY4NMR61gqOdu4fxZN2e+hBDAV/zxA=; b=ktO+EznS1vSH/P8JJANZnEz/kHaX6imnQlHtMvhwvrH262IR9HTiuKcdFdO+bkUyUf iMqjGCBZYmWBe495rzBxmxP9pUWid3ffvguuoUh6WrsGrz/Npm2quz9wFbeYykO8E8Ry XTjWjuIZPofIscaLa4JbaDmnssDuO5A/Vkp1zcaBTTcbj0ry7DWRMX4d3ix1uxhtCFKp b4H86nYBrT27UvNqXr3wy6Pk9wPLn3I/SWRl5xnxw36skw2ZZFfrcyGgjb364/Y/rrcS YQ/sRaqFckvNZYsLX0Z1SUMFjkKyozJVxEWrEdmMotRc12CAFstCDk/fMS9t/MO9zM61 XfrQ== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id v6-v6si21730991plg.84.2018.10.17.21.59.54; Wed, 17 Oct 2018 22:00:10 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727393AbeJRM6h (ORCPT + 99 others); Thu, 18 Oct 2018 08:58:37 -0400 Received: from shards.monkeyblade.net ([23.128.96.9]:54582 "EHLO shards.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727328AbeJRM6h (ORCPT ); Thu, 18 Oct 2018 08:58:37 -0400 Received: from localhost (c-67-183-62-245.hsd1.wa.comcast.net [67.183.62.245]) (using TLSv1 with cipher AES256-SHA (256/256 bits)) (Client did not present a certificate) (Authenticated sender: davem-davemloft) by shards.monkeyblade.net (Postfix) with ESMTPSA id 8977B13AE1A86; Wed, 17 Oct 2018 21:59:30 -0700 (PDT) Date: Wed, 17 Oct 2018 21:59:30 -0700 (PDT) Message-Id: <20181017.215930.2300105767161105738.davem@davemloft.net> To: xuechaojing@huawei.com Cc: linux-kernel@vger.kernel.org, netdev@vger.kernel.org, zhaochen6@huawei.com, tony.qu@huawei.com, yin.yinshi@huawei.com, luoshaokai@huawei.com, fy.wang@huawei.com, luoxianjun@huawei.com Subject: Re: [PATCH 1/1] net-next/hinic: add checksum offload and TSO support From: David Miller In-Reply-To: <20181016111234.20492-1-xuechaojing@huawei.com> References: <20181016111234.20492-1-xuechaojing@huawei.com> X-Mailer: Mew version 6.7 on Emacs 26 / Mule 6.0 (HANACHIRUSATO) Mime-Version: 1.0 Content-Type: Text/Plain; charset=us-ascii Content-Transfer-Encoding: 7bit X-Greylist: Sender succeeded SMTP AUTH, not delayed by milter-greylist-4.5.12 (shards.monkeyblade.net [149.20.54.216]); Wed, 17 Oct 2018 21:59:31 -0700 (PDT) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Xue Chaojing Date: Tue, 16 Oct 2018 11:12:34 +0000 > +static void get_inner_l4_info(struct sk_buff *skb, union hinic_l4 *l4, > + enum hinic_offload_type offload_type, u8 l4_proto, > + enum hinic_l4_offload_type *l4_offload, > + u32 *l4_len, u32 *offset) > +{ > + *offset = 0; > + *l4_len = 0; > + *l4_offload = OFFLOAD_DISABLE; Please order local variables from longest to shortest line. > +static int offload_csum(struct hinic_sq_task *task, u32 *queue_info, > + struct sk_buff *skb) > +{ > + union hinic_l3 ip; > + union hinic_l4 l4; > + enum hinic_l3_offload_type l3_type; > + enum hinic_l4_offload_type l4_offload; > + u32 offset, l4_len, network_hdr_len; > + u8 l4_proto; Likewise. > @@ -184,9 +458,9 @@ netdev_tx_t hinic_xmit_frame(struct sk_buff *skb, struct net_device *netdev) > unsigned int wqe_size; > struct hinic_txq *txq; > struct hinic_qp *qp; > - u16 prod_idx; > + u16 prod_idx, q_id = skb->queue_mapping; Likewise.