Skip to content

Commit

Permalink
net/sched: taprio: remove redundant FULL_OFFLOAD_IS_ENABLED check in …
Browse files Browse the repository at this point in the history
…taprio_enqueue

Since commit 1351170 ("net: taprio offload: enforce qdisc to netdev
queue mapping"), __dev_queue_xmit() will select a txq->qdisc for the
full offload case of taprio which isn't the root taprio qdisc, so
qdisc enqueues will never pass through taprio_enqueue().

That commit already introduced one safety precaution check for
FULL_OFFLOAD_IS_ENABLED(); a second one is really not needed, so
simplify the conditional for entering into the GSO segmentation logic.
Also reword the comment a little, to appear more natural after the code
change.

Signed-off-by: Vladimir Oltean <[email protected]>
Signed-off-by: Jakub Kicinski <[email protected]>
  • Loading branch information
vladimiroltean authored and kuba-moo committed Sep 20, 2022
1 parent 9af2365 commit fa65edd
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions net/sched/sch_taprio.c
Original file line number Diff line number Diff line change
Expand Up @@ -454,10 +454,10 @@ static int taprio_enqueue(struct sk_buff *skb, struct Qdisc *sch,

/* Large packets might not be transmitted when the transmission duration
* exceeds any configured interval. Therefore, segment the skb into
* smaller chunks. Skip it for the full offload case, as the driver
* and/or the hardware is expected to handle this.
* smaller chunks. Drivers with full offload are expected to handle
* this in hardware.
*/
if (skb_is_gso(skb) && !FULL_OFFLOAD_IS_ENABLED(q->flags)) {
if (skb_is_gso(skb)) {
unsigned int slen = 0, numsegs = 0, len = qdisc_pkt_len(skb);
netdev_features_t features = netif_skb_features(skb);
struct sk_buff *segs, *nskb;
Expand Down

0 comments on commit fa65edd

Please sign in to comment.