Skip to content

Commit bd5196b

Browse files
committed
Merge branch 'hns3-hwgro'
Salil Mehta says: ==================== net: hns3: Add support of hardware GRO to HNS3 Driver This patch-set adds support of hardware assisted GRO feature to HNS3 driver on Rev B(=0x21) platform. Current hardware only supports TCP/IPv{4|6} flows. Change Log: V1->V2: 1. Remove redundant print reported by Leon Romanovsky. Link: https://lkml.org/lkml/2018/11/13/715 ==================== Signed-off-by: David S. Miller <[email protected]>
2 parents ba2f55b + a6d53b9 commit bd5196b

File tree

7 files changed

+339
-67
lines changed

7 files changed

+339
-67
lines changed

drivers/net/ethernet/hisilicon/hns3/hnae3.h

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -52,6 +52,7 @@
5252
#define HNAE3_UNIC_CLIENT_INITED_B 0x4
5353
#define HNAE3_ROCE_CLIENT_INITED_B 0x5
5454
#define HNAE3_DEV_SUPPORT_FD_B 0x6
55+
#define HNAE3_DEV_SUPPORT_GRO_B 0x7
5556

5657
#define HNAE3_DEV_SUPPORT_ROCE_DCB_BITS (BIT(HNAE3_DEV_SUPPORT_DCB_B) |\
5758
BIT(HNAE3_DEV_SUPPORT_ROCE_B))
@@ -65,6 +66,9 @@
6566
#define hnae3_dev_fd_supported(hdev) \
6667
hnae3_get_bit((hdev)->ae_dev->flag, HNAE3_DEV_SUPPORT_FD_B)
6768

69+
#define hnae3_dev_gro_supported(hdev) \
70+
hnae3_get_bit((hdev)->ae_dev->flag, HNAE3_DEV_SUPPORT_GRO_B)
71+
6872
#define ring_ptr_move_fw(ring, p) \
6973
((ring)->p = ((ring)->p + 1) % (ring)->desc_num)
7074
#define ring_ptr_move_bw(ring, p) \
@@ -301,6 +305,8 @@ struct hnae3_ae_dev {
301305
* Set vlan filter config of vf
302306
* enable_hw_strip_rxvtag()
303307
* Enable/disable hardware strip vlan tag of packets received
308+
* set_gro_en
309+
* Enable/disable HW GRO
304310
*/
305311
struct hnae3_ae_ops {
306312
int (*init_ae_dev)(struct hnae3_ae_dev *ae_dev);
@@ -445,6 +451,7 @@ struct hnae3_ae_ops {
445451
bool (*get_hw_reset_stat)(struct hnae3_handle *handle);
446452
bool (*ae_dev_resetting)(struct hnae3_handle *handle);
447453
unsigned long (*ae_dev_reset_cnt)(struct hnae3_handle *handle);
454+
int (*set_gro_en)(struct hnae3_handle *handle, int enable);
448455
};
449456

450457
struct hnae3_dcb_ops {

0 commit comments

Comments
 (0)