Commit 42220b77 authored by David S. Miller's avatar David S. Miller

Merge branch 'mvneta-some-small-improvements'

Jisheng Zhang says:

====================
net: mvneta: some small improvements

patch1 removes the NETIF_F_GRO check ourself, because the net subsystem
will handle it for us.

patch2 enables NETIF_F_RXCSUM by default, since the driver and HW
supports the feature.

patch3 is a small optimization, to reduce smp_processor_id() calling
in mvneta_tx_done_gbe.

since v1:
 - based on net-next tree
 - remove the fix patches, since they should be based on net branch.
 - Add Gregory's Reviewed-by tag
====================
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parents b9de3963 bd9f1ee3
......@@ -2065,10 +2065,7 @@ static int mvneta_rx_swbm(struct napi_struct *napi,
/* Linux processing */
rxq->skb->protocol = eth_type_trans(rxq->skb, dev);
if (dev->features & NETIF_F_GRO)
napi_gro_receive(napi, rxq->skb);
else
netif_receive_skb(rxq->skb);
/* clean uncomplete skb pointer in queue */
rxq->skb = NULL;
......@@ -2510,12 +2507,13 @@ static void mvneta_tx_done_gbe(struct mvneta_port *pp, u32 cause_tx_done)
{
struct mvneta_tx_queue *txq;
struct netdev_queue *nq;
int cpu = smp_processor_id();
while (cause_tx_done) {
txq = mvneta_tx_done_policy(pp, cause_tx_done);
nq = netdev_get_tx_queue(pp->dev, txq->id);
__netif_tx_lock(nq, smp_processor_id());
__netif_tx_lock(nq, cpu);
if (txq->count)
mvneta_txq_done(pp, txq);
......@@ -4598,7 +4596,8 @@ static int mvneta_probe(struct platform_device *pdev)
}
}
dev->features = NETIF_F_SG | NETIF_F_IP_CSUM | NETIF_F_IPV6_CSUM | NETIF_F_TSO;
dev->features = NETIF_F_SG | NETIF_F_IP_CSUM | NETIF_F_IPV6_CSUM |
NETIF_F_TSO | NETIF_F_RXCSUM;
dev->hw_features |= dev->features;
dev->vlan_features |= dev->features;
dev->priv_flags |= IFF_LIVE_ADDR_CHANGE;
......
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