Skip to content

Commit d4ea6f6

Browse files
Marcin Szycikanguy11
authored andcommitted
ice: ignore protocol field in GTP offload
Commit 34a8977 ("ice: Add support for inner etype in switchdev") added the ability to match on inner ethertype. A side effect of that change is that it is now impossible to add some filters for protocols which do not contain inner ethtype field. tc requires the protocol field to be specified when providing certain other options, e.g. src_ip. This is a problem in case of GTP - when user wants to specify e.g. src_ip, they also need to specify protocol in tc command (otherwise tc fails with: Illegal "src_ip"). Because GTP is a tunnel, the protocol field is treated as inner protocol. GTP does not contain inner ethtype field and the filter cannot be added. To fix this, ignore the ethertype field in case of GTP filters. Fixes: 9a225f8 ("ice: Support GTP-U and GTP-C offload in switchdev") Signed-off-by: Marcin Szycik <[email protected]> Tested-by: Sandeep Penigalapati <[email protected]> Signed-off-by: Tony Nguyen <[email protected]>
1 parent 69135c5 commit d4ea6f6

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

drivers/net/ethernet/intel/ice/ice_tc_lib.c

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -993,7 +993,9 @@ ice_parse_cls_flower(struct net_device *filter_dev, struct ice_vsi *vsi,
993993
n_proto_key = ntohs(match.key->n_proto);
994994
n_proto_mask = ntohs(match.mask->n_proto);
995995

996-
if (n_proto_key == ETH_P_ALL || n_proto_key == 0) {
996+
if (n_proto_key == ETH_P_ALL || n_proto_key == 0 ||
997+
fltr->tunnel_type == TNL_GTPU ||
998+
fltr->tunnel_type == TNL_GTPC) {
997999
n_proto_key = 0;
9981000
n_proto_mask = 0;
9991001
} else {

0 commit comments

Comments
 (0)