net: ipa: make endpoint HOLB drop configurable
authorAlex Elder <elder@linaro.org>
Sun, 22 May 2022 00:32:15 +0000 (19:32 -0500)
committerDavid S. Miller <davem@davemloft.net>
Sun, 22 May 2022 19:46:12 +0000 (20:46 +0100)
Add a new Boolean flag for RX endpoints defining whether HOLB drop
is initially enabled or disabled for the endpoint.  All existing AP
endpoints should have HOLB drop disabled.

Signed-off-by: Alex Elder <elder@linaro.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/ipa/ipa_endpoint.c
drivers/net/ipa/ipa_endpoint.h

index 0f489723689c5782383a732209e85572907d89c2..3ad97fbf6884ebeed46aa6993fe8c99a21b039a0 100644 (file)
@@ -1554,8 +1554,12 @@ static void ipa_endpoint_program(struct ipa_endpoint *endpoint)
        ipa_endpoint_init_hdr_metadata_mask(endpoint);
        ipa_endpoint_init_mode(endpoint);
        ipa_endpoint_init_aggr(endpoint);
-       if (!endpoint->toward_ipa)
-               ipa_endpoint_init_hol_block_disable(endpoint);
+       if (!endpoint->toward_ipa) {
+               if (endpoint->config.rx.holb_drop)
+                       ipa_endpoint_init_hol_block_enable(endpoint, 0);
+               else
+                       ipa_endpoint_init_hol_block_disable(endpoint);
+       }
        ipa_endpoint_init_deaggr(endpoint);
        ipa_endpoint_init_rsrc_grp(endpoint);
        ipa_endpoint_init_seq(endpoint);
index 39a12c249f66d4cf9258402f776810d3fc8b4106..3ab62fb892ec6182c4305a06e1b51d1cede9adfd 100644 (file)
@@ -60,6 +60,7 @@ struct ipa_endpoint_tx {
  * @buffer_size:       requested receive buffer size (bytes)
  * @pad_align:         power-of-2 boundary to which packet payload is aligned
  * @aggr_close_eof:    whether aggregation closes on end-of-frame
+ * @holb_drop:         whether to drop packets to avoid head-of-line blocking
  *
  * With each packet it transfers, the IPA hardware can perform certain
  * transformations of its packet data.  One of these is adding pad bytes
@@ -74,6 +75,7 @@ struct ipa_endpoint_rx {
        u32 buffer_size;
        u32 pad_align;
        bool aggr_close_eof;
+       bool holb_drop;
 };
 
 /**