summaryrefslogtreecommitdiff
path: root/drivers/net/ipa/ipa_endpoint.h
diff options
context:
space:
mode:
authorAlex Elder <elder@linaro.org>2022-05-21 19:32:17 -0500
committerDavid S. Miller <davem@davemloft.net>2022-05-22 20:46:12 +0100
commitbeb90cba607ff060c325e6717d2d5e7ff58abf11 (patch)
treeb1d0253db3f7a62f1bf8a4f7174079f864903523 /drivers/net/ipa/ipa_endpoint.h
parent3cebb7c2ed2d76f6f8df67b030c34ffe27867766 (diff)
net: ipa: specify RX aggregation time limit in config data
Don't assume that a 500 microsecond time limit should be used for all receive endpoints that support aggregation. Instead, specify the time limit to use in the configuration data. Set a 500 microsecond limit for all existing RX endpoints, as before. Checking for overflow for the time limit field is a bit complicated. Rather than duplicate a lot of code in ipa_endpoint_data_valid_one(), call WARN() if any value is found to be too large when encoding it. Signed-off-by: Alex Elder <elder@linaro.org> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/net/ipa/ipa_endpoint.h')
-rw-r--r--drivers/net/ipa/ipa_endpoint.h6
1 files changed, 6 insertions, 0 deletions
diff --git a/drivers/net/ipa/ipa_endpoint.h b/drivers/net/ipa/ipa_endpoint.h
index 1e72a9695d3d..01790c60bee8 100644
--- a/drivers/net/ipa/ipa_endpoint.h
+++ b/drivers/net/ipa/ipa_endpoint.h
@@ -59,6 +59,7 @@ struct ipa_endpoint_tx {
* struct ipa_endpoint_rx - Endpoint configuration for RX endpoints
* @buffer_size: requested receive buffer size (bytes)
* @pad_align: power-of-2 boundary to which packet payload is aligned
+ * @aggr_time_limit: time before aggregation closes (microseconds)
* @aggr_hard_limit: whether aggregation closes before or after boundary
* @aggr_close_eof: whether aggregation closes on end-of-frame
* @holb_drop: whether to drop packets to avoid head-of-line blocking
@@ -74,6 +75,10 @@ struct ipa_endpoint_tx {
* Aggregation is "open" while a buffer is being filled, and "closes" when
* certain criteria are met.
*
+ * A time limit can be specified to close aggregation. Aggregation will be
+ * closed if this period passes after data is first written into a receive
+ * buffer. If not specified, no time limit is imposed.
+ *
* Insufficient space available in the receive buffer can close aggregation.
* The aggregation byte limit defines the point (in units of 1024 bytes) in
* the buffer where aggregation closes. With a "soft" aggregation limit,
@@ -84,6 +89,7 @@ struct ipa_endpoint_tx {
struct ipa_endpoint_rx {
u32 buffer_size;
u32 pad_align;
+ u32 aggr_time_limit;
bool aggr_hard_limit;
bool aggr_close_eof;
bool holb_drop;