Skip to content

Commit 43d86ee

Browse files
committed
Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net
Pull networking fixes from David Miller: "Several fixes here. Basically split down the line between newly introduced regressions and long existing problems: 1) Double free in tipc_enable_bearer(), from Cong Wang. 2) Many fixes to nf_conncount, from Florian Westphal. 3) op->get_regs_len() can throw an error, check it, from Yunsheng Lin. 4) Need to use GFP_ATOMIC in *_add_hash_mac_address() of fsl/fman driver, from Scott Wood. 5) Inifnite loop in fib_empty_table(), from Yue Haibing. 6) Use after free in ax25_fillin_cb(), from Cong Wang. 7) Fix socket locking in nr_find_socket(), also from Cong Wang. 8) Fix WoL wakeup enable in r8169, from Heiner Kallweit. 9) On 32-bit sock->sk_stamp is not thread-safe, from Deepa Dinamani. 10) Fix ptr_ring wrap during queue swap, from Cong Wang. 11) Missing shutdown callback in hinic driver, from Xue Chaojing. 12) Need to return NULL on error from ip6_neigh_lookup(), from Stefano Brivio. 13) BPF out of bounds speculation fixes from Daniel Borkmann" * git://git.kernel.org/pub/scm/linux/kernel/git/davem/net: (57 commits) ipv6: Consider sk_bound_dev_if when binding a socket to an address ipv6: Fix dump of specific table with strict checking bpf: add various test cases to selftests bpf: prevent out of bounds speculation on pointer arithmetic bpf: fix check_map_access smin_value test when pointer contains offset bpf: restrict unknown scalars of mixed signed bounds for unprivileged bpf: restrict stack pointer arithmetic for unprivileged bpf: restrict map value pointer arithmetic for unprivileged bpf: enable access to ax register also from verifier rewrite bpf: move tmp variable into ax register in interpreter bpf: move {prev_,}insn_idx into verifier env isdn: fix kernel-infoleak in capi_unlocked_ioctl ipv6: route: Fix return value of ip6_neigh_lookup() on neigh_create() error net/hamradio/6pack: use mod_timer() to rearm timers net-next/hinic:add shutdown callback net: hns3: call hns3_nic_net_open() while doing HNAE3_UP_CLIENT ip: validate header length on virtual device xmit tap: call skb_probe_transport_header after setting skb->dev ptr_ring: wrap back ->producer in __ptr_ring_swap_queue() net: rds: remove unnecessary NULL check ...
2 parents 645ff1e + c5ee066 commit 43d86ee

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

60 files changed

+2079
-404
lines changed

Documentation/networking/snmp_counter.rst

Lines changed: 239 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -571,7 +571,97 @@ duplicate packet is received.
571571

