Skip to content

Commit cd36a14

Browse files
vipinamdferruhy
authored andcommitted
app/testpmd: add register keyword
Currently SSE SIMD variables are declared as stack variables. Allowing the use of keyword register for shuffle mask and address variables, improves the mac-swap Mpps by 1 for single queue. Test Result: * Platform: AMD EPYC 9554 @3.1GHz, no boost * Test scenarios: TEST-PMD 64B IO vs MAC-SWAP * NIC: broadcom P2100: loopback 2*100Gbps <mode : Mpps Ingress: Mpps Egress> ------------------------------------------------ - IO: 47.23 : 46.0 - MAC-SWAP original: 45.75 : 43.8 - MAC-SWAP register mod 45.73 : 44.83 Signed-off-by: Vipin Varghese <[email protected]> Acked-by: Ferruh Yigit <[email protected]>
1 parent ca6b978 commit cd36a14

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

app/test-pmd/macswap_sse.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,13 +16,13 @@ do_macswap(struct rte_mbuf *pkts[], uint16_t nb,
1616
uint64_t ol_flags;
1717
int i;
1818
int r;
19-
__m128i addr0, addr1, addr2, addr3;
19+
register __m128i addr0, addr1, addr2, addr3;
2020
/**
2121
* shuffle mask be used to shuffle the 16 bytes.
2222
* byte 0-5 wills be swapped with byte 6-11.
2323
* byte 12-15 will keep unchanged.
2424
*/
25-
__m128i shfl_msk = _mm_set_epi8(15, 14, 13, 12,
25+
register const __m128i shfl_msk = _mm_set_epi8(15, 14, 13, 12,
2626
5, 4, 3, 2,
2727
1, 0, 11, 10,
2828
9, 8, 7, 6);

0 commit comments

Comments
 (0)