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]
Date:   Thu, 16 Feb 2017 04:23:34 -0800
From:   Eric Dumazet <eric.dumazet@...il.com>
To:     Yuval Mintz <Yuval.Mintz@...ium.com>
Cc:     davem@...emloft.net, netdev@...r.kernel.org,
        richardcochran@...il.com, Sudarsana.Kalluru@...ium.com
Subject: Re: [PATCH net-next v7 2/2] qede: Add driver support for PTP

On Wed, 2017-02-15 at 10:24 +0200, Yuval Mintz wrote:
> From: Sudarsana Reddy Kalluru <Sudarsana.Kalluru@...ium.com>
> 
> This patch adds the driver support for,
>   - Registering the ptp clock functionality with the OS.
>   - Timestamping the Rx/Tx PTP packets.
>   - Ethtool callbacks related to PTP.



> +void qede_ptp_tx_ts(struct qede_dev *edev, struct sk_buff *skb)
> +{
> +	struct qede_ptp *ptp;
> +
> +	ptp = edev->ptp;
> +	if (!ptp)
> +		return;
> +
> +	if (unlikely(!(edev->flags & QEDE_TX_TIMESTAMPING_EN))) {
> +		DP_NOTICE(edev,
> +			  "Tx timestamping was not enabled, this packet will not be timestamped\n");
> +	} else if (unlikely(ptp->tx_skb)) {
> +		DP_NOTICE(edev,
> +			  "The device supports only a single outstanding packet to timestamp, this packet will not be timestamped\n");
> +	} else {
> +		skb_shinfo(skb)->tx_flags |= SKBTX_IN_PROGRESS;
> +		/* schedule check for Tx timestamp */
> +		ptp->tx_skb = skb_get(skb);
> +		schedule_work(&ptp->work);
> +	}
> +}


This is a multi queue device.

Therefore multiple cpus could call this function at the same time.

ptp->tx_skb needs some kind of SMP protection.



 


Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