Commit Graph

20 Commits

Author SHA1 Message Date
Josh Soref
7be78d0279 fix spelling in comments and strings
The tool comes from https://github.com/jsoref

Signed-off-by: Josh Soref <jsoref@gmail.com>
Signed-off-by: Thomas Monjalon <thomas@monjalon.net>
2022-01-11 12:16:53 +01:00
Ferruh Yigit
25cf263074 net: add macro for VLAN header length
Multiple drivers are defining macros for VLAN header length, to remove
the redundancy defining macro in the ether header.
And updated drivers to use the new macro.

Signed-off-by: Ferruh Yigit <ferruh.yigit@intel.com>
Acked-by: Haiyue Wang <haiyue.wang@intel.com>
Acked-by: Rosen Xu <rosen.xu@intel.com>
Acked-by: Jiawen Wu <jiawenwu@trustnetic.com>
2021-11-17 20:17:04 +01:00
Guoyang Zhou
3596d7b607 net/hinic: fix MTU consistency with firmware
The configuration of MTU is inconsistent in the driver and
firmware when the port is stopped, started and reconfigured.
Before, HINIC_MAX_JUMBO_FRAME_SIZE include VLAN tag, but when
frame and pktlen are converted to each other do not include
VLAN tag. And port_mtu_set function will use HINIC_MAX_JUMBO_FRAME_SIZE
to calculate eth_overhead, so MTU will be inconsistent in the driver and
firmware.

Fixes: e542ab51ab ("net/hinic: fix jumbo frame flag condition for MTU set")
Cc: stable@dpdk.org

Signed-off-by: Guoyang Zhou <zhouguoyang@huawei.com>
2021-07-23 15:37:17 +02:00
Bruce Richardson
df96fd0d73 ethdev: make driver-only headers private
The rte_ethdev_driver.h, rte_ethdev_vdev.h and rte_ethdev_pci.h files are
for drivers only and should be a private to DPDK and not installed.

Signed-off-by: Bruce Richardson <bruce.richardson@intel.com>
Reviewed-by: Maxime Coquelin <maxime.coquelin@redhat.com>
Acked-by: Thomas Monjalon <thomas@monjalon.net>
Acked-by: Steven Webster <steven.webster@windriver.com>
2021-01-29 20:59:09 +01:00
Andrew Rybchenko
35b1c68af2 ethdev: remove legacy EtherType filter type support
Instead of EtherType filter RTE flow API should be used.

Move corresponding definitions to ethdev internal driver API
since it is used by drivers internally.
Preserve RTE_ETH_FILTER_ETHERTYPE because of it as well.

Signed-off-by: Andrew Rybchenko <arybchenko@solarflare.com>
Acked-by: Ajit Khaparde <ajit.khaparde@broadcom.com>
Acked-by: Haiyue Wang <haiyue.wang@intel.com>
Reviewed-by: Ferruh Yigit <ferruh.yigit@intel.com>
2020-11-03 23:35:05 +01:00
Xiaoyun Wang
224cff4bba net/hinic: fix setting promiscuous mode
When setting promiscuous or allmulticast mode, increase
multi-thread resource protection, because the patch
"net/bonding: prefer allmulti to promiscuous for LACP"
adds trying to use allmulti when adding a slave, and
EVS bond driver also sets promisc with another thread,
which may lead to thread reentry and cause failure to
set promiscuous mode.

Fixes: cb7b6606eb ("net/hinic: add RSS stats and promiscuous ops")
Cc: stable@dpdk.org

Signed-off-by: Xiaoyun Wang <cloud.wangxiaoyun@huawei.com>
2020-07-07 23:38:26 +02:00
Joyce Kong
0371535d46 net/hinic: use common bit operations API
Remove its own bit operation APIs and use the common one,
this can reduce the code duplication largely.

Signed-off-by: Joyce Kong <joyce.kong@arm.com>
Reviewed-by: Gavin Hu <gavin.hu@arm.com>
2020-06-16 14:34:42 +02:00
Xiaoyun Wang
f372a65f70 net/hinic: update code style
The patch modifies the comments of structures or functions, and adds
space for comments, removes extra empty lines and adjusts the
print level for VF branches in one sdk interface.