572572
* TcpExtTCPDSACKOfoRecv
573573
The TCP stack receives a DSACK, which indicate an out of order
574-
duplciate packet is received.
574+
duplicate packet is received.
575+
576+
TCP out of order
577+
===============
578+
* TcpExtTCPOFOQueue
579+
The TCP layer receives an out of order packet and has enough memory
580+
to queue it.
581+
582+
* TcpExtTCPOFODrop
583+
The TCP layer receives an out of order packet but doesn't have enough
584+
memory, so drops it. Such packets won't be counted into
585+
TcpExtTCPOFOQueue.
586+
587+
* TcpExtTCPOFOMerge
588+
The received out of order packet has an overlay with the previous
589+
packet. the overlay part will be dropped. All of TcpExtTCPOFOMerge
590+
packets will also be counted into TcpExtTCPOFOQueue.
591+
592+
TCP PAWS
593+
=======
594+
PAWS (Protection Against Wrapped Sequence numbers) is an algorithm
595+
which is used to drop old packets. It depends on the TCP
596+
timestamps. For detail information, please refer the `timestamp wiki`_
597+
and the `RFC of PAWS`_.
598+
599+
.. _RFC of PAWS: https://tools.ietf.org/html/rfc1323#page-17
600+
.. _timestamp wiki: https://en.wikipedia.org/wiki/Transmission_Control_Protocol#TCP_timestamps
601+
602+
* TcpExtPAWSActive
603+
Packets are dropped by PAWS in Syn-Sent status.
604+
605+
* TcpExtPAWSEstab
606+
Packets are dropped by PAWS in any status other than Syn-Sent.
607+
608+
TCP ACK skip
609+
===========
610+
In some scenarios, kernel would avoid sending duplicate ACKs too
611+
frequently. Please find more details in the tcp_invalid_ratelimit
612+
section of the `sysctl document`_. When kernel decides to skip an ACK
613+
due to tcp_invalid_ratelimit, kernel would update one of below
614+
counters to indicate the ACK is skipped in which scenario. The ACK
615+
would only be skipped if the received packet is either a SYN packet or
616+
it has no data.
617+
618+
.. _sysctl document: https://www.kernel.org/doc/Documentation/networking/ip-sysctl.txt
619+
620+
* TcpExtTCPACKSkippedSynRecv
621+
The ACK is skipped in Syn-Recv status. The Syn-Recv status means the
622+
TCP stack receives a SYN and replies SYN+ACK. Now the TCP stack is
623+
waiting for an ACK. Generally, the TCP stack doesn't need to send ACK
624+
in the Syn-Recv status. But in several scenarios, the TCP stack need
625+
to send an ACK. E.g., the TCP stack receives the same SYN packet
626+
repeately, the received packet does not pass the PAWS check, or the
627+
received packet sequence number is out of window. In these scenarios,
628+
the TCP stack needs to send ACK. If the ACk sending frequency is higher than
629+
tcp_invalid_ratelimit allows, the TCP stack will skip sending ACK and
630+
increase TcpExtTCPACKSkippedSynRecv.
631+
632+
633+
* TcpExtTCPACKSkippedPAWS
634+
The ACK is skipped due to PAWS (Protect Against Wrapped Sequence
635+
numbers) check fails. If the PAWS check fails in Syn-Recv, Fin-Wait-2
636+
or Time-Wait statuses, the skipped ACK would be counted to
637+
TcpExtTCPACKSkippedSynRecv, TcpExtTCPACKSkippedFinWait2 or
638+
TcpExtTCPACKSkippedTimeWait. In all other statuses, the skipped ACK
639+
would be counted to TcpExtTCPACKSkippedPAWS.
640+
641+
* TcpExtTCPACKSkippedSeq
642+
The sequence number is out of window and the timestamp passes the PAWS
643+
check and the TCP status is not Syn-Recv, Fin-Wait-2, and Time-Wait.
644+
645+
* TcpExtTCPACKSkippedFinWait2
646+
The ACK is skipped in Fin-Wait-2 status, the reason would be either
647+
PAWS check fails or the received sequence number is out of window.
648+
649+
* TcpExtTCPACKSkippedTimeWait
650+
Tha ACK is skipped in Time-Wait status, the reason would be either
651+
PAWS check failed or the received sequence number is out of window.
652+
653+
* TcpExtTCPACKSkippedChallenge
654+
The ACK is skipped if the ACK is a challenge ACK. The RFC 5961 defines
655+
3 kind of challenge ACK, please refer `RFC 5961 section 3.2`_,
656+
`RFC 5961 section 4.2`_ and `RFC 5961 section 5.2`_. Besides these
657+
three scenarios, In some TCP status, the linux TCP stack would also
658+
send challenge ACKs if the ACK number is before the first
659+
unacknowledged number (more strict than `RFC 5961 section 5.2`_).
660+
661+
.. _RFC 5961 section 3.2: https://tools.ietf.org/html/rfc5961#page-7
662+
.. _RFC 5961 section 4.2: https://tools.ietf.org/html/rfc5961#page-9
663+
.. _RFC 5961 section 5.2: https://tools.ietf.org/html/rfc5961#page-11
664+
575665

