diff options
author | Bhanuprakash Bodireddy <bhanuprakash.bodireddy@intel.com> | 2017-09-22 02:16:05 -0700 |
---|---|---|
committer | Darrell Ball <dlu998@gmail.com> | 2017-09-22 02:16:05 -0700 |
commit | 37eabc706e3454613c20362c77e677e3aed77c19 (patch) | |
tree | 6444f329a6420be799b2b5d2835ae768211c5a57 /lib | |
parent | fd57eebacb27c9d57a61f6f2575dbc65d1bf57da (diff) | |
download | openvswitch-37eabc706e3454613c20362c77e677e3aed77c19.tar.gz |
dpif-netdev: Remove 'cnt' in dp_netdev_input__().
There is little use of 'cnt' variable in dp_netdev_input__(). Get rid of
it and use dp_packet_batch_size() to initialize PKT_ARRAY_SIZE.
Signed-off-by: Bhanuprakash Bodireddy <bhanuprakash.bodireddy@intel.com>
Signed-off-by: Darrell Ball <dlu998@gmail.com>
Diffstat (limited to 'lib')
-rw-r--r-- | lib/dpif-netdev.c | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/lib/dpif-netdev.c b/lib/dpif-netdev.c index afed7bd84..677000e74 100644 --- a/lib/dpif-netdev.c +++ b/lib/dpif-netdev.c @@ -5124,9 +5124,8 @@ dp_netdev_input__(struct dp_netdev_pmd_thread *pmd, struct dp_packet_batch *packets, bool md_is_valid, odp_port_t port_no) { - int cnt = packets->count; #if !defined(__CHECKER__) && !defined(_WIN32) - const size_t PKT_ARRAY_SIZE = cnt; + const size_t PKT_ARRAY_SIZE = dp_packet_batch_size(packets); #else /* Sparse or MSVC doesn't like variable length array. */ enum { PKT_ARRAY_SIZE = NETDEV_MAX_BURST }; |