Skip to content

Commit de39065

Browse files
Nick Childkuba-moo
authored andcommitted
ibmvnic: Inspect header requirements before using scrq direct
Previously, the TX header requirement for standard frames was ignored. This requirement is a bitstring sent from the VIOS which maps to the type of header information needed during TX. If no header information, is needed then send subcrq direct can be used (which can be more performant). This bitstring was previously ignored for standard packets (AKA non LSO, non CSO) due to the belief that the bitstring was over-cautionary. It turns out that there are some configurations where the backing device does need header information for transmission of standard packets. If the information is not supplied then this causes continuous "Adapter error" transport events. Therefore, this bitstring should be respected and observed before considering the use of send subcrq direct. Fixes: 74839f7 ("ibmvnic: Introduce send sub-crq direct") Signed-off-by: Nick Child <[email protected]> Reviewed-by: Simon Horman <[email protected]> Link: https://patch.msgid.link/[email protected] Signed-off-by: Jakub Kicinski <[email protected]>
1 parent 69ea1d4 commit de39065

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

drivers/net/ethernet/ibm/ibmvnic.c

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2472,9 +2472,11 @@ static netdev_tx_t ibmvnic_xmit(struct sk_buff *skb, struct net_device *netdev)
24722472
/* if we are going to send_subcrq_direct this then we need to
24732473
* update the checksum before copying the data into ltb. Essentially
24742474
* these packets force disable CSO so that we can guarantee that
2475-
* FW does not need header info and we can send direct.
2475+
* FW does not need header info and we can send direct. Also, vnic
2476+
* server must be able to xmit standard packets without header data
24762477
*/
2477-
if (!skb_is_gso(skb) && !ind_bufp->index && !netdev_xmit_more()) {
2478+
if (*hdrs == 0 && !skb_is_gso(skb) &&
2479+
!ind_bufp->index && !netdev_xmit_more()) {
24782480
use_scrq_send_direct = true;
24792481
if (skb->ip_summed == CHECKSUM_PARTIAL &&
24802482
skb_checksum_help(skb))

0 commit comments

Comments
 (0)