lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <83978196-f5d8-e6b1-7493-a3e498633d6d@pensando.io>
Date:   Mon, 5 Apr 2021 09:19:42 -0700
From:   Shannon Nelson <snelson@...sando.io>
To:     Richard Cochran <richardcochran@...il.com>
Cc:     netdev@...r.kernel.org, davem@...emloft.net, kuba@...nel.org,
        drivers@...sando.io, Allen Hubbe <allenbh@...sando.io>
Subject: Re: [PATCH net-next 05/12] ionic: add hw timestamp support files

On 4/4/21 4:21 PM, Richard Cochran wrote:
> On Thu, Apr 01, 2021 at 10:56:03AM -0700, Shannon Nelson wrote:
>
>> +int ionic_lif_hwstamp_set(struct ionic_lif *lif, struct ifreq *ifr)
>> +{
>> +	struct ionic *ionic = lif->ionic;
>> +	struct hwtstamp_config config;
>> +	int tx_mode = 0;
>> +	u64 rx_filt = 0;
>> +	int err, err2;
>> +	bool rx_all;
>> +	__le64 mask;
>> +
>> +	if (!lif->phc || !lif->phc->ptp)
>> +		return -EOPNOTSUPP;
>> +
>> +	if (ifr) {
>> +		if (copy_from_user(&config, ifr->ifr_data, sizeof(config)))
>> +			return -EFAULT;
>> +	} else {
>> +		/* if called with ifr == NULL, behave as if called with the
>> +		 * current ts_config from the initial cleared state.
>> +		 */
>> +		memcpy(&config, &lif->phc->ts_config, sizeof(config));
>> +		memset(&lif->phc->ts_config, 0, sizeof(config));
>> +	}
>> +
>> +	tx_mode = ionic_hwstamp_tx_mode(config.tx_type);
>> +	if (tx_mode < 0)
>> +		return tx_mode;
>> +
>> +	mask = cpu_to_le64(BIT_ULL(tx_mode));
>> +	if ((ionic->ident.lif.eth.hwstamp_tx_modes & mask) != mask)
>> +		return -ERANGE;
>> +
>> +	rx_filt = ionic_hwstamp_rx_filt(config.rx_filter);
>> +	rx_all = config.rx_filter != HWTSTAMP_FILTER_NONE && !rx_filt;
>> +
>> +	mask = cpu_to_le64(rx_filt);
>> +	if ((ionic->ident.lif.eth.hwstamp_rx_filters & mask) != mask) {
>> +		rx_filt = 0;
>> +		rx_all = true;
>> +		config.rx_filter = HWTSTAMP_FILTER_ALL;
>> +	}
>> +
>> +	dev_dbg(ionic->dev, "config_rx_filter %d rx_filt %#llx rx_all %d\n",
>> +		config.rx_filter, rx_filt, rx_all);
>> +
>> +	mutex_lock(&lif->phc->config_lock);
>> +
>> +	if (tx_mode) {
>> +		err = ionic_lif_create_hwstamp_txq(lif);
> This function NDE yet.  It first appears in Patch #6.  Please make
> sure each patch compiles.  That way, bisection always works.
>
> Thanks,
> Richard

This patch simply gets the file into the repo, it isn't yet mentioned in 
the Makefile so there is no broken compile.  This was just as a way of 
making patch 6 a little smaller.

sln

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