Skip to content

Commit 64e711c

Browse files
anambiarinJeff Kirsher
authored andcommitted
i40e: Remove UDP support for big buffer
Since UDP based filters are not supported via big buffer cloud filters, remove UDP support. Also change a few return types to indicate unsupported vs invalid configuration. Signed-off-by: Amritha Nambiar <[email protected]> Acked-by: Alexander Duyck <[email protected]> Tested-by: Andrew Bowers <[email protected]> Signed-off-by: Jeff Kirsher <[email protected]>
1 parent c095508 commit 64e711c

File tree

1 file changed

+9
-9
lines changed

1 file changed

+9
-9
lines changed

drivers/net/ethernet/intel/i40e/i40e_main.c

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -6038,8 +6038,8 @@ static int i40e_validate_and_set_switch_mode(struct i40e_vsi *vsi)
60386038
/* Set Bit 7 to be valid */
60396039
mode = I40E_AQ_SET_SWITCH_BIT7_VALID;
60406040

6041-
/* Set L4type to both TCP and UDP support */
6042-
mode |= I40E_AQ_SET_SWITCH_L4_TYPE_BOTH;
6041+
/* Set L4type for TCP support */
6042+
mode |= I40E_AQ_SET_SWITCH_L4_TYPE_TCP;
60436043

60446044
/* Set cloud filter mode */
60456045
mode |= I40E_AQ_SET_SWITCH_MODE_NON_TUNNEL;
@@ -6969,18 +6969,18 @@ static int i40e_add_del_cloud_filter_big_buf(struct i40e_vsi *vsi,
69696969
is_valid_ether_addr(filter->src_mac)) ||
69706970
(is_multicast_ether_addr(filter->dst_mac) &&
69716971
is_multicast_ether_addr(filter->src_mac)))
6972-
return -EINVAL;
6972+
return -EOPNOTSUPP;
69736973

6974-
/* Make sure port is specified, otherwise bail out, for channel
6975-
* specific cloud filter needs 'L4 port' to be non-zero
6974+
/* Big buffer cloud filter needs 'L4 port' to be non-zero. Also, UDP
6975+
* ports are not supported via big buffer now.
69766976
*/
6977-
if (!filter->dst_port)
6978-
return -EINVAL;
6977+
if (!filter->dst_port || filter->ip_proto == IPPROTO_UDP)
6978+
return -EOPNOTSUPP;
69796979

69806980
/* adding filter using src_port/src_ip is not supported at this stage */
69816981
if (filter->src_port || filter->src_ipv4 ||
69826982
!ipv6_addr_any(&filter->ip.v6.src_ip6))
6983-
return -EINVAL;
6983+
return -EOPNOTSUPP;
69846984

69856985
/* copy element needed to add cloud filter from filter */
69866986
i40e_set_cld_element(filter, &cld_filter.element);
@@ -6991,7 +6991,7 @@ static int i40e_add_del_cloud_filter_big_buf(struct i40e_vsi *vsi,
69916991
is_multicast_ether_addr(filter->src_mac)) {
69926992
/* MAC + IP : unsupported mode */
69936993
if (filter->dst_ipv4)
6994-
return -EINVAL;
6994+
return -EOPNOTSUPP;
69956995

69966996
/* since we validated that L4 port must be valid before
69976997
* we get here, start with respective "flags" value

0 commit comments

Comments
 (0)