From mboxrd@z Thu Jan 1 00:00:00 1970 From: David Miller Subject: Re: [PATCH 1/1] net-next/hinic: add checksum offload and TSO support Date: Wed, 17 Oct 2018 21:59:30 -0700 (PDT) Message-ID: <20181017.215930.2300105767161105738.davem@davemloft.net> References: <20181016111234.20492-1-xuechaojing@huawei.com> Mime-Version: 1.0 Content-Type: Text/Plain; charset=us-ascii Content-Transfer-Encoding: 7bit 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 To: xuechaojing@huawei.com Return-path: In-Reply-To: <20181016111234.20492-1-xuechaojing@huawei.com> Sender: linux-kernel-owner@vger.kernel.org List-Id: netdev.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.