576666
examples
577667
=======
@@ -1188,3 +1278,151 @@ Run nstat on server B::
11881278
We have deleted the default route on server B. Server B couldn't find
11891279
a route for the 8.8.8.8 IP address, so server B increased
11901280
IpOutNoRoutes.
1281+
1282+
TcpExtTCPACKSkippedSynRecv
1283+
------------------------
1284+
In this test, we send 3 same SYN packets from client to server. The
1285+
first SYN will let server create a socket, set it to Syn-Recv status,
1286+
and reply a SYN/ACK. The second SYN will let server reply the SYN/ACK
1287+
again, and record the reply time (the duplicate ACK reply time). The
1288+
third SYN will let server check the previous duplicate ACK reply time,
1289+
and decide to skip the duplicate ACK, then increase the
1290+
TcpExtTCPACKSkippedSynRecv counter.
1291+
1292+
Run tcpdump to capture a SYN packet::
1293+
1294+
nstatuser@nstat-a:~$ sudo tcpdump -c 1 -w /tmp/syn.pcap port 9000
1295+
tcpdump: listening on ens3, link-type EN10MB (Ethernet), capture size 262144 bytes
1296+
1297+
Open another terminal, run nc command::
1298+
1299+
nstatuser@nstat-a:~$ nc nstat-b 9000
1300+
1301+
As the nstat-b didn't listen on port 9000, it should reply a RST, and
1302+
the nc command exited immediately. It was enough for the tcpdump
1303+
command to capture a SYN packet. A linux server might use hardware
1304+
offload for the TCP checksum, so the checksum in the /tmp/syn.pcap
1305+
might be not correct. We call tcprewrite to fix it::
1306+
1307+
nstatuser@nstat-a:~$ tcprewrite --infile=/tmp/syn.pcap --outfile=/tmp/syn_fixcsum.pcap --fixcsum
1308+
1309+
On nstat-b, we run nc to listen on port 9000::
1310+
1311+
nstatuser@nstat-b:~$ nc -lkv 9000
1312+
Listening on [0.0.0.0] (family 0, port 9000)
1313+
1314+
On nstat-a, we blocked the packet from port 9000, or nstat-a would send
1315+
RST to nstat-b::
1316+
1317+
nstatuser@nstat-a:~$ sudo iptables -A INPUT -p tcp --sport 9000 -j DROP
1318+
1319+
Send 3 SYN repeatly to nstat-b::
1320+
1321+
nstatuser@nstat-a:~$ for i in {1..3}; do sudo tcpreplay -i ens3 /tmp/syn_fixcsum.pcap; done
1322+
1323+
Check snmp cunter on nstat-b::
1324+
1325+
nstatuser@nstat-b:~$ nstat | grep -i skip
1326+
TcpExtTCPACKSkippedSynRecv 1 0.0
1327+
1328+
As we expected, TcpExtTCPACKSkippedSynRecv is 1.
1329+
1330+
TcpExtTCPACKSkippedPAWS
1331+
----------------------
1332+
To trigger PAWS, we could send an old SYN.
1333+
1334+
On nstat-b, let nc listen on port 9000::
1335+
1336+
nstatuser@nstat-b:~$ nc -lkv 9000
1337+
Listening on [0.0.0.0] (family 0, port 9000)
1338+
1339+
On nstat-a, run tcpdump to capture a SYN::
1340+
1341+
nstatuser@nstat-a:~$ sudo tcpdump -w /tmp/paws_pre.pcap -c 1 port 9000
1342+
tcpdump: listening on ens3, link-type EN10MB (Ethernet), capture size 262144 bytes
1343+
1344+
On nstat-a, run nc as a client to connect nstat-b::
1345+
1346+
nstatuser@nstat-a:~$ nc -v nstat-b 9000
1347+
Connection to nstat-b 9000 port [tcp/*] succeeded!
1348+
1349+
Now the tcpdump has captured the SYN and exit. We should fix the
1350+
checksum::
1351+
1352+
nstatuser@nstat-a:~$ tcprewrite --infile /tmp/paws_pre.pcap --outfile /tmp/paws.pcap --fixcsum
1353+
1354+
Send the SYN packet twice::
1355+
1356+
nstatuser@nstat-a:~$ for i in {1..2}; do sudo tcpreplay -i ens3 /tmp/paws.pcap; done
1357+
1358+
On nstat-b, check the snmp counter::
1359+
1360+
nstatuser@nstat-b:~$ nstat | grep -i skip
1361+
TcpExtTCPACKSkippedPAWS 1 0.0
1362+
1363+
We sent two SYN via tcpreplay, both of them would let PAWS check
1364+
failed, the nstat-b replied an ACK for the first SYN, skipped the ACK
1365+
for the second SYN, and updated TcpExtTCPACKSkippedPAWS.
1366+
1367+
TcpExtTCPACKSkippedSeq
1368+
--------------------
1369+
To trigger TcpExtTCPACKSkippedSeq, we send packets which have valid
1370+
timestamp (to pass PAWS check) but the sequence number is out of
1371+
window. The linux TCP stack would avoid to skip if the packet has
1372+
data, so we need a pure ACK packet. To generate such a packet, we
1373+
could create two sockets: one on port 9000, another on port 9001. Then
1374+
we capture an ACK on port 9001, change the source/destination port
1375+
numbers to match the port 9000 socket. Then we could trigger
1376+
TcpExtTCPACKSkippedSeq via this packet.
1377+
1378+
On nstat-b, open two terminals, run two nc commands to listen on both
1379+
port 9000 and port 9001::
1380+
1381+
nstatuser@nstat-b:~$ nc -lkv 9000
1382+
Listening on [0.0.0.0] (family 0, port 9000)
1383+
1384+
nstatuser@nstat-b:~$ nc -lkv 9001
1385+
Listening on [0.0.0.0] (family 0, port 9001)
1386+
1387+
On nstat-a, run two nc clients::
1388+
1389+
nstatuser@nstat-a:~$ nc -v nstat-b 9000
1390+
Connection to nstat-b 9000 port [tcp/*] succeeded!
1391+
1392+
nstatuser@nstat-a:~$ nc -v nstat-b 9001
1393+
Connection to nstat-b 9001 port [tcp/*] succeeded!
1394+
1395+
On nstat-a, run tcpdump to capture an ACK::
1396+
1397+
nstatuser@nstat-a:~$ sudo tcpdump -w /tmp/seq_pre.pcap -c 1 dst port 9001
1398+
tcpdump: listening on ens3, link-type EN10MB (Ethernet), capture size 262144 bytes
1399+
1400+
On nstat-b, send a packet via the port 9001 socket. E.g. we sent a
1401+
string 'foo' in our example::
1402+
1403+
nstatuser@nstat-b:~$ nc -lkv 9001
1404+
Listening on [0.0.0.0] (family 0, port 9001)
1405+
Connection from nstat-a 42132 received!
1406+
foo
1407+
1408+
On nstat-a, the tcpdump should have caputred the ACK. We should check
1409+
the source port numbers of the two nc clients::
1410+
1411+
nstatuser@nstat-a:~$ ss -ta '( dport = :9000 || dport = :9001 )' | tee
1412+
State Recv-Q Send-Q Local Address:Port Peer Address:Port
1413+
ESTAB 0 0 192.168.122.250:50208 192.168.122.251:9000
1414+
ESTAB 0 0 192.168.122.250:42132 192.168.122.251:9001
1415+
1416+
Run tcprewrite, change port 9001 to port 9000, chagne port 42132 to
1417+
port 50208::
1418+
1419+
nstatuser@nstat-a:~$ tcprewrite --infile /tmp/seq_pre.pcap --outfile /tmp/seq.pcap -r 9001:9000 -r 42132:50208 --fixcsum
1420+
1421+
Now the /tmp/seq.pcap is the packet we need. Send it to nstat-b::
1422+
1423+
nstatuser@nstat-a:~$ for i in {1..2}; do sudo tcpreplay -i ens3 /tmp/seq.pcap; done
1424+
1425+
Check TcpExtTCPACKSkippedSeq on nstat-b::
1426+
1427+
nstatuser@nstat-b:~$ nstat | grep -i skip
1428+
TcpExtTCPACKSkippedSeq 1 0.0

drivers/isdn/capi/kcapi.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -852,15 +852,15 @@ u16 capi20_get_manufacturer(u32 contr, u8 *buf)
852852
u16 ret;
853853

854854
if (contr == 0) {
855-
strlcpy(buf, capi_manufakturer, CAPI_MANUFACTURER_LEN);
855+
strncpy(buf, capi_manufakturer, CAPI_MANUFACTURER_LEN);
856856
return CAPI_NOERROR;
857857
}
858858

859859
mutex_lock(&capi_controller_lock);
860860

861861
ctr = get_capi_ctr_by_nr(contr);
862862
if (ctr && ctr->state == CAPI_CTR_RUNNING) {
863-
strlcpy(buf, ctr->manu, CAPI_MANUFACTURER_LEN);
863+
strncpy(buf, ctr->manu, CAPI_MANUFACTURER_LEN);
864864
ret = CAPI_NOERROR;
865865
} else
866866
ret = CAPI_REGNOTINSTALLED;

drivers/isdn/hisax/hfc_pci.c

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1169,11 +1169,13 @@ HFCPCI_l1hw(struct PStack *st, int pr, void *arg)
11691169
if (cs->debug & L1_DEB_LAPD)
11701170
debugl1(cs, "-> PH_REQUEST_PULL");
11711171
#endif
1172+
spin_lock_irqsave(&cs->lock, flags);
11721173
if (!cs->tx_skb) {
11731174
test_and_clear_bit(FLG_L1_PULL_REQ, &st->l1.Flags);
11741175
st->l1.l1l2(st, PH_PULL | CONFIRM, NULL);
11751176
} else
11761177
test_and_set_bit(FLG_L1_PULL_REQ, &st->l1.Flags);
1178+
spin_unlock_irqrestore(&cs->lock, flags);
11771179
break;
11781180
case (HW_RESET | REQUEST):
11791181
spin_lock_irqsave(&cs->lock, flags);

drivers/net/dsa/bcm_sf2.c

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -303,11 +303,10 @@ static int bcm_sf2_sw_mdio_write(struct mii_bus *bus, int addr, int regnum,
303303
* send them to our master MDIO bus controller
304304
*/
305305
if (addr == BRCM_PSEUDO_PHY_ADDR && priv->indir_phy_mask & BIT(addr))
306-
bcm_sf2_sw_indir_rw(priv, 0, addr, regnum, val);
306+
return bcm_sf2_sw_indir_rw(priv, 0, addr, regnum, val);
307307
else
308-
mdiobus_write_nested(priv->master_mii_bus, addr, regnum, val);
309-
310-
return 0;
308+
return mdiobus_write_nested(priv->master_mii_bus, addr,
309+
regnum, val);
311310
}
312311

