vnet: store hw interface speed in kbps instead of using flags
[vpp.git] / src / plugins / dpdk / device / device.c
index fcabe6e..ea00df2 100644 (file)
@@ -162,7 +162,7 @@ static_always_inline
       if (PREDICT_FALSE (xd->lockp != 0))
        {
          queue_id = queue_id % xd->tx_q_used;
-         while (__sync_lock_test_and_set (xd->lockp[queue_id], 1))
+         while (clib_atomic_test_and_set (xd->lockp[queue_id]))
            /* zzzz */
            queue_id = (queue_id + 1) % xd->tx_q_used;
        }
@@ -191,7 +191,7 @@ static_always_inline
        }
 
       if (PREDICT_FALSE (xd->lockp != 0))
-       *xd->lockp[queue_id] = 0;
+       clib_atomic_release (xd->lockp[queue_id]);
 
       if (PREDICT_FALSE (n_sent < 0))
        {
@@ -450,8 +450,6 @@ dpdk_interface_admin_up_down (vnet_main_t * vnm, u32 hw_if_index, u32 flags)
 
   if (is_up)
     {
-      vnet_hw_interface_set_flags (vnm, xd->hw_if_index,
-                                  VNET_HW_INTERFACE_FLAG_LINK_UP);
       if ((xd->flags & DPDK_DEVICE_FLAG_ADMIN_UP) == 0)
        dpdk_device_start (xd);
       xd->flags |= DPDK_DEVICE_FLAG_ADMIN_UP;