Commit 1d86652b authored by Alex Elder's avatar Alex Elder Committed by David S. Miller

net: ipa: reduce aggregation time limit

Halve the time limit used when aggregation is enabled on an RX
endpoint, to half a millisecond.

Use DIV_ROUND_CLOSEST() to compute the value that represents the
time period, to get better accuracy in the event the time limit is
not an even multiple of the granularity.
Signed-off-by: default avatarAlex Elder <elder@linaro.org>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent 317a5740
......@@ -36,7 +36,7 @@
#define IPA_ENDPOINT_QMAP_METADATA_MASK 0x000000ff /* host byte order */
#define IPA_ENDPOINT_RESET_AGGR_RETRY_MAX 3
#define IPA_AGGR_TIME_LIMIT_DEFAULT 1000 /* microseconds */
#define IPA_AGGR_TIME_LIMIT_DEFAULT 500 /* microseconds */
/** enum ipa_status_opcode - status element opcode hardware values */
enum ipa_status_opcode {
......@@ -583,9 +583,11 @@ static void ipa_endpoint_init_aggr(struct ipa_endpoint *endpoint)
val |= u32_encode_bits(IPA_GENERIC, AGGR_TYPE_FMASK);
val |= u32_encode_bits(aggr_size,
AGGR_BYTE_LIMIT_FMASK);
limit = IPA_AGGR_TIME_LIMIT_DEFAULT;
val |= u32_encode_bits(limit / IPA_AGGR_GRANULARITY,
AGGR_TIME_LIMIT_FMASK);
limit = DIV_ROUND_CLOSEST(limit, IPA_AGGR_GRANULARITY);
val |= u32_encode_bits(limit, AGGR_TIME_LIMIT_FMASK);
val |= u32_encode_bits(0, AGGR_PKT_LIMIT_FMASK);
if (endpoint->data->rx.aggr_close_eof)
val |= AGGR_SW_EOF_ACTIVE_FMASK;
......
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