OSDN Git Service

net: mhi: Allow decoupled MTU/MRU
authorLoic Poulain <loic.poulain@linaro.org>
Mon, 29 Mar 2021 15:39:32 +0000 (17:39 +0200)
committerDavid S. Miller <davem@davemloft.net>
Mon, 29 Mar 2021 23:26:16 +0000 (16:26 -0700)
commit3af562a37b7f1a5dbeb50a00ace280ba2d984762
tree95c1cb2d71fb9464784ede84061a3bff12e0594a
parentd9f0713c9217fdd31077f890c2e15232ad2f0772
net: mhi: Allow decoupled MTU/MRU

MBIM protocol makes the mhi network interface asymmetric, ingress data
received from MHI is MBIM protocol, possibly containing multiple
aggregated IP packets, while egress data received from network stack is
IP protocol.

This changes allows a 'protocol' to specify its own MRU, that when
specified is used to allocate MHI RX buffers (skb).

For MBIM, Set the default MTU to 1500, which is the usual network MTU
for WWAN IP packets, and MRU to 3.5K (for allocation efficiency),
allowing skb to fit in an usual 4K page (including padding,
skb_shared_info, ...).

Signed-off-by: Loic Poulain <loic.poulain@linaro.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/mhi/mhi.h
drivers/net/mhi/net.c
drivers/net/mhi/proto_mbim.c