diff mbox

[v3,4/5] example: l3fwd: remove unnecessary output arguments

Message ID 1475495356-4038-4-git-send-email-matias.elo@nokia.com
State Accepted
Commit 3c78ee3f2c9274ebfd6b51e1ec203218b792fc9b
Headers show

Commit Message

Elo, Matias (Nokia - FI/Espoo) Oct. 3, 2016, 11:49 a.m. UTC
There is no need to save the number of data bytes remaining in the segment
when calling odp_packet_l3_ptr().

Signed-off-by: Matias Elo <matias.elo@nokia.com>

---
 example/l3fwd/odp_l3fwd.c | 6 ++----
 1 file changed, 2 insertions(+), 4 deletions(-)

-- 
2.7.4
diff mbox

Patch

diff --git a/example/l3fwd/odp_l3fwd.c b/example/l3fwd/odp_l3fwd.c
index df412af..0f8068f 100644
--- a/example/l3fwd/odp_l3fwd.c
+++ b/example/l3fwd/odp_l3fwd.c
@@ -182,10 +182,9 @@  static int l3fwd_pkt_hash(odp_packet_t pkt, int sif)
 	odph_ethhdr_t *eth;
 	odph_udphdr_t  *udp;
 	odph_ipv4hdr_t *ip;
-	uint32_t len;
 	int dif;
 
-	ip = odp_packet_l3_ptr(pkt, &len);
+	ip = odp_packet_l3_ptr(pkt, NULL);
 	key.dst_ip = odp_be_to_cpu_32(ip->dst_addr);
 	key.src_ip = odp_be_to_cpu_32(ip->src_addr);
 	key.proto = ip->proto;
@@ -222,11 +221,10 @@  static int l3fwd_pkt_lpm(odp_packet_t pkt, int sif)
 {
 	odph_ipv4hdr_t *ip;
 	odph_ethhdr_t *eth;
-	uint32_t len;
 	int dif;
 	int ret;
 
-	ip = odp_packet_l3_ptr(pkt, &len);
+	ip = odp_packet_l3_ptr(pkt, NULL);
 	ipv4_dec_ttl_csum_update(ip);
 	eth = odp_packet_l2_ptr(pkt, NULL);