On Mon, Jun 25, 2018 at 7:06 PM Amritha Nambiar
<amritha.namb...@intel.com> wrote:
>
> This patch adds support to pick Tx queue based on the Rx queue(s) map
> configuration set by the admin through the sysfs attribute
> for each Tx queue. If the user configuration for receive queue(s) map
> does not apply, then the Tx queue selection falls back to CPU(s) map
> based selection and finally to hashing.
>
> Signed-off-by: Amritha Nambiar <amritha.namb...@intel.com>
> ---

> +static int get_xps_queue(struct net_device *dev, struct sk_buff *skb)
>  {
>  #ifdef CONFIG_XPS
>         struct xps_dev_maps *dev_maps;
> -       struct xps_map *map;
> +       struct sock *sk = skb->sk;
>         int queue_index = -1;
>
>         if (!static_key_false(&xps_needed))
>                 return -1;
>
>         rcu_read_lock();
> -       dev_maps = rcu_dereference(dev->xps_cpus_map);
> +       if (!static_key_false(&xps_rxqs_needed))
> +               goto get_cpus_map;
> +
> +       dev_maps = rcu_dereference(dev->xps_rxqs_map);
>         if (dev_maps) {
> -               unsigned int tci = skb->sender_cpu - 1;
> +               int tci = sk_rx_queue_get(sk);

What if the rx device differs from the tx device?

Reply via email to