summaryrefslogtreecommitdiff
path: root/drivers/net/ethernet/huawei/hinic/hinic_port.h
diff options
context:
space:
mode:
authorZhao Chen <zhaochen6@huawei.com>2018-10-18 18:02:51 +0300
committerDavid S. Miller <davem@davemloft.net>2018-10-19 02:44:37 +0300
commitcc18a7543d2f63a2c93fc61cfa7fd8be5464f75e (patch)
treef44fdb43030510881d2e3074e67579041c84f70a /drivers/net/ethernet/huawei/hinic/hinic_port.h
parent40b06553c906a56ae31677b3ecbd49546947698d (diff)
downloadlinux-cc18a7543d2f63a2c93fc61cfa7fd8be5464f75e.tar.xz
net-next/hinic: add checksum offload and TSO support
This patch adds checksum offload and TSO support for the HiNIC driver. Perfomance test (Iperf) shows more than 100% improvement in TCP streams. Signed-off-by: Zhao Chen <zhaochen6@huawei.com> Signed-off-by: Xue Chaojing <xuechaojing@huawei.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/net/ethernet/huawei/hinic/hinic_port.h')
-rw-r--r--drivers/net/ethernet/huawei/hinic/hinic_port.h18
1 files changed, 18 insertions, 0 deletions
diff --git a/drivers/net/ethernet/huawei/hinic/hinic_port.h b/drivers/net/ethernet/huawei/hinic/hinic_port.h
index 9404365195dd..f6e3220fe28f 100644
--- a/drivers/net/ethernet/huawei/hinic/hinic_port.h
+++ b/drivers/net/ethernet/huawei/hinic/hinic_port.h
@@ -72,6 +72,11 @@ enum hinic_speed {
HINIC_SPEED_UNKNOWN = 0xFF,
};
+enum hinic_tso_state {
+ HINIC_TSO_DISABLE = 0,
+ HINIC_TSO_ENABLE = 1,
+};
+
struct hinic_port_mac_cmd {
u8 status;
u8 version;
@@ -167,6 +172,17 @@ struct hinic_port_cap {
u8 rsvd2[3];
};
+struct hinic_tso_config {
+ u8 status;
+ u8 version;
+ u8 rsvd0[6];
+
+ u16 func_id;
+ u16 rsvd1;
+ u8 tso_en;
+ u8 resv2[3];
+};
+
int hinic_port_add_mac(struct hinic_dev *nic_dev, const u8 *addr,
u16 vlan_id);
@@ -195,4 +211,6 @@ int hinic_port_set_func_state(struct hinic_dev *nic_dev,
int hinic_port_get_cap(struct hinic_dev *nic_dev,
struct hinic_port_cap *port_cap);
+int hinic_port_set_tso(struct hinic_dev *nic_dev, enum hinic_tso_state state);
+
#endif