From: Denis Kirjanov <k...@linux-powerpc.org>
Date: Mon, 11 May 2020 13:22:20 +0300

> @@ -560,6 +572,64 @@ static u16 xennet_select_queue(struct net_device *dev, 
> struct sk_buff *skb,
>       return queue_idx;
>  }
>  
> +static int xennet_xdp_xmit_one(struct net_device *dev, struct xdp_frame 
> *xdpf)
> +{
> +     struct netfront_info *np = netdev_priv(dev);
> +     struct netfront_stats *tx_stats = this_cpu_ptr(np->tx_stats);
> +     struct netfront_queue *queue = NULL;
> +     unsigned int num_queues = dev->real_num_tx_queues;
> +     unsigned long flags;
> +     int notify;
> +     struct xen_netif_tx_request *tx;

Reverse christmas tree ordering for these local variables please.

> @@ -792,6 +909,9 @@ static int xennet_get_responses(struct netfront_queue 
> *queue,
>       int slots = 1;
>       int err = 0;
>       unsigned long ret;
> +     struct bpf_prog *xdp_prog;
> +     struct xdp_buff xdp;
> +     u32 verdict;

Likewise.

> @@ -997,7 +1132,9 @@ static int xennet_poll(struct napi_struct *napi, int 
> budget)
>       struct sk_buff_head rxq;
>       struct sk_buff_head errq;
>       struct sk_buff_head tmpq;
> +     struct bpf_prog *xdp_prog;
>       int err;
> +     bool need_xdp_flush = false;

Likewise.

> +static int xennet_xdp_set(struct net_device *dev, struct bpf_prog *prog,
> +                       struct netlink_ext_ack *extack)
> +{
> +     struct netfront_info *np = netdev_priv(dev);
> +     struct bpf_prog *old_prog;
> +     unsigned int i, err;
> +     unsigned long max_mtu = XEN_PAGE_SIZE - XDP_PACKET_HEADROOM;

Likewise.

> +static u32 xennet_xdp_query(struct net_device *dev)
> +{
> +     struct netfront_info *np = netdev_priv(dev);
> +     unsigned int num_queues = dev->real_num_tx_queues;
> +     unsigned int i;
> +     struct netfront_queue *queue;
> +     const struct bpf_prog *xdp_prog;

Likewise.

Reply via email to