diff options
author | Matias Elo <matias.elo@nokia.com> | 2016-10-03 14:49:15 +0300 |
---|---|---|
committer | Maxim Uvarov <maxim.uvarov@linaro.org> | 2016-10-24 16:53:39 +0300 |
commit | 3c78ee3f2c9274ebfd6b51e1ec203218b792fc9b (patch) | |
tree | cb1f218435d561e902a598608e3cc31512216f22 /example | |
parent | a45b9dad99ea5e50cdafada1bfbb2bef68467263 (diff) |
example: l3fwd: remove unnecessary output arguments
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>
Reviewed-by: Mike Holmes <mike.holmes@linaro.org>
Signed-off-by: Maxim Uvarov <maxim.uvarov@linaro.org>
Diffstat (limited to 'example')
-rw-r--r-- | example/l3fwd/odp_l3fwd.c | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/example/l3fwd/odp_l3fwd.c b/example/l3fwd/odp_l3fwd.c index df412af95..0f8068fee 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); |