@@ -1192,13 +1192,11 @@ netdev_linux_send(struct netdev *netdev_, int qid OVS_UNUSED,
struct dp_packet_batch *batch, bool may_steal,
bool concurrent_txq OVS_UNUSED)
{
- int i;
int error = 0;
- int ifindex;
int sock = 0;
+
struct sockaddr_ll sll;
struct msghdr msg;
-
if (!is_tap_netdev(netdev_)) {
sock = af_packet_sock();
if (sock < 0) {
@@ -1206,7 +1204,7 @@ netdev_linux_send(struct netdev *netdev_, int qid OVS_UNUSED,
goto free_batch;
}
- ifindex = netdev_get_ifindex(netdev_);
+ int ifindex = netdev_get_ifindex(netdev_);
if (ifindex < 0) {
error = -ifindex;
goto free_batch;
@@ -1227,7 +1225,7 @@ netdev_linux_send(struct netdev *netdev_, int qid OVS_UNUSED,
}
/* 'i' is incremented only if there's no error */
- for (i = 0; i < batch->count;) {
+ for (int i = 0; i < batch->count; ) {
const void *data = dp_packet_data(batch->packets[i]);
size_t size = dp_packet_size(batch->packets[i]);
ssize_t retval;