Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 69235aa8 authored by Subash Abhinov Kasiviswanathan's avatar Subash Abhinov Kasiviswanathan
Browse files

net: Remove the get current NAPI context API



rmnet_data no longer uses the API get_current_napi_context()
since it now relies on the device NAPI struct for GRO.
There are no other users of this API.

Change-Id: Ibc41c0a5cc3b83b02e834c413fa61273321e93ca
Signed-off-by: default avatarSubash Abhinov Kasiviswanathan <subashab@codeaurora.org>
parent 6702e01b
Loading
Loading
Loading
Loading
+0 −2
Original line number Diff line number Diff line
@@ -2329,7 +2329,6 @@ struct softnet_data {
	struct Qdisc		*output_queue;
	struct Qdisc		**output_queue_tailp;
	struct list_head	poll_list;
	struct napi_struct	*current_napi;
	struct sk_buff		*completion_queue;
	struct sk_buff_head	process_queue;

@@ -2847,7 +2846,6 @@ struct sk_buff *napi_get_frags(struct napi_struct *napi);
gro_result_t napi_gro_frags(struct napi_struct *napi);
struct packet_offload *gro_find_receive_by_type(__be16 type);
struct packet_offload *gro_find_complete_by_type(__be16 type);
extern struct napi_struct *get_current_napi_context(void);

static inline void napi_free_frags(struct napi_struct *napi)
{
+3 −16
Original line number Diff line number Diff line
@@ -4351,7 +4351,8 @@ static int process_backlog(struct napi_struct *napi, int quota)
			local_irq_disable();
			input_queue_head_incr(sd);
			if (++work >= quota) {
				goto state_changed;
				local_irq_enable();
				return work;
			}
		}

@@ -4369,17 +4370,14 @@ static int process_backlog(struct napi_struct *napi, int quota)
			napi->state = 0;
			rps_unlock(sd);

			goto state_changed;
			break;
		}

		skb_queue_splice_tail_init(&sd->input_pkt_queue,
					   &sd->process_queue);
		rps_unlock(sd);
	}
state_changed:
	local_irq_enable();
	napi_gro_flush(napi, false);
	sd->current_napi = NULL;

	return work;
}
@@ -4402,14 +4400,11 @@ EXPORT_SYMBOL(__napi_schedule);

void __napi_complete(struct napi_struct *n)
{
	struct softnet_data *sd = &__get_cpu_var(softnet_data);

	BUG_ON(!test_bit(NAPI_STATE_SCHED, &n->state));
	BUG_ON(n->gro_list);

	list_del(&n->poll_list);
	smp_mb__before_atomic();
	sd->current_napi = NULL;
	clear_bit(NAPI_STATE_SCHED, &n->state);
}
EXPORT_SYMBOL(__napi_complete);
@@ -4517,13 +4512,6 @@ void netif_napi_del(struct napi_struct *napi)
}
EXPORT_SYMBOL(netif_napi_del);

struct napi_struct *get_current_napi_context(void)
{
	struct softnet_data *sd = &__get_cpu_var(softnet_data);
	return sd->current_napi;
}
EXPORT_SYMBOL(get_current_napi_context);

static void net_rx_action(struct softirq_action *h)
{
	struct softnet_data *sd = this_cpu_ptr(&softnet_data);
@@ -4565,7 +4553,6 @@ static void net_rx_action(struct softirq_action *h)
		 */
		work = 0;
		if (test_bit(NAPI_STATE_SCHED, &n->state)) {
			sd->current_napi = n;
			work = n->poll(n, weight);
			trace_napi_poll(n);
		}