diff options
author | Daniele Di Proietto <diproiettod@vmware.com> | 2016-11-15 15:40:49 -0800 |
---|---|---|
committer | Daniele Di Proietto <diproiettod@vmware.com> | 2017-01-15 19:25:11 -0800 |
commit | 57eebbb4c3151cdf4c56419c1fea15cfdf0acba4 (patch) | |
tree | 0e1e200ee7c638bbda271763718dba388c096e55 /lib/netdev.h | |
parent | febf4a7a8748311e76e462d6843dd6ccb9b4c5de (diff) | |
download | openvswitch-57eebbb4c3151cdf4c56419c1fea15cfdf0acba4.tar.gz |
dpif-netdev: Don't try to output on a device without txqs.
Tunnel devices have 0 txqs and don't support netdev_send(). While
netdev_send() simply returns EOPNOTSUPP, the XPS logic is still executed
on output, and that might be confused by devices with no txqs.
It seems better to have different structures in the fast path for ports
that support netdev_{push,pop}_header (tunnel devices), and ports that
support netdev_send. With this we can also remove a branch in
netdev_send().
This is also necessary for a future commit, which starts DPDK devices
without txqs.
Signed-off-by: Daniele Di Proietto <diproiettod@vmware.com>
Acked-by: Ilya Maximets <i.maximets@samsung.com>
Diffstat (limited to 'lib/netdev.h')
-rw-r--r-- | lib/netdev.h | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/lib/netdev.h b/lib/netdev.h index a667fe35f..bef9cddb5 100644 --- a/lib/netdev.h +++ b/lib/netdev.h @@ -109,6 +109,7 @@ bool netdev_is_reserved_name(const char *name); int netdev_n_txq(const struct netdev *netdev); int netdev_n_rxq(const struct netdev *netdev); bool netdev_is_pmd(const struct netdev *netdev); +bool netdev_has_tunnel_push_pop(const struct netdev *netdev); /* Open and close. */ int netdev_open(const char *name, const char *type, struct netdev **netdevp); |