313312
static irqreturn_t bcm_sf2_switch_0_isr(int irq, void *dev_id)

drivers/net/ethernet/atheros/atl1e/atl1e_main.c

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -473,7 +473,9 @@ static void atl1e_mdio_write(struct net_device *netdev, int phy_id,
473473
{
474474
struct atl1e_adapter *adapter = netdev_priv(netdev);
475475

476-
atl1e_write_phy_reg(&adapter->hw, reg_num & MDIO_REG_ADDR_MASK, val);
476+
if (atl1e_write_phy_reg(&adapter->hw,
477+
reg_num & MDIO_REG_ADDR_MASK, val))
478+
netdev_err(netdev, "write phy register failed\n");
477479
}
478480

479481
static int atl1e_mii_ioctl(struct net_device *netdev,

drivers/net/ethernet/chelsio/cxgb4/cudbg_lib.c

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1229,6 +1229,10 @@ int cudbg_collect_hw_sched(struct cudbg_init *pdbg_init,
12291229

12301230
rc = cudbg_get_buff(pdbg_init, dbg_buff, sizeof(struct cudbg_hw_sched),
12311231
&temp_buff);
1232+
1233+
if (rc)
1234+
return rc;
1235+
12321236
hw_sched_buff = (struct cudbg_hw_sched *)temp_buff.data;
12331237
hw_sched_buff->map = t4_read_reg(padap, TP_TX_MOD_QUEUE_REQ_MAP_A);
12341238
hw_sched_buff->mode = TIMERMODE_G(t4_read_reg(padap, TP_MOD_CONFIG_A));

drivers/net/ethernet/freescale/fman/fman_memac.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -928,7 +928,7 @@ int memac_add_hash_mac_address(struct fman_mac *memac, enet_addr_t *eth_addr)
928928
hash = get_mac_addr_hash_code(addr) & HASH_CTRL_ADDR_MASK;
929929

930930
/* Create element to be added to the driver hash table */
931-
hash_entry = kmalloc(sizeof(*hash_entry), GFP_KERNEL);
931+
hash_entry = kmalloc(sizeof(*hash_entry), GFP_ATOMIC);
932932
if (!hash_entry)
933933
return -ENOMEM;
934934
hash_entry->addr = addr;

drivers/net/ethernet/freescale/fman/fman_tgec.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -553,7 +553,7 @@ int tgec_add_hash_mac_address(struct fman_mac *tgec, enet_addr_t *eth_addr)
553553
hash = (crc >> TGEC_HASH_MCAST_SHIFT) & TGEC_HASH_ADR_MSK;
554554

555555
/* Create element to be added to the driver hash table */
556-
hash_entry = kmalloc(sizeof(*hash_entry), GFP_KERNEL);
556+
hash_entry = kmalloc(sizeof(*hash_entry), GFP_ATOMIC);
557557
if (!hash_entry)
558558
return -ENOMEM;
559559
hash_entry->addr = addr;

drivers/net/ethernet/hisilicon/hns3/hns3_enet.c

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3995,17 +3995,18 @@ static int hns3_reset_notify_up_enet(struct hnae3_handle *handle)
39953995
struct hns3_nic_priv *priv = netdev_priv(kinfo->netdev);
39963996
int ret = 0;
39973997

3998+
clear_bit(HNS3_NIC_STATE_RESETTING, &priv->state);
3999+
39984000
if (netif_running(kinfo->netdev)) {
3999-
ret = hns3_nic_net_up(kinfo->netdev);
4001+
ret = hns3_nic_net_open(kinfo->netdev);
40004002
if (ret) {
4003+
set_bit(HNS3_NIC_STATE_RESETTING, &priv->state);
40014004
netdev_err(kinfo->netdev,
40024005
"hns net up fail, ret=%d!\n", ret);
40034006
return ret;
40044007
}
40054008
}
40064009

4007-
clear_bit(HNS3_NIC_STATE_RESETTING, &priv->state);
4008-
40094010
return ret;
40104011
}
40114012

drivers/net/ethernet/huawei/hinic/hinic_main.c

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1106,6 +1106,11 @@ static void hinic_remove(struct pci_dev *pdev)
11061106
dev_info(&pdev->dev, "HiNIC driver - removed\n");
11071107
}
11081108

1109+
static void hinic_shutdown(struct pci_dev *pdev)
1110+
{
1111+
pci_disable_device(pdev);
1112+
}
1113+
11091114
static const struct pci_device_id hinic_pci_table[] = {
11101115
{ PCI_VDEVICE(HUAWEI, HINIC_DEV_ID_QUAD_PORT_25GE), 0},
11111116
{ PCI_VDEVICE(HUAWEI, HINIC_DEV_ID_DUAL_PORT_25GE), 0},
@@ -1119,6 +1124,7 @@ static struct pci_driver hinic_driver = {
11191124
.id_table = hinic_pci_table,
11201125
.probe = hinic_probe,
11211126
.remove = hinic_remove,
1127+
.shutdown = hinic_shutdown,
11221128
};
11231129

11241130
module_pci_driver(hinic_driver);

drivers/net/ethernet/ibm/ibmveth.c

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1171,11 +1171,15 @@ static netdev_tx_t ibmveth_start_xmit(struct sk_buff *skb,
11711171

11721172
map_failed_frags:
11731173
last = i+1;
1174-
for (i = 0; i < last; i++)
1174+
for (i = 1; i < last; i++)
11751175
dma_unmap_page(&adapter->vdev->dev, descs[i].fields.address,
11761176
descs[i].fields.flags_len & IBMVETH_BUF_LEN_MASK,
11771177
DMA_TO_DEVICE);
11781178

1179+
dma_unmap_single(&adapter->vdev->dev,
1180+
descs[0].fields.address,
1181+
descs[0].fields.flags_len & IBMVETH_BUF_LEN_MASK,
1182+
DMA_TO_DEVICE);
11791183
map_failed:
11801184
if (!firmware_has_feature(FW_FEATURE_CMO))
11811185
netdev_err(netdev, "tx: unable to map xmit buffer\n");

0 commit comments

Comments
 (0)