Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 4cffcf0e authored by Skylar Chang's avatar Skylar Chang Committed by Stephen Boyd
Browse files

IPA: fix ipv6 TOS traffic routing fail



For ipv6 traffic filter rules with meta equation
32 is not working. All traffic is taking SW path.
To filter TC ip packets change to use  meta equation
128 instead of 32

Change-Id: I8cf34264b65584d5ef1bb73c239413ebb9083345
Signed-off-by: default avatarSkylar Chang <chiaweic@codeaurora.org>
parent 14e03610
Loading
Loading
Loading
Loading
+14 −7
Original line number Diff line number Diff line
@@ -252,7 +252,7 @@ int ipa_generate_hw_rule(enum ipa_ip_type ip,
			/* 0 => offset of TOS in v4 header */
			*buf = ipa_write_8(0, *buf);
			*buf = ipa_write_32((attrib->tos_mask << 16), *buf);
			*buf = ipa_write_32(attrib->tos_value, *buf);
			*buf = ipa_write_32((attrib->tos_value << 16), *buf);
			*buf = ipa_pad_to_32(*buf);
			ofst_meq32++;
		}
@@ -589,17 +589,24 @@ int ipa_generate_hw_rule(enum ipa_ip_type ip,
		}

		if (attrib->attrib_mask & IPA_FLT_TOS_MASKED) {
			if (ipa_ofst_meq32[ofst_meq32] == -1) {
				IPAERR("ran out of meq32 eq\n");
			if (ipa_ofst_meq128[ofst_meq128] == -1) {
				IPAERR("ran out of meq128 eq\n");
				return -EPERM;
			}
			*en_rule |= ipa_ofst_meq32[ofst_meq32];
			/* 0 => offset of TOS in v4 header */
			*en_rule |= ipa_ofst_meq128[ofst_meq128];
			/* 0 => offset of TOS in v6 header */
			*buf = ipa_write_8(0, *buf);
			*buf = ipa_write_32((attrib->tos_mask << 20), *buf);
			*buf = ipa_write_32(attrib->tos_value, *buf);
			*buf = ipa_write_32(0, *buf);
			*buf = ipa_write_32(0, *buf);
			*buf = ipa_write_32(0, *buf);

			*buf = ipa_write_32((attrib->tos_value << 20), *buf);
			*buf = ipa_write_32(0, *buf);
			*buf = ipa_write_32(0, *buf);
			*buf = ipa_write_32(0, *buf);
			*buf = ipa_pad_to_32(*buf);
			ofst_meq32++;
			ofst_meq128++;
		}

		if (attrib->attrib_mask & IPA_FLT_FLOW_LABEL) {