Skip to content

Commit

Permalink
igc: Check incompatible configs for Frame Preemption
Browse files Browse the repository at this point in the history
Frame Preemption and LaunchTime cannot be enabled on the same queue.
If that situation happens, emit an error to the user, and log the
error.

Signed-off-by: Vinicius Costa Gomes <vinicius.gomes@intel.com>
  • Loading branch information
vcgomes authored and intel-lab-lkp committed May 20, 2022
1 parent 06c3a84 commit a42e940
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions drivers/net/ethernet/intel/igc/igc_main.c
Expand Up @@ -5916,6 +5916,11 @@ static int igc_save_launchtime_params(struct igc_adapter *adapter, int queue,
if (queue < 0 || queue >= adapter->num_tx_queues)
return -EINVAL;

if (ring->preemptible) {
netdev_err(adapter->netdev, "Cannot enable LaunchTime on a preemptible queue\n");
return -EINVAL;
}

ring = adapter->tx_ring[queue];
ring->launchtime_enable = enable;

Expand Down

0 comments on commit a42e940

Please sign in to comment.