[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-Id: <20181117.122212.954465454738045729.davem@davemloft.net>
Date: Sat, 17 Nov 2018 12:22:12 -0800 (PST)
From: David Miller <davem@...emloft.net>
To: xuechaojing@...wei.com
Cc: linux-kernel@...r.kernel.org, netdev@...r.kernel.org,
wulike1@...wei.com, chiqijun@...wei.com, fy.wang@...wei.com,
tony.qu@...wei.com, luoshaokai@...wei.com
Subject: Re: [PATCH 2/3] net-next/hinic:performance improvement for HiNIC
From: Xue Chaojing <xuechaojing@...wei.com>
Date: Thu, 15 Nov 2018 20:05:47 +0000
> In order to improve performance, this patch adds rx checksum offload
> for the HiNIC driver and optimizes the code. Performance test(Iperf)
> shows more than 95% improvement in TCP streams.
>
> Signed-off-by: Xue Chaojing <xuechaojing@...wei.com>
What kind of "optimizes the code" is being done here? Be explicit.
And such unrelated changes to supporting checksum offload should be
split into another patch.
> + csum_err = HINIC_RQ_CQE_STATUS_GET(status, CSUM_ERR);
> +
> + if (!(netdev->features & NETIF_F_RXCSUM))
> + return;
> +
> + if (!csum_err)
> + skb->ip_summed = CHECKSUM_UNNECESSARY;
> + else
> + skb->ip_summed = CHECKSUM_NONE;
Does the CQE status word provide more information? Like the checksum
computed over the packet? That's more useful than a binary "csum correct"
state.
> +#define BIT(nr) (1UL << (nr))
This is unnecessary, please include linux/bits.h and use the definition from
there.
Powered by blists - more mailing lists