@@ -1772,7 +1772,7 @@ static int xgmac_probe(struct platform_device *pdev)
if (device_can_wakeup(priv->device))
priv->wolopts = WAKE_MAGIC; /* Magic Frame as default */
- ndev->hw_features = NETIF_F_SG | NETIF_F_FRAGLIST | NETIF_F_HIGHDMA;
+ ndev->hw_features = NETIF_F_SG | NETIF_F_HIGHDMA;
if (readl(priv->base + XGMAC_DMA_HW_FEATURE) & DMA_HW_FEAT_TXCOESEL)
ndev->hw_features |= NETIF_F_IP_CSUM | NETIF_F_IPV6_CSUM |
NETIF_F_RXCSUM;
@@ -3029,7 +3029,7 @@ static struct ehea_port *ehea_setup_single_port(struct ehea_adapter *adapter,
dev->hw_features = NETIF_F_SG | NETIF_F_TSO
| NETIF_F_IP_CSUM | NETIF_F_HW_VLAN_TX | NETIF_F_LRO;
- dev->features = NETIF_F_SG | NETIF_F_FRAGLIST | NETIF_F_TSO
+ dev->features = NETIF_F_SG | NETIF_F_TSO
| NETIF_F_HIGHDMA | NETIF_F_IP_CSUM | NETIF_F_HW_VLAN_TX
| NETIF_F_HW_VLAN_RX | NETIF_F_HW_VLAN_FILTER
| NETIF_F_RXCSUM;
@@ -1994,9 +1994,7 @@ bdx_probe(struct pci_dev *pdev, const struct pci_device_id *ent)
ndev->irq = pdev->irq;
ndev->features = NETIF_F_IP_CSUM | NETIF_F_SG | NETIF_F_TSO
| NETIF_F_HW_VLAN_TX | NETIF_F_HW_VLAN_RX |
- NETIF_F_HW_VLAN_FILTER | NETIF_F_RXCSUM
- /*| NETIF_F_FRAGLIST */
- ;
+ NETIF_F_HW_VLAN_FILTER | NETIF_F_RXCSUM;
ndev->hw_features = NETIF_F_IP_CSUM | NETIF_F_SG |
NETIF_F_TSO | NETIF_F_HW_VLAN_TX;
@@ -1020,7 +1020,7 @@ static int __devinit temac_of_probe(struct platform_device *op)
dev_set_drvdata(&op->dev, ndev);
SET_NETDEV_DEV(ndev, &op->dev);
ndev->flags &= ~IFF_MULTICAST; /* clear multicast */
- ndev->features = NETIF_F_SG | NETIF_F_FRAGLIST;
+ ndev->features = NETIF_F_SG;
ndev->netdev_ops = &temac_netdev_ops;
ndev->ethtool_ops = &temac_ethtool_ops;
#if 0
@@ -1494,7 +1494,7 @@ static int __devinit axienet_of_probe(struct platform_device *op)
SET_NETDEV_DEV(ndev, &op->dev);
ndev->flags &= ~IFF_MULTICAST; /* clear multicast */
- ndev->features = NETIF_F_SG | NETIF_F_FRAGLIST;
+ ndev->features = NETIF_F_SG;
ndev->netdev_ops = &axienet_netdev_ops;
ndev->ethtool_ops = &axienet_ethtool_ops;
@@ -1968,7 +1968,7 @@ int cxgbi_conn_init_pdu(struct iscsi_task *task, unsigned int offset,
}
skb_put(skb, count + padlen);
} else {
- /* data fit into frag_list */
+ /* data fit into frags */
for (i = 0; i < tdata->nr_frags; i++) {
__skb_fill_page_desc(skb, i,
tdata->frags[i].page,
There seem to be two ways how the data payload can be attached to a sk_buff. That is simple kmalloc() and via "paged" fragments. The former is simple. The latter attaches each fragment to sh_info->frags and accounts total number of fragments in sh_info->nr_frags. Once skb->data_len is non-zero then there should be page fragments available and sh_info->nr_frags should not be zero anymore. There is also a third way how data can be added to a skb, that is via the sh_info->frag_list. This is a complete sk_buff (including data) which is attached to the former skb. This one can also have linear memory (kmalloc()) or not (->frags). If the network driver which should transmit the skb does not support one of this cool things, then the network core makes a linear skb which contains only linear kmalloc() memory. If the driver supports the frags (nr_frags is non zero) then it denotes this by setting the NETIF_F_SG flag. If the driver is also able to walk via the ->frag_list then it sets NETIF_F_FRAGLIST flag. I remove the NETIF_F_FRAGLIST flag here from these drivers here because I did not find any evidence that they look the ->frag_list at all. It seems that they look only at sh_info->frags and handle only those pages. Other drivers which set this flag like ifb don't look at the ->frag_list either but they pass the skb back to the network stack. The virtio_net driver is using skb_to_sgvec() which gives it a sglist including everything and tun is using skb_copy_datagram_const_iovec() which is considering the ->frag_list as well. So I found evidence that some drivers are doing it right, but for those five I haven't found any. Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de> --- drivers/net/ethernet/calxeda/xgmac.c | 2 +- drivers/net/ethernet/ibm/ehea/ehea_main.c | 2 +- drivers/net/ethernet/tehuti/tehuti.c | 4 +--- drivers/net/ethernet/xilinx/ll_temac_main.c | 2 +- drivers/net/ethernet/xilinx/xilinx_axienet_main.c | 2 +- drivers/scsi/cxgbi/libcxgbi.c | 2 +- 6 files changed, 6 insertions(+), 8 deletions(-)