On Wed, Nov 13, 2024 at 9:32 AM Taehee Yoo <ap420073@xxxxxxxxx> wrote: > > The bnxt_en driver supports rx-copybreak, but it couldn't be set by > userspace. Only the default value(256) has worked. > This patch makes the bnxt_en driver support following command. > `ethtool --set-tunable <devname> rx-copybreak <value> ` and > `ethtool --get-tunable <devname> rx-copybreak`. > > By this patch, hds_threshol is set to the rx-copybreak value. > But it will be set by `ethtool -G eth0 header-data-split-thresh N` > in the next patch. > > Reviewed-by: Brett Creeley <brett.creeley@xxxxxxx> > Tested-by: Stanislav Fomichev <sdf@xxxxxxxxxxx> > Signed-off-by: Taehee Yoo <ap420073@xxxxxxxxx> > @@ -6417,16 +6422,14 @@ static int bnxt_hwrm_vnic_set_hds(struct bnxt *bp, struct bnxt_vnic_info *vnic) > > req->flags = cpu_to_le32(VNIC_PLCMODES_CFG_REQ_FLAGS_JUMBO_PLACEMENT); > req->enables = cpu_to_le32(VNIC_PLCMODES_CFG_REQ_ENABLES_JUMBO_THRESH_VALID); > + req->jumbo_thresh = cpu_to_le16(bp->rx_buf_use_size); > > - if (BNXT_RX_PAGE_MODE(bp)) { > - req->jumbo_thresh = cpu_to_le16(bp->rx_buf_use_size); > - } else { > + if (!BNXT_RX_PAGE_MODE(bp) && (bp->flags & BNXT_FLAG_AGG_RINGS)) { > req->flags |= cpu_to_le32(VNIC_PLCMODES_CFG_REQ_FLAGS_HDS_IPV4 | > VNIC_PLCMODES_CFG_REQ_FLAGS_HDS_IPV6); > req->enables |= > cpu_to_le32(VNIC_PLCMODES_CFG_REQ_ENABLES_HDS_THRESHOLD_VALID); > - req->jumbo_thresh = cpu_to_le16(bp->rx_copy_thresh); > - req->hds_threshold = cpu_to_le16(bp->rx_copy_thresh); > + req->hds_threshold = cpu_to_le16(bp->rx_copybreak); I double checked our hardware spec and the HDS threshold is 10 bits, so the maximum value is 1023. When we get to patch #5, the HDS threshold is separated from RX copybreak and the HDS maximum becomes 256. So it is within the hardware limit.
Attachment:
smime.p7s
Description: S/MIME Cryptographic Signature