net: stmmac: make SPH enable/disable to be configurable
authorOng Boon Leong <boon.leong.ong@intel.com>
Thu, 1 Apr 2021 02:11:13 +0000 (10:11 +0800)
committerDavid S. Miller <davem@davemloft.net>
Sat, 3 Apr 2021 21:13:38 +0000 (14:13 -0700)
commitd08d32d101938a26e692c7aee0d452fbeec9d3f3
tree7c5ffb9872434b9340dd51d9b19ef37732c6cd31
parent8deec94c6040bb4a767f6e9456a0a44c7f2e713e
net: stmmac: make SPH enable/disable to be configurable

SPH functionality splits header and payload according to split mode and
offsef fields (SPLM and SPLOFST). It is beneficials for Linux network
stack RX processing however it adds a lot of complexity in XDP
processing.

So, this patch makes the split-header (SPH) capability of the controller
is stored in "priv->sph_cap" and the enabling/disabling of SPH is decided
by "priv->sph".

This is to prepare initial XDP enabling for stmmac to disable the use of
SPH whenever XDP is enabled.

Signed-off-by: Ong Boon Leong <boon.leong.ong@intel.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/ethernet/stmicro/stmmac/stmmac.h
drivers/net/ethernet/stmicro/stmmac/stmmac_main.c