Signed-off-by: Xiaoyun Wang <cloud.wangxiaoyun@huawei.com>
2020-05-18 20:35:57 +02:00
Xiaoyun Wang
9d441c4551 net/hinic/base: support IPv6 flow rules
The patch supports ipv6 flow rules for BGP or ICMP packets.

Signed-off-by: Xiaoyun Wang <cloud.wangxiaoyun@huawei.com>
2020-05-11 22:27:39 +02:00
Xiaoyun Wang
ef6f2f5cdb net/hinic: support flow control
The patch supports pause flow control, including getting or
setting rx_pasue, tx_pause and auto_neg, auto_neg is just
for Electric port type.

Signed-off-by: Xiaoyun Wang <cloud.wangxiaoyun@huawei.com>
2020-04-21 13:57:04 +02:00
Xiaoyun Wang
1fe89aa37f net/hinic: add flow director filter
The patch supports filter type of inner VXLAN or non vxlan dport,
and use TCAM method to config these rules.

Signed-off-by: Xiaoyun Wang <cloud.wangxiaoyun@huawei.com>
2020-04-21 13:57:04 +02:00
Xiaoyun Wang
c3ba1f0f20 net/hinic: support inner L3 checksum offload
This patch supports inner L3 checksum offload for VXLAN packets,
modifies rx checksum offload.

Signed-off-by: Xiaoyun Wang <cloud.wangxiaoyun@huawei.com>
2019-10-23 16:43:08 +02:00
Xiaoyun Wang
1742421b9e net/hinic: flush flow director filter
Supports to flush fdir filter.
Destroy all flow rules associated with a port on hinic.

Signed-off-by: Xiaoyun Wang <cloud.wangxiaoyun@huawei.com>
2019-10-23 16:43:08 +02:00
Xiaoyun Wang
f4ca3fd54c net/hinic: create and destroy flow director filter
Add support for creating/destroying fdir filter.
The filter rule includes LACP,ARP and ICMP packet type.

Signed-off-by: Xiaoyun Wang <cloud.wangxiaoyun@huawei.com>
2019-10-23 16:43:08 +02:00
Xiaoyun Wang
a3920be330 net/hinic: create and destroy ntuple filter
Add support for creating/destroying ntuple filter.
The filter rule includes BGP and VRRP packet type.

Signed-off-by: Xiaoyun Wang <cloud.wangxiaoyun@huawei.com>
2019-10-23 16:43:08 +02:00
Xiaoyun Wang
73122b52e8 net/hinic: add flow validation operations
This patch is to validate the filter rules, which includes
ntuple filter, ethertype filter and fdir filter. The packets
type that supported are BGP,VRRP,LACP,ARP and ICMP.

Signed-off-by: Xiaoyun Wang <cloud.wangxiaoyun@huawei.com>
2019-10-23 16:43:08 +02:00
Xiaoyun Wang
00499a22d8 net/hinic: add unicast and multicast MAC set
This patch adds unicast and multicast set interfaces.
Application can add or remove unicast MAC address, also can set
multicast MAC address, the maximum multicast list size is 2048.

Signed-off-by: Xiaoyun Wang <cloud.wangxiaoyun@huawei.com>
2019-10-23 16:43:08 +02:00
Xiaoyun Wang
8260eba689 net/hinic: add allmulticast mode and MTU set
When enable allmulticast mode, all multicast packets
can be received. This patch also adds support for MTU set,
the range of MTU is from 256 to 9600.

Signed-off-by: Xiaoyun Wang <cloud.wangxiaoyun@huawei.com>
2019-10-23 16:43:08 +02:00
Xiaoyun Wang
fdba3bf15c net/hinic: add VLAN filter and offload
This patch adds support for VLAN filter and VLAN offload.

Signed-off-by: Xiaoyun Wang <cloud.wangxiaoyun@huawei.com>
2019-10-23 16:43:08 +02:00
Ziyang Xuan
1d09792a27 net/hinic: add build and doc files
Add build and doc files along with hinic_pmd_ethdev.c
which just includes PMD register and log initialization
for compilation.

Signed-off-by: Ziyang Xuan <xuanziyang2@huawei.com>
Reviewed-by: Ferruh Yigit <ferruh.yigit@intel.com>
2019-06-28 20:31:49 +02:00