On Fri, 22 Nov 2019 06:30:02 +0530, Rahul Lakkireddy wrote: > Implement and export UDP segmentation offload (USO) support for both > NIC and MQPRIO QoS offload Tx path. Update appropriate logic in Tx to > parse GSO info in skb and configure FW_ETH_TX_EO_WR request needed to > perform USO. > > v2: > - Remove inline keyword from write_eo_udp_wr() in sge.c. Let the > compiler decide. > > Signed-off-by: Rahul Lakkireddy <rahul.lakkireddy@xxxxxxxxxxx> > diff --git a/drivers/net/ethernet/chelsio/cxgb4/cxgb4_ethtool.c b/drivers/net/ethernet/chelsio/cxgb4/cxgb4_ethtool.c > index 76538f4cd595..f57457453561 100644 > --- a/drivers/net/ethernet/chelsio/cxgb4/cxgb4_ethtool.c > +++ b/drivers/net/ethernet/chelsio/cxgb4/cxgb4_ethtool.c > @@ -91,6 +91,7 @@ static const char stats_strings[][ETH_GSTRING_LEN] = { > "rx_bg3_frames_trunc ", > > "tso ", > + "uso ", Oh wow, the spaces, people's inventiveness when it comes to ethtool free form strings knows no bounds.. That's not a review comment, I just wanted to say that :) > "tx_csum_offload ", > "rx_csum_good ", > "vlan_extractions ", > diff --git a/drivers/net/ethernet/chelsio/cxgb4/cxgb4_main.c b/drivers/net/ethernet/chelsio/cxgb4/cxgb4_main.c > index e8a1826a1e90..12ff69b3ba91 100644 > --- a/drivers/net/ethernet/chelsio/cxgb4/cxgb4_main.c > +++ b/drivers/net/ethernet/chelsio/cxgb4/cxgb4_main.c > @@ -1136,11 +1136,17 @@ static u16 cxgb_select_queue(struct net_device *dev, struct sk_buff *skb, > > if (dev->num_tc) { > struct port_info *pi = netdev2pinfo(dev); > + u8 ver, proto; > + > + ver = ip_hdr(skb)->version; > + proto = (ver == 6) ? ipv6_hdr(skb)->nexthdr : > + ip_hdr(skb)->protocol; Checking ip version now looks potentially like a fix? > /* Send unsupported traffic pattern to normal NIC queues. */ > txq = netdev_pick_tx(dev, skb, sb_dev); > if (xfrm_offload(skb) || is_ptp_enabled(skb, dev) || > - ip_hdr(skb)->protocol != IPPROTO_TCP) > + skb->encapsulation || The addition of encapsulation check also looks unrelated? > + (proto != IPPROTO_TCP && proto != IPPROTO_UDP)) > txq = txq % pi->nqsets; > > return txq; > @@ -5838,7 +5844,8 @@ static void free_some_resources(struct adapter *adapter) > t4_fw_bye(adapter, adapter->pf); > } > > -#define TSO_FLAGS (NETIF_F_TSO | NETIF_F_TSO6 | NETIF_F_TSO_ECN) > +#define TSO_FLAGS (NETIF_F_TSO | NETIF_F_TSO6 | NETIF_F_TSO_ECN | \ > + NETIF_F_GSO_UDP_L4) > #define VLAN_FEAT (NETIF_F_SG | NETIF_F_IP_CSUM | TSO_FLAGS | \ > NETIF_F_GRO | NETIF_F_IPV6_CSUM | NETIF_F_HIGHDMA) > #define SEGMENT_SIZE 128