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

Commit a3320171 authored by qctecmdr's avatar qctecmdr Committed by Gerrit - the friendly Code Review server
Browse files

Merge "msm: ipa: eth: Enable support for IPA LAN Rx in NAPI poll"

parents 8d10a8bc c793c3bd
Loading
Loading
Loading
Loading
+11 −1
Original line number Diff line number Diff line
/* Copyright (c) 2019 The Linux Foundation. All rights reserved.
/* Copyright (c) 2019-2020 The Linux Foundation. All rights reserved.
 *
 * This program is free software; you can redistribute it and/or modify
 * it under the terms of the GNU General Public License version 2 and
@@ -442,11 +442,21 @@ int atl_ipa_moderate_event(struct ipa_eth_channel *ch, unsigned long event,
	return atl_fwd_set_ring_intr_mod(CH_RING(ch), min_usecs, max_usecs);
}

#if IPA_ETH_API_VER >= 7
static int atl_ipa_receive_skb(struct ipa_eth_device *eth_dev,
			       struct sk_buff *skb, bool in_napi)
{
	return in_napi ?
		atl_fwd_napi_receive_skb(eth_dev->net_dev, skb) :
		atl_fwd_receive_skb(eth_dev->net_dev, skb);
}
#else
static int atl_ipa_receive_skb(struct ipa_eth_device *eth_dev,
			       struct sk_buff *skb)
{
	return atl_fwd_receive_skb(eth_dev->net_dev, skb);
}
#endif

static int atl_ipa_transmit_skb(struct ipa_eth_device *eth_dev,
				struct sk_buff *skb)
+3 −2
Original line number Diff line number Diff line
/* Copyright (c) 2019 The Linux Foundation. All rights reserved.
/* Copyright (c) 2019-2020 The Linux Foundation. All rights reserved.
 *
 * This program is free software; you can redistribute it and/or modify
 * it under the terms of the GNU General Public License version 2 and
@@ -1168,7 +1168,8 @@ EXPORT_SYMBOL(ipa_eth_net_moderate_event);
int ipa_eth_net_receive_skb(struct ipa_eth_device *eth_dev,
	struct sk_buff *skb)
{
	return ipa_eth_nd_op(eth_dev, receive_skb, eth_dev, skb);
	return ipa_eth_nd_op(eth_dev,
		receive_skb, eth_dev, skb, ipa_get_lan_rx_napi());
}
EXPORT_SYMBOL(ipa_eth_net_receive_skb);

+5 −3
Original line number Diff line number Diff line
/* Copyright (c) 2019 The Linux Foundation. All rights reserved.
/* Copyright (c) 2019-2020 The Linux Foundation. All rights reserved.
 *
 * This program is free software; you can redistribute it and/or modify
 * it under the terms of the GNU General Public License version 2 and
@@ -44,9 +44,10 @@
 *           5    - Removed ipa_eth_{gsi,uc}_iommu_*{} APIs that were used for
 *                  mapping memory to GSI and IPA uC IOMMU CBs.
 *           6    - Added ipa_eth_ep_deinit()
 *           7    - ipa_eth_net_ops.receive_skb() now accepts in_napi parameter
 */

#define IPA_ETH_API_VER 6
#define IPA_ETH_API_VER 7

/**
 * enum ipa_eth_dev_features - Features supported by an ethernet device or
@@ -698,6 +699,7 @@ struct ipa_eth_net_ops {
	 *                  stack
	 * @eth_dev: Device to which the skb need to belong
	 * @skb: Skb to be provided to Linux network stack
	 * @in_napi: IPA LAN Rx is executing in NAPI poll
	 *
	 * When a network packet received by the IPA connected device queue can
	 * not be routed within IPA, it will be sent to Linux as an exception
@@ -713,7 +715,7 @@ struct ipa_eth_net_ops {
	 * expected to have been freed.
	 */
	int (*receive_skb)(struct ipa_eth_device *eth_dev,
		struct sk_buff *skb);
		struct sk_buff *skb, bool in_napi);

	/**
	 * .transmit_skb() - Transmit an skb given IPA