Commit 317595d2 authored by Alex Elder's avatar Alex Elder Committed by David S. Miller

net: ipa: rename endpoint->trans_tre_max

The trans_tre_max field of the IPA endpoint structure is only used
to limit the number of fragments allowed for an SKB being prepared
for transmission.  Recognizing that, rename the field skb_frag_max,
and reduce its value by 1.
Signed-off-by: default avatarAlex Elder <elder@linaro.org>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent 88e03057
...@@ -1020,7 +1020,7 @@ int ipa_endpoint_skb_tx(struct ipa_endpoint *endpoint, struct sk_buff *skb) ...@@ -1020,7 +1020,7 @@ int ipa_endpoint_skb_tx(struct ipa_endpoint *endpoint, struct sk_buff *skb)
* If not, see if we can linearize it before giving up. * If not, see if we can linearize it before giving up.
*/ */
nr_frags = skb_shinfo(skb)->nr_frags; nr_frags = skb_shinfo(skb)->nr_frags;
if (1 + nr_frags > endpoint->trans_tre_max) { if (nr_frags > endpoint->skb_frag_max) {
if (skb_linearize(skb)) if (skb_linearize(skb))
return -E2BIG; return -E2BIG;
nr_frags = 0; nr_frags = 0;
...@@ -1721,7 +1721,7 @@ static void ipa_endpoint_setup_one(struct ipa_endpoint *endpoint) ...@@ -1721,7 +1721,7 @@ static void ipa_endpoint_setup_one(struct ipa_endpoint *endpoint)
if (endpoint->ee_id != GSI_EE_AP) if (endpoint->ee_id != GSI_EE_AP)
return; return;
endpoint->trans_tre_max = gsi->channel[channel_id].trans_tre_max; endpoint->skb_frag_max = gsi->channel[channel_id].trans_tre_max - 1;
if (!endpoint->toward_ipa) { if (!endpoint->toward_ipa) {
/* RX transactions require a single TRE, so the maximum /* RX transactions require a single TRE, so the maximum
* backlog is the same as the maximum outstanding TREs. * backlog is the same as the maximum outstanding TREs.
......
...@@ -142,7 +142,7 @@ enum ipa_replenish_flag { ...@@ -142,7 +142,7 @@ enum ipa_replenish_flag {
* @endpoint_id: IPA endpoint number * @endpoint_id: IPA endpoint number
* @toward_ipa: Endpoint direction (true = TX, false = RX) * @toward_ipa: Endpoint direction (true = TX, false = RX)
* @config: Default endpoint configuration * @config: Default endpoint configuration
* @trans_tre_max: Maximum number of TRE descriptors per transaction * @skb_frag_max: Maximum allowed number of TX SKB fragments
* @evt_ring_id: GSI event ring used by the endpoint * @evt_ring_id: GSI event ring used by the endpoint
* @netdev: Network device pointer, if endpoint uses one * @netdev: Network device pointer, if endpoint uses one
* @replenish_flags: Replenishing state flags * @replenish_flags: Replenishing state flags
...@@ -157,7 +157,7 @@ struct ipa_endpoint { ...@@ -157,7 +157,7 @@ struct ipa_endpoint {
bool toward_ipa; bool toward_ipa;
struct ipa_endpoint_config config; struct ipa_endpoint_config config;
u32 trans_tre_max; u32 skb_frag_max; /* Used for netdev TX only */
u32 evt_ring_id; u32 evt_ring_id;
/* Net device this endpoint is associated with, if any */ /* Net device this endpoint is associated with, if any */
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